Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat socket listening timeouts

We just updated from JDK8 to JDK11 and our Tomcat started reporting this warning (we use Docker image tomcat:9-jre11-slim):

2019-04-17 10:17:35.060 WARNING [:tomcat] org.apache.catalina.core.StandardServer The socket listening for the shutdown command experienced an unexpected timeout [256] milliseconds after the call to accept(). Is this an instance of bug 56684?
java.net.SocketTimeoutException: Accept timed out
    at java.base/java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:458)
    at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:551)
    at java.base/java.net.ServerSocket.accept(ServerSocket.java:519)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:607)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:722)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:668)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

The bug #56684 mentioned in the warning refers to this: https://bz.apache.org/bugzilla/show_bug.cgi?id=56684 - which is probably fixed and not very relevant.

  1. Can we ignore this error? This seems that it is just something internal in Tomcat.
  2. If so, should it be enough to put this in logging.properties?
org.apache.catalina.core.StandardServer = SEVERE
like image 290
Vojtěch Avatar asked Oct 15 '22 16:10

Vojtěch


1 Answers

Bug #56684 is an old one, this could be a (expected ?!) regression since the error message mentions the bug :-P
It's a WARNING about the shutdown socket listening usually on port 8005.

1- The warning can be ignored provided that your method to stop tomcat is working as expected.
2- Unless those messages are spamming your logs I would suggest not to change logging configuration.

As mentioned in the link above shutdown socket can be disabled setting port to -1. That would probably make the warning to go away.

like image 136
LMC Avatar answered Oct 29 '22 15:10

LMC