0

私はPalletOpsVmFestを使用しており、クレートでstorm 次の使用exec-checked-scriptを開始したいと考えています。storm_codeship.clj

   36 (defn install [settings] 

   54   (exec-checked-script "start dev-zookeeper"                                                        
~  55             ("nohup ~/bin/storm/bin/storm dev-zookeeper 1> devout.log 2>deverror.log &"))                 
   56   (exec-checked-script "start storm-nimbus"                                                         
~  57             ("nohup ~/bin/storm/bin/storm nimbus 1> nuibusout.log 2>nimbuserror.log &"))                  
   58   (exec-checked-script "start storm-supervisor"                                                     
~  59             ("nohup ~/bin/storm/bin/storm supervisor 1> superout.log 2>supererror.log &"))                
   60   (exec-checked-script "start storm-drpc"                                                           
~  61             ("nohup ~/bin/storm/bin/storm drpc 1> drpcout.log 2>drpcerror.log &")))  

nohupまた、なしで次のスクリプトを試しました。

   36 (defn install [settings] 

   54   (exec-checked-script "start dev-zookeeper"                                                        
~  55             ("~/bin/storm/bin/storm dev-zookeeper 1> devout.log 2>deverror.log &"))                 
   56   (exec-checked-script "start storm-nimbus"                                                         
~  57             ("~/bin/storm/bin/storm nimbus 1> nuibusout.log 2>nimbuserror.log &"))                  
   58   (exec-checked-script "start storm-supervisor"                                                     
~  59             ("~/bin/storm/bin/storm supervisor 1> superout.log 2>supererror.log &"))                
   60   (exec-checked-script "start storm-drpc"                                                           
~  61             ("~/bin/storm/bin/storm drpc 1> drpcout.log 2>drpcerror.log &")))

ログファイルのにおいがまったくない仮想マシンでは効果が見られません。

VM に入り、同じ一連のコマンドを手動で実行すると、生成されたログ ファイルを操作していることがわかります。

VM のパーミッションは以下の通りです。

root@ubuntu1204:/home/vmfest# ls -l ~/bin/storm/bin/
total 36
-rwxr-xr-x 1 502 staff   432 Jun 26 06:33 build_modules.sh
-rwxr-xr-x 1 502 staff  1005 Jun 26 06:33 build_release.sh
-rwxr-xr-x 1 502 staff   692 Jun 26 06:33 install_zmq.sh
-rwxr-xr-x 1 502 staff    76 Jun 26 06:33 javadoc.sh
-rwxr-xr-x 1 502 staff 15494 Jun 26 06:33 storm
-rwxr-xr-x 1 502 staff   543 Jun 26 06:33 to_maven.sh

許可の問題ではないと思いますが、何が欠けているのでしょうか?

4

1 に答える 1

0

exec-checked-scriptサブプロセスが切り離される前に、開始されたシェルが終了することが起こっていると思います。

これを回避する 1 つの方法は、シェルでジョブ制御を有効にすることです。

(exec-checked-script "start dev-zookeeper" ("set" "-m") ("~/bin/storm/bin/storm dev-zookeeper 1> devout.log 2>deverror.log &"))

于 2014-06-27T06:59:05.447 に答える