watchdog¶
信頼性とセキュリティを高めるために、独立したResin watchdogプロセスによってResinのサーバが起動し監視されています。watchdogは、継続的にResinサーバの状態を確認し応答しなくなっている場合、Resinのインスタンスを再起動します。
概要¶
watchdogは独立したサービスとして密かに実行されるため、ほとんどの場合ユーザは全くwatchdogに注意を払う必要はありません。サーバマシンごとに1つのwatchdogが起動し、サーバマシン上の全てのResin JavaVMを監視します。
ユーザがwatchdogに注意を払う必要がある場合は、環境に深刻な問題が発生しwatchdogがシャットダウンしてしまった場合です。
Resinがクラッシュしたり予期せずプロセスが終了した場合、watchdogは自動的にResinを再起動します。Resinを停止したいのであれば、ユーザはインスタンスを停止させるようにwatchdogに指示する必要があります。
コマンドラインから起動、停止、再起動を行ってください。
コマンドライン¶
console¶
「console」コマンドは開発時のために使用します。コンソールウィンドウに新しいResinインスタンスを起動します。Resinインスタンスの標準出力はコンソールウィンドウに表示されます。
Linuxの例
> resinctl console -server app-0
Windowsの例
> resin.exe console -server app-0
start¶
「start」コマンドは指定されたIDの新しいResinインスタンスを起動します。実行環境にwatchdogが起動していない場合、watchdog起動後にResinインスタンスが起動されます。
Linuxの例
> resinctl start -server app-0
Resin/4.0.xx started -server 'app-0' with watchdog at 127.0.0.1:6600
Windowsの例
> resin.exe start -server app-0
Resin/4.0.xx started -server 'app-0' with watchdog at 127.0.0.1:6600
stop¶
「stop」コマンドは指定されたIDのResinインスタンスを停止します。管理するResinインスタンスが他に存在しなくなった場合、watchdogは自動的に終了します。
Linuxの例
> resinctl stop -server app-0
Resin/4.0.xx stopped for watchdog at 127.0.0.1:6600
Windowsの例
> resin.exe stop -server app-0
Resin/4.0.xx stopped for watchdog at 127.0.0.1:6600
status¶
「status」コマンドはwatchdogサービスによって管理されている現在のResinインスタンスをコンソールに出力します。
Linuxの例
> resinctl status
Resin/4.0.xx status for watchdog at 127.0.0.1:6600
watchdog:
watchdog-pid: 25088
server 'app-0' : ACTIVE
password: missing
watchdog-user: imart
user: imart
root: /home/imart/resin-pro-4.0.xx
conf: /home/imart/resin-pro-4.0.xx/conf/resin.xml
..
Windowsの例
> resin.exe status
Resin/4.0.xx status for watchdog at 127.0.0.1:6600
watchdog:
watchdog-pid: 192
server 'app-0' : ACTIVE
password: missing
watchdog-user: imart
user: imart
root: /C:/resin-pro-4.0.xx
conf: /C:/resin-pro-4.0.xx/conf/resin.xml
..