我们刚从JDK8更新到JDK11,我们的Tomcat开始报告这个警告(我们使用Docker镜像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)
警告中提到的故障号#56684指的是: https://bz.apache.org/bugzilla/show_bug.cgi?id=56684 - 这个问题可能已经被修复了,不太相关。
- 我们可以忽略这个错误吗?这似乎只是Tomcat内部的事情。
- 如果可以忽略,将这个信息放在
logging.properties
文件中是否足够?
org.apache.catalina.core.StandardServer = SEVERE