1

When I run my start command via ssh it tells me that its started but it is in fact not the case. Catalina logs does not seem to capture any events either. However stop and status works.

ssh -t SERVER1 'sudo /etc/init.d/tomcat7 start'
Starting tomcat
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.

When I run the command locally on the SERVER1 it starts successfully.

I'm a bit baffled by this behaviour. Any idea what the root cause might be?

1

So this turned out to be an issue when tty was enabled via the ssh -t option. The tomcat process only remained active as long as the tty session was active. I had modify the start up script by prefixing the start up command with nohup which fixed the issue.

nohup - run a command immune to hangups, with output to a non-tty

  • I don't understand.... what's is the new new solution? – Geddon Mar 9 '16 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.