Closed tianzx closed 8 years ago
I had a similar issue, be sure that the user that you are running the script it's the same that you are using to restart tomcat, also, I'd recommend installing tomcat as a service instead.
I had solved the issue . when I excute the script like this: execute "export JAVA_HOME=/opt/jdk1.7.0_79 ; /data/server/tomcat-ui/bin/startup.sh " ;
it will success;but if you excute like this:execute "export JAVA_HOME=/opt/jdk1.7.0_79 "; execute "/data/server/tomcat-ui/bin/startup.sh "
,it will fail.
I had finished the demo https://github.com/tianzx/uploadScript
Thank your great tool ,it help me save lots of time
The first one works because execute
has each independent environment variables. And in some environment, there is difference between terminal and SSH due to .profile.
dev#1|Neither the JAVA_HOME nor the JRE_HOME environment variable is defined dev#1|At least one of these environment variable is needed to run this program Failed command dev#1 with status 1: /data/server/tomcat-ui/bin/startup.sh :start FAILED
but I can restart it by teminal