I'm running tomcat 6 on Amazon Linux verson 2015.03 (I believe it's based on Cent OS / RHEL). Every time I run sudo service tomcat6 stop
, a status request still shows tomcat6 (pid <num>) is running...
with a different pid than before.
So, tomcat is configured somewhere to auto restart when it's stopped, presumably to keep the web server running in case the tomcat process dies for any reason.
How can I prevent this auto-restart?
Sorry, I made a mistake. I actually have tomcat8 running on the same machine, which is why I'm trying to disable tomcat6. But the tomcat6 process is not actually running, only the tomcat8 process. However, sudo service tomcat6 status
is telling me it is running, but the pid is lists actually belongs to tomcat8.
I didn't realize this because running sudo service tomcat8 status
gives me OK
, but the pid line is swallowed up somewhere. I had to redirect that commands output to a file to see that the pid for both the tomcat6 and tomcat8 status commands were the same.
So it looks like tomcat6 is not actually running, but the service status
command thinks it is.
/etc/init
that might be respawning it? Anything helpful in/var/log/messages
to indicate what is starting tomcat?/etc/init.d/tomcat6
. Should I move it somewhere else, or is there a command for disabling it properly, provided that's the reason for the restarts.../var/log/messages
shows nothing when I stop tomcat. There's nothing related to the server stop or restart in any of the logs under/var/log/tomcat6
either./etc/init.d/
, but in/etc/init/
. Also runps -f $(pgrep tomcat)
and see what the parent process is. Also runchkconfig tomcat6 off
to prevent it from starting after a reboot.