Operating System - HP-UX
1838383 Members
3986 Online
110125 Solutions
New Discussion

Tomcat not starting as part of system boot

 
sudheer_7
Advisor

Tomcat not starting as part of system boot

Hello there!,

I have a server(L2000, HP-ux 11.11) and tomcat is set to start as part of the system boot, /sbin/rc2.d/S901tomcat. But it would not start on its own. rc.log says "Tomcat started", but it dies after some time. When the system is completely booted up, and when I log in and try to run the same script it would start and remain without any problems.

Attaching the script if it would be useful.

Pleasse anyone has got any suggestions?

Thanks in advance,

Sudheer
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Tomcat not starting as part of system boot

There is a startup script for tomcat in /sbin/init.d

Add a set -x to it right after the shell definition at the top.

This may get you some diagnostics as to why it failed.

You could also modify it to start the tomcat with the tusc utility and gather information on the process and why it dies.

These symptoms however are typical of an environment problem.

There is some environment setting that tomcat gets in normal run mode that it does not get in startup mode.

Typically this line of code at the top will help:

. /etc/profile
. /homedir/.profile

sometimes you only need one and homedir must be changed above to the actual home directory of the user that starts tomcat.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sudheer_7
Advisor

Re: Tomcat not starting as part of system boot

Thank you Steve for the suggestions. set -x option is already done, but I have not any clue of why it exits. tomcat startup is done by root and I called both /etc/profile and the roots profile within the script. Even then it dies after some time.

Enabled tusc on startup, it has given me a very long list of processes. tusc -f -o and directed the output to a file. There is a 145 KB file created, I am not able to make out much from it. Attaching the last few lines from the trace file..
Rainer von Bongartz
Honored Contributor

Re: Tomcat not starting as part of system boot


do you have any messages in your catalina.out
file ??

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
sudheer_7
Advisor

Re: Tomcat not starting as part of system boot

I have checked the catalina.out file. Did not find any message which seemed to be errors
sudheer_7
Advisor

Re: Tomcat not starting as part of system boot

one thing I observed now is that, tomcat uses java1.4, I can see the process starting up, and when a process using java1.3 starts up it gets killed. Not sure what that process is. I have done a tusc on the pid of tomcat's java (tusc 443) and the last few lines of the same is attached.
Scot Bean
Honored Contributor

Re: Tomcat not starting as part of system boot

Look for a core file, the Tomcat startup script may be running but then quietly aborting.
Rainer von Bongartz
Honored Contributor

Re: Tomcat not starting as part of system boot


put a 'nohup' in your tomcat startup file in /sbin/init.d/


nohup $TOMCAT_HOME/bin/startup.sh 1>/dev/null 2>&1

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
sudheer_7
Advisor

Re: Tomcat not starting as part of system boot

thank you all, a combination of sourcing the profile file and nohup has resolved the problem.