1

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.

3 Answers 3

1

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

1
  • 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, 2009 at 23:36
0

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

1
  • The module is not enabled on this httpd.conf file.
    – Geo
    Jun 29, 2009 at 23:36
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .