首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

ANT透过sshexec启动weblogic一直不能退出的解决方案

2012-11-16 
ANT通过sshexec启动weblogic一直不能退出的解决方案通常我们通过sshexec来启动weblogic(其他服务器也适应)

ANT通过sshexec启动weblogic一直不能退出的解决方案

通常我们通过sshexec来启动weblogic(其他服务器也适应)会采取如下方法:

<target name="startup"><echo message="---${today}----- Starting Weblogic AdminServer -----"/><parallel><sshexec host="15.154.146.101" username="bea" password="bea123" trust="true" command="/home/bea/smartdm/odomain/startWebLogic.sh"> </sshexec><sequential><waitfor maxwait="10" maxwaitunit="minute" checkevery="1" checkeveryunit="second">             <http url="http://15.154.146.101:8001/testportal/admin"/>         </waitfor><antcall target="test-odomain"/>     </sequential></parallel><echo message="15.154.146.101 started successfully"/>    </target>

?

命令行执行ant startup,都会停留在

<sshexec host="15.154.146.101" username="bea" password="bea123" trust="true" command="/home/bea/smartdm/odomain/startWebLogic.sh"> </sshexec>

这一步上,即使加上nohup 。。。&,结果也都一样,通过大量的搜索以及实验,终于搞定,如下:

<sshexec host="15.154.146.101" username="bea" password="bea123" trust="true" commandResource="aa.ci"> </sshexec>
?

aa.ci

#!/bin/shnohup /home/bea/smartdm/odomain/startWebLogic.sh >/dev/null 2>&1 &

? 关键在于2>&1,将标准错误打到标准输出中。原因不明。

?

热点排行