0

I'm getting the following error from Tomcat in the stderr log. The error looks like the typical port bind error where another process is already using that port. In the past I could use Process Monitor or netstat -aon and find what process was using it.

However, in the last month or so, I've had multiple servers for different clients get this error and no process in the list is using the port. I'm at a loss. The only way to recover is to restart the whole server (not just Tomcat). Any ideas what could cause this and how to fix it? I've tried searching, but everything I see is to address the typical problem where the port is actually in the list of active processes.

The log excerpt:

01-Aug-2018 18:06:18.994 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-443"]
01-Aug-2018 18:06:18.994 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[org.apache.coyote.http11.Http11Protocol-443]]
 org.apache.catalina.LifecycleException: Failed to initialize component [Connector[org.apache.coyote.http11.Http11Protocol-443]]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:113)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:632)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:655)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:996)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
    ... 12 more
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Unknown Source)
    at sun.nio.ch.Net.bind(Unknown Source)
    at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
    at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1086)
    at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:268)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581)
    at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:68)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:993)
    ... 13 more

Tomcat is running as a standalone app server on port 443. Here are the relevant connectors from server.xml:

<Connector port="80" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="443" />

<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" 
            maxThreads="150" SSLEnabled="true" scheme="https" secure="true" 
            keystoreFile="${catalina.home}\conf\myCert.pfx" keystorePass="myPassword" 
            keystoreType="PKCS12" clientAuth="false" sslProtocol="TLS" />
Ryan
  • 557
  • 10
  • 18
  • 1
    Did you install July security patches from MS? Please see https://stackoverflow.com/questions/51816741/apache-tomcat-8-5-30-application-not-working/51818735#51818735 – suv3ndu Aug 14 '18 at 18:14
  • Yes, they were auto-installed. I'm going to try the patch here http://www.catalog.update.microsoft.com/Search.aspx?q=KB4345424 – Ryan Aug 14 '18 at 19:45

0 Answers0