Spectrum WebTomcat fails to stay running
search cancel

Spectrum WebTomcat fails to stay running

book

Article ID: 380186

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

Launching the WebApp using Start Console in the OC administration web site returns a blank page with no error.

Running commands on the OneClick server CLI to start webtomcat works but the process shuts down right after. It does not remain running.

There is no problem with the tomcat service or the OC administration site.

In the <SPECROOT>/webtomcat/logs/catalina.out file we see an error that states the following.

17-Oct-2024 09:18:30.638 SEVERE [main] org.apache.catalina.core.StandardServer.await Failed to create server shutdown socket on address [localhost] and port [8006] (base port [8006] and offset [0])
    java.net.BindException: Address already in use

Environment

All supported DX NetOps Spectrum OneClick web servers

Cause

With all tomcat and webtomcat services stopped, after confirming none remain running with the command "ps -ef | grep tomcat", we are able to see the following process using port 8006.

root@OC_HOST # ps -ef | grep tomcat
root     1669402 1666487  0 15:10 pts/1    00:00:00 grep --color=auto tomcat
root@OC_HOST # netstat -anp | grep 8006
tcp        0      0 127.0.0.1:8006          0.0.0.0:*               LISTEN      1284/otelcol        
udp        0      0 127.0.0.1:8006          0.0.0.0:*                           1284/otelcol        
root@OC_HOST # 

A different tool, in this instance the otelcol process on the server, is using the shutdown port webtomcat is configured to use.

Resolution

There are two options to resolve this.

  • Shut down the process using port 8006 to allow OneClick to use it, or modify it to use a different port.
  • Configure webtomcat to use a different port that is unused.
    • Port 8007 is often an easy one to use.
    • Ensure nothing else uses the port to be used.
    • This will be overwritten during upgrades. Reset the change post upgrade.
    • Edit the <SPECROOT>/webtomcat/conf/server.xml. Change the port value in this entry.
      • <Server port="8006" shutdown="SHUTDOWN">
    • Save the change and restart tomcat.