Updated on 2023-05-26 GMT+08:00

Stopping Failed

Symptoms

For a Windows host, after you set Operation to Stop in the action Start/Stop Tomcat, the error message org.apache.catalina.startup.Catalina.stopServer Could not contact [localhost:[****]. Tomcat may not be running. is displayed.

Cause Analysis

If Service Shutdown Port (used to listen to and shut down the port for the Tomcat service) is changed when Operation is set to Start (start command) in the Start/Stop Tomcat deployment action, the shutdown port in the Tomcat server.xml file is updated accordingly. If these two shutdown ports are different, the command for stopping Tomcat will fail to be deployed.

Solution

Log in to the host, go to Tomcat installation path/conf, find the server.xml file, change its shutdown port number to that configured in the latest Start/Stop Tomcat action with Operation set to Start, and perform the deployment again.

Starting or Stopping Tomcat FAQs

more