容器部署,app.log中一直在报空指针异常(NioEndpoint.java:1163)

现象:本地运行程序不会有类似报错,容器部署app.log里就一直报这个错误:
(程序可以正常运行,但是日志里一直在报这个错,IP地址已做处理)
2022-05-10 13:47:49.249 DEBUG 20 --- [nio-8080-exec-3] o.apache.coyote.http11.Http11Processor : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@90625b4:org.apache.tomcat.util.net.NioChannel@77f4932a:java.nio.channels.SocketChannel[connected local=/x.x.x.x:8080 remote=/x.x.x.x:47250]], Status in: [OPEN_READ], State out: [CLOSED]
2022-05-10 13:47:49.249 okr [http-nio-8080-exec-3] DEBUG o.a.coyote.http11.Http11Processor 10.194.8.103 - Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@90625b4:org.apache.tomcat.util.net.NioChannel@77f4932a:java.nio.channels.SocketChannel[connected local=/x.x.x.x:8080 remote=/x.x.x.x:47250]], Status in: [OPEN_READ], State out: [CLOSED]
2022-05-10 13:47:49.250 DEBUG 20 --- [nio-8080-exec-3] org.apache.tomcat.util.net.NioEndpoint : Calling [org.apache.tomcat.util.net.NioEndpoint@1de9b505].closeSocket([org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@90625b4:org.apache.tomcat.util.net.NioChannel@77f4932a:java.nio.channels.SocketChannel[connected local=/x.x.x.x:8080 remote=/x.x.x.x:47250]])

java.lang.Exception: null

    at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doClose(NioEndpoint.java:1163)

at org.apache.tomcat.util.net.SocketWrapperBase.close(SocketWrapperBase.java:402)

at org.apache.tomcat.util.net.NioEndpoint$Poller.cancelledKey(NioEndpoint.java:665)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1582)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)


看着像是宿主机socketChannel来关闭容器中的连接时报空指针了

尝试加上以下配置并不能解决问题
server.tomcat.max-http-form-post-size=31457280

server.max-http-header-size=10KB

server.ssl.enabled=false

以上是 容器部署,app.log中一直在报空指针异常(NioEndpoint.java:1163) 的全部内容, 来源链接: utcz.com/p/944433.html

回到顶部