Determining which process is opening the Tomcat (Catalina) port causing Invalid Shutdown Command warnings in the cataling log file.

book

Article ID: 1000766284

calendar_today

Updated On:

Description

There are several technotes created in the past that help resolve issues when seeing the Invalid Shutdown Command warning message in the catalina log file.  If having a problem getting to the eDiscovery Platform (eDP) login page, then those technotes are a good place to start.  This technote is more specific on how to detect any process opening the Tomcat shutdown port which can cause the warning to show up in the catalina log.

IMPORTANT NOTE:  Ports are changeable.  This technote will use the 8005 which is the default Tomcat shutdown port.  All details of this technote are still valid other than maybe the port number is different if it has been changed.

Cause

Any process that opens the Tomcat (Catalina) shutdown port can cause the warnings to show in the catalina log file.  In fact, the Clearwell Commander tool will keep checking keep checking this port every couple seconds if running.  Therefore, if this warning is shown in the catalina log and eDP is working as expected check first if Clearwell Commander is running and if so, exit the program and see if the message stops.

From Catalina Log:
31-Aug-2026 15:02:02.834 WARNING [main] org.apache.catalina.core.StandardServer.await Invalid shutdown command [] received
31-Aug-2026 15:02:04.737 WARNING [main] org.apache.catalina.core.StandardServer.await Invalid shutdown command [] received
31-Aug-2026 15:02:06.830 WARNING [main] org.apache.catalina.core.StandardServer.await Invalid shutdown command [] received
31-Aug-2026 15:02:08.730 WARNING [main] org.apache.catalina.core.StandardServer.await Invalid shutdown command [] received
31-Aug-2026 15:02:10.688 WARNING [main] org.apache.catalina.core.StandardServer.await Invalid shutdown command [] received
...


If a process writes anything to the port, it will be displayed as a string between the two brackets [].  The above example is caused by a process just opening and closing the port over and over and not trying to communicate anything to the port because the brackets are empty.  Example:  If a program were to open the Tomcat port and writes the text TEST123 to the port a message like the one below would be seen:
31-Aug-2026 15:02:10.688 WARNING [main] org.apache.catalina.core.StandardServer.await Invalid shutdown command [TEST123] received

If a process is opening a port and closing very quickly this can be very difficult to detect using Windows Task Manager or commands like netstat -ano | findstr 8005 because once the port is closed in that split second the port will go into a TIME_WAIT state and now be owned by the system task which has a process ID (PID) of 0.  Here is an example output showing this using the netstat command:
  TCP    127.0.0.1:60580        127.0.0.1:8005         TIME_WAIT       0
  TCP    127.0.0.1:60585        127.0.0.1:8005         TIME_WAIT       0
  TCP    127.0.0.1:60592        127.0.0.1:8005         TIME_WAIT       0
  TCP    127.0.0.1:60607        127.0.0.1:8005         TIME_WAIT       0
  TCP    127.0.0.1:60616        127.0.0.1:8005         TIME_WAIT       0

The above information is not useful.  It is preferred to determine which process is actually opening and closing the port before the system takes ownership.

Resolution

Use the Microsoft SysInternals tool called Process Monitor (ProcMon).  This tool is free to download and use.  And then follow these steps:

  1.  Start Procmon
  2.  Stop the capture if running (Ctrl + E).  You can tell if capturing is running at bottom left of window because number of events will be going up.
  3.  Clear the captured events (Ctrl + X)
  4.  Go into Filter (Ctrl+L)
  5.  Filter 1: Path Contains 8005 Include, then click Add
  6.  Filter 2: Operation Is TCP Connect Include, then click Add
  7.  Start the capture (Ctrl + E)

If running on the server having the issue we should then start seeing which process is making the connection.

Screenshot of Procmon filters:

image.png

The screenshot below is procmon after detecting a process opening the port.  Double click the line which will popup a dialog window, go to the Process tab to see details about the process that opened the port:

image.png

These steps work because ProcMon has been configured with filters that will only show an event when a process is specifically opening the port, not the system PID which very quickly takes ownership.  Additionally, the image above is example of Clearwell Commander running which is the javaw.exe process running the Myrmidon-2.2.jar file.

Issue/Introduction

How to determine which process is opening the Tomcat (Catalina) shutdown port.