Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

For some reason every time I stop a second instance of httpd using

/usr/sbin/httpd -f /otherplace/httpd.conf -k stop

One or two of my tomcat instances are killed (taken out of memory), without giving any errors or trace of what is happening.

I started this second instance using the following command:

/usr/sbin/httpd -f /otherplace/httpd.conf -k start

The details below:

My Tomcat instances bind to port 80 on different IPs. The second instance of httpd binds to port 5634 (nothing is binding to this port). There are instaces of tomcat that they don't get killed, is like a random thing.

Thanks for your help.

share|improve this question

3 Answers 3

Maybe try changing the default SHUTDOWN command from server.xml

<Server port="8005" shutdown="SHUTDOWN" debug="0">

to something like

<Server port="8005" shutdown="0fbb9aebcbfbef203eca71b6be367859" debug="0">

Anything that sends "SHUTDOWN" to the default port will stop tomcat, maybe your httpd is sending it through the connector or something. reference 1, reference 2

share|improve this answer
    
I try changing the shutdown command as described above and that did not help. I will keep looking how to solve the issue. Thanks for your help. –  Geo Jun 29 '09 at 23:36

Apache has a module that can forward requests to tomcat. Is this module enabled? Try disabling it if you don't need it.

share|improve this answer
    
The module is not enabled on this httpd.conf file. –  Geo Jun 29 '09 at 23:36

Not saying I know specifically how tomcat performs shutdowns... I would expect a pidfile associated with the process, or a control port that tells the application to shutdown.

Barring those, however, it's common for scripts to 'hunt-and-kill' by looking at 'ps -ef' output (or similar). In these cases, it's easy for the kill scripts to be too aggressive and kill off all matching pids (or just the parents of those pids).

Cant tell you how many times I've been editing a script in 'vi' only to be killed off by an aggressive 'stop' command someplace.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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