I use ant(sshexec) to start remote tomcat
<sshexec host="${ssh.hostname}" port="${ssh.port}"
username="${ssh.username}" password="${ssh.password}" trust="true"
command="${tomcat.home}/bin/startup.sh" />
But ant will't exit after tomcat startup successful。
I use cronolog to process tomcat's log: catalina.out,change catalina.sh like this:
org.apache.catalina.startup.Bootstrap "$@" start 2>&1 \
| /usr/local/sbin/cronolog "$CATALINA_BASE"/logs/catalina.%Y-%m-%d.out >> /dev/null &
When I rollback catalina.sh:
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 &
.... Ant will be OK
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
Why cronolog will cause ant hung