Operating System - HP-UX
1823085 Members
3412 Online
109646 Solutions
New Discussion юеВ

Tomcat not starting on reboot

 
Janet Norton
Occasional Contributor

Tomcat not starting on reboot

I am running apache 1.3.22, java 1.4, jakarta-tomcat-3.3 and compiled mod_jk on hpux 11.11. Tomcat has been running fine for months, but must be manually started. I have added logs & debug code to confirm env is correct in startup script. The tomcat process actually starts and is assigned a valid pid,
## ps -ef |grep java
root 1423 1 17 14:51:13 console 0:04 /opt/java1.4/bin/PA_RISC2.0/java -Djava.security.policy==/opt/j

but within seconds the process disappears with the following error in apache error.log
[Wed May 1 21:51:20 2002] [notice] Apache/1.3.22 (Unix) mod_jk/1.1.0 configured -- resuming normal operations
[Wed May 1 21:51:20 2002] [notice] Accept mutex: fcntl (Default: fcntl)

Apache httpd.conf has valid user/group defined.
User web
Group apache
In the startup scripts I have tried to su - web to start tomat as web user and had same results.

I am able to restart tomcat from cron after scheduled reboot or manually. Any ideas on how to get my startup script to work?
8 REPLIES 8
JACQUIN Joachim
New Member

Re: Tomcat not starting on reboot

I have exactly the same problem ... and I am running apache 1.3.26, java 1.3, jakarta-tomcat 3.3 and compiled mod_jk on hpux 11.0.
An idea, please?
Paula J Frazer-Campbell
Honored Contributor

Re: Tomcat not starting on reboot

Janet

An Idea - where in your boot sequence is the tomcat start, if too early that not all dependences will be there. Try moving it to last item to start.

Paula
If you can spell SysAdmin then you is one - anon
Steven E. Protter
Exalted Contributor

Re: Tomcat not starting on reboot

The prior post was exactly the beginning of what I was thinking.

The most common cause of this problem is environment problems.

The startup environment is missingh many things that you have when you start the program via a telnet or ssh session.

TERM is generally not set
PATH is different.

Try adding this line to your startup script.

env > /tmp/env.txt

start and stop the product.

mv /tmp/env.txt /tmp/envnormal.txt

Reboot the server.

When it comes up diff /tmp/env.txt /tmp/envnormal.txt

Resolve all of the differences and the product will start.

The normal way start up these programs is as follows:

/usr/bin/su - username -c "commandline"

Unless root owns the binaries, its safer to start the product up that way, but follow the tomcat guidelines, not this post for working on this issue.

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
Karl Balsmeier
Advisor

Re: Tomcat not starting on reboot

Janet,

I am in a similar situation, -I was wondering if you could give me the info on how to start Tomcat from cron after a scheduled reboot?

In regard to your question, is this the HP version of Tomcat or the Apache version? I am using the Apache version and will forward you any info get today if that's the case : )

-karlski
"Unix is the Net"
JACQUIN Joachim
New Member

Re: Tomcat not starting on reboot

I inserted command "sleep 300" before and after the startup of tomcat and move it to last item to start on boot but with no results.
And environment is the same when tomcat start on the boot and when I start the product manually.
The process java seems to be stopped just after the boot sequence is finished. and if I do init 2 and after init 3 : it works ! but on reboot it doesn't work!
An another idea please?
I use the apache version of tomcat.

Re: Tomcat not starting on reboot

I'm seeing the exact same behaviour but with apache 2.0.45 and tomcat 4.1.24 under hpux 11 and it happens on 4 different servers in my environment. The version of Java we're using is:
java version "1.4.1.02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1.02-030502-13:44)
The possibilities for disaaster boggle the mind!
Mark Greene_1
Honored Contributor

Re: Tomcat not starting on reboot

Tomcat has problems if the java processes are not up and running before Tomcat startup is attempted.

As noted, you may also have to define the environment variables in the start-up scripts, specifically TOMCAT_HOME and JAVA_HOME.

What user are you starting it as? If not as root, try as root and then look at ownership and permissions of the various components (tomcat, java, and the application).

mark
the future will be a lot like now, only later
Terri Roden
New Member

Re: Tomcat not starting on reboot

I am having the same problem exactly! I can run my init.d scripts manually and it starts fine, but during reboot, the process starts and stops. I've followed this thread and all it's suggestions. Has anyone gotton this to work?