Problem starting of Tomcat on remote host

Hi All,

I have several Tomcat 7.0.12 installations on remote servers for different projects. I need to start and stop them from a centralized server. Once I start the server remotely using ssh commands, server starts successfully but prompt does not exit. It keeps on holding.

I have password-less sudo connectivity established from central server to all remote hosts.

Command used is :

ssh -l user remote-address 'cd TOMCAT_HOME/bin; ./startup.sh'

I tried to search the over the forum came through this one Problem with Unix script to start remote Tomcat but no significant solution. So I had to spawn a new thread.

Any ideas/suggestions?

Thanks in advance.

Regards,
Bhaskar

What happens if you redirect stderr:

ssh -l user remote-address 'cd TOMCAT_HOME/bin; ./startup.sh 2>/dev/null'

If that hangs too, try to redirect all stdin, stdout and stderr:

ssh -l user remote-address 'cd TOMCAT_HOME/bin; ./startup.sh </dev/null >/dev/null 2>&1'
1 Like

Thanks a lot mate!! the second option ran perfect fine.

By the way, just out of curiosity wanted to know, how redirection of all stdin, stderr, stdout make a prompt come out.

Thanks and Cheers!!
Bhaskar

I suppose that in the first case the startup.sh is not properly detaching from the controlling terminal.
When closing all three standard I/O channels (standard input, output and error output) it seems to do it.

Thanks Mate!!