P Yoga Prudhvi
P Yoga Prudhvi

Reputation: 147

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.

Upvotes: 8

Views: 19894

Answers (3)

vrushti306
vrushti306

Reputation: 1

Part 1: In server.xml: ( C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\server.xml )

Change line:

<Server port="-1" shutdown="SHUTDOWN">

to:

<Server port="${port.shutdown}" shutdown="SHUTDOWN">

Part 2: In VS code, after configurating Tomcat server, right click on that added Tomcat on the left explorer panel and select "Open Server Configuration" from the list of options.

In that Xml file, change the same line (as mentioned above).

Change the line in both files to start and shut Tomcat server from VS Code.

This solution worked for me in VS code.

Upvotes: 0

Taron
Taron

Reputation: 319

In server.xml, like:

C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\server.xml

the line:

<Server port="-1" shutdown="SHUTDOWN">

change to:

<Server port="${port.shutdown}" shutdown="SHUTDOWN">

Upvotes: 2

Pandurang
Pandurang

Reputation: 1741

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.

Upvotes: 16

Related Questions