Security – How to stop tomcat after changing default shutdown port and shutdown word

javaSecuritytomcat

I modified the server.xml and edited:

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

To something else such as the following to get security by obscurity:

<Server port="8888" shutdown="myCustomShutdown">

However now when I run shutdown.sh I get the error:

java.net.ConnectException: Connection refused (Connection refused)

which makes sense because I changed the port and shutdown command. However I can't find any reference in the .sh files, bin folder, etc. on how to adjust my shutdown.sh script to work with the new settings.

Best Answer

I tested this on Tomcat 8 and it works. Did you first shutdown the tomcat and then changed the port and command ?

If not, restore the port and command settings, shutdown the server and then edit the shutdown settings before restarting it again.