使用ant(sshexec)启动远程tomcat,ant不退出。(tomcat使用cronolog)
我使用ant(sshexec)启动远程tomcat使用ant(sshexec)启动远程tomcat,ant不退出。(tomcat使用cronolog),tomcat,ant,catalina.out,Tomcat,Ant,Catalina.out,我使用ant(sshexec)启动远程tomcat <sshexec host="${ssh.hostname}" port="${ssh.port}" username="${ssh.username}" password="${ssh.password}" trust="true" command="${tomcat.home}/bin/startup.sh" /> 当我回滚catali
<sshexec host="${ssh.hostname}" port="${ssh.port}"
username="${ssh.username}" password="${ssh.password}" trust="true"
command="${tomcat.home}/bin/startup.sh" />
当我回滚catalina.sh时:
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 &
。。。。蚂蚁会没事的
startTomcat:
[echo] start tomcat in 10.10.2.174...
[sshexec] Connecting to 10.10.2.174:22
[sshexec] cmd : /opt/tomcat6/bin/startup.sh
BUILD SUCCESSFUL
Total time: 11 seconds
为什么cronolog会导致ant挂起您确定使用“cronolog”命令行的startup.sh在后台从本地机器和远程SSH外壳启动tomcat吗?是的,我在一个ant脚本中运行startup.sh和shutdown.sh,startup.sh可以工作,ant执行下一个目标。shutdown.sh是最后一个目标,永远不会完成。。。
startTomcat:
[echo] start tomcat in 10.10.2.174...
[sshexec] Connecting to 10.10.2.174:22
[sshexec] cmd : /opt/tomcat6/bin/startup.sh
BUILD SUCCESSFUL
Total time: 11 seconds