Search code examples
tomcatservletsserver

How to shutdown Apache Tomcat9.0 server


While starting the server using startup the cmd code is something like this.

C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin>startup
Using CATALINA_BASE:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_192"
Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\tomcat-juli.jar"

**And while shutting it down using shutdown its not happening,on cmd it's like this.

C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin>shutdown
Using CATALINA_BASE:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_192"
Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\tomcat-juli.jar"
15-Jul-2020 15:03:51.192 SEVERE [main] org.apache.catalina.startup.Catalina.stopServer No shutdown port configured. Shut down server through OS signal. Server not shut down.

And as usual my server is running on chrome, EVEN when I'had stopped it on Services Can anyone tell me the solution for this.


Solution

  • Could you please confirm are you using Shutdown port or not? Make sure that you are using shutdown port in server.xml i.e

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

    Why have a shutdown port in Tomcat? Please refer for more information.