Error "java.net.BindException: Address already in use: JVM_Bind" In Tomcat Logs When Starting Service Desk Services

Document ID : KB000035805
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem:

Not able to start Service Desk. Error in pdm_tomcat logs is the following:

org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:<port>]:
java.net.BindException: Address already in use: JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
    at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:777)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:723)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown aSource)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

Cause:

The port showed in the logs is being used in the server by another process. The process can be:

1) Another tomcat deployment like REST, Federated Search, Visualizer

2) Another Application deployment using the same port. Example: CABI, Service Catalog, Process Automation, etc.

3) The same application that is already running. A ghost javaw.exe process from the same application that is still running and must be killed before start the process again.

 

Resolution:

For Cause 1:

Review the server.xml for each tomcat installation by following the steps below:

1) Go to the server where Service Desk is installed

2) Go to NX_ROOT\bopcfg\www . Each CATALINA_BASE folder is a different tomcat installation.

CATALINA_BASE is for Service Desk

CATALINA_BASE_REST is for REST Services

CATALINA_BASE_SA is for Support Automation

CATALINA_BASE_VIZ is for Visualizer

CATALINA_BASE_FS is for Federated Search

3) Review each server.xml file under conf folder for each tomcat deployment and ensure the port number being used are different for each deployment.

You need to pay attention to the uncommented tags like:

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

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

4) Run pdm_configure to assign the right ports to each deployment

5) Start SDM Services

 

For Cause 2 and 3:

1) Go to the server where you are getting the issue

2) Open a Command Prompt Window and run: netstat -ano | findstr "Port Number"  (Example: netstat -ano | findstr "8080")

The command above will list at least one row with the 8080 port number

3) Go to task manager and locate the process that is running and using the same port number (example: javaw.exe) and kill if necessary. If it's another application, then you would need to configure the other applications to use another port number to avoid port conflicts again