1

Tomcat shutdown.sh fails with Connection Refused when started as tomcat user instead of root

view story
linux-howto

http://stackoverflow.com – I am on Amazon Linux (RHEL equivalent) and starting Tomcat 7 normally as the tomcat user with sudo -u tomcat /opt/tomcat/bin/startup.sh. Tomcat starts up fine, deploys my application fine and logs the Server Startup in xxx ms message to catalina.out. The application also runs fine. My problem is that I need to shutdown from a build script and running /opt/tomcat/bin/shutdown.sh fails due to the fact that the tomcat shutdown listener is not listening on port 8006 (verified with netstat -a |grep 8006). However if I start Tomcat as root: # /opt/tomcat/bin/startup.sh the shutdown listener is (HowTos)