Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用ant(sshexec)启动远程tomcat,ant不退出。(tomcat使用cronolog)_Tomcat_Ant_Catalina.out - Fatal编程技术网

使用ant(sshexec)启动远程tomcat,ant不退出。(tomcat使用cronolog)

使用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

我使用ant(sshexec)启动远程tomcat

<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