Spring websocket SockJsTransportFailureException
Spring websocket SockJsTransportFailureException
我有一个 spring websocket 聊天应用程序。在一些客户端我得到这个异常并且不知道为什么 websocket 没有连接并且 sockjs 更改为 xhr-stream 并且再次不起作用,所有客户端都有防病毒软件但其中一些有这个问题
这是我的堆栈跟踪,exception.when 我取消选中防病毒(kasper 或 mcafee)应用程序中的 Web 控制工作正常
2017-09-11 14:14:02 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - Transport error in WebSocketServerSockJsSession[id=mb2cmebn]
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1200)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.isReadyForRead(NioEndpoint.java:1127)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:58)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
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:748)
2017-09-11 14:14:02 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - Transport error in WebSocketServerSockJsSession[id=mb2cmebn]
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1200)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.isReadyForRead(NioEndpoint.java:1127)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:58)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
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:748)
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.s.PollingSockJsSession - Closing SockJS session mgnwddzq with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.s.PollingSockJsSession - Closing SockJS session mgnwddzq with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - PollingSockJsSession[id=mgnwddzq] closed with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - PollingSockJsSession[id=mgnwddzq] closed with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session mgnwddzq
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session mgnwddzq
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - No session for GenericMessage [payload=byte[20], headers={simpMessageType=MESSAGE, simpSubscriptionId=sub-2, contentType=application/json;charset=UTF-8, simpSessionId=mgnwddzq, simpDestination=/topic/chat.logout}]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - No session for GenericMessage [payload=byte[20], headers={simpMessageType=MESSAGE, simpSubscriptionId=sub-2, contentType=application/json;charset=UTF-8, simpSessionId=mgnwddzq, simpDestination=/topic/chat.logout}]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Closed 4 sessions: [31ukapyw, mgnwddzq, mb2cmebn, athpga4b]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Closed 4 sessions: [31ukapyw, mgnwddzq, mb2cmebn, athpga4b]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - No session for GenericMessage [payload=byte[0], headers={simpMessageType=DISCONNECT_ACK, simpDisconnectMessage=GenericMessage [payload=byte[0], headers={simpMessageType=DISCONNECT, stompCommand=DISCONNECT, simpSessionAttributes={org.springframework.messaging.simp.SimpAttributes.COMPLETED=true, IP_ADDRESS=/192.168.10.50:59361}, simpUser=org.springframework.security.authentication.UsernamePasswordAuthenticationToken@16b7d64a: Principal: org.baharan.framework.model.security.User@1; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: 192.168.10.50; SessionId: DDDB2D8563900925478C6DEB570453EE; Granted Authorities: ROLE_8501 ROLE_8305, ROLE_8304, ROLE_8306, simpSessionId=mgnwddzq}]
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122891077
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122891077
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:28 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122916144
2017-09-11 14:14:28 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122916144
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:42 INFO o.a.coyote.http11.Http11Processor - An error occurred in processing while on a non-container thread. The connection will be closed immediately
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1221)
at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:451)
at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:441)
at org.apache.coyote.http11.Http11OutputBuffer.flushBuffer(Http11OutputBuffer.java:514)
at org.apache.coyote.http11.Http11OutputBuffer.flush(Http11OutputBuffer.java:243)
at org.apache.coyote.http11.Http11Processor.flush(Http11Processor.java:1494)
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:284)
at org.apache.coyote.Response.action(Response.java:167)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:336)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:303)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:541)
at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:312)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at org.springframework.http.server.ServletServerHttpResponse.flush(ServletServerHttpResponse.java:96)
at org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession.writeFrameInternal(AbstractHttpSockJsSession.java:365)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:322)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.sendHeartbeat(AbstractSockJsSession.java:255)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession$HeartbeatTask.run(AbstractSockJsSession.java:451)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
2017-09-11 14:14:42 DEBUG o.s.w.s.sockjs.DisconnectedClient - Looks like the client has gone away: ; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine (For full stack trace, set the 'org.springframework.web.socket.sockjs.DisconnectedClient' log category to TRACE level)
2017-09-11 14:14:42 DEBUG o.s.w.s.sockjs.DisconnectedClient - Looks like the client has gone away: ; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine (For full stack trace, set the 'org.springframework.web.socket.sockjs.DisconnectedClient' log category to TRACE level)
2017-09-11 14:14:42 DEBUG o.s.w.s.s.t.h.HtmlFileTransportHandler$HtmlFileStreamingSockJsSession - Closing SockJS session eupikcmr with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.s.t.h.HtmlFileTransportHandler$HtmlFileStreamingSockJsSession - Closing SockJS session eupikcmr with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - HtmlFileStreamingSockJsSession[id=eupikcmr] closed with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - HtmlFileStreamingSockJsSession[id=eupikcmr] closed with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session eupikcmr
2017-09-11 14:14:42 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session eupikcmr
2017-09-11 14:14:42 ERROR o.s.s.s.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task.
org.springframework.web.socket.sockjs.SockJsTransportFailureException: Failed to write SockJsFrame content='h'; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:339)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.sendHeartbeat(AbstractSockJsSession.java:255)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession$HeartbeatTask.run(AbstractSockJsSession.java:451)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:340)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:303)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:541)
at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:312)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at org.springframework.http.server.ServletServerHttpResponse.flush(ServletServerHttpResponse.java:96)
at org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession.writeFrameInternal(AbstractHttpSockJsSession.java:365)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:322)
... 10 common frames omitted
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1221)
at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:451)
at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:441)
at org.apache.coyote.http11.Http11OutputBuffer.flushBuffer(Http11OutputBuffer.java:514)
at org.apache.coyote.http11.Http11OutputBuffer.flush(Http11OutputBuffer.java:243)
at org.apache.coyote.http11.Http11Processor.flush(Http11Processor.java:1494)
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:284)
at org.apache.coyote.Response.action(Response.java:167)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:336)
... 21 common frames omitted
测试一些东西后我发现 pace.js 造成了这个问题,主要原因不是杀毒软件,我将 pace 配置更改为此
Pace.options = {
ajax: {
trackWebSockets: true,
ignoreURLs: ['/rest/websocket/chat']
}
}
我有一个 spring websocket 聊天应用程序。在一些客户端我得到这个异常并且不知道为什么 websocket 没有连接并且 sockjs 更改为 xhr-stream 并且再次不起作用,所有客户端都有防病毒软件但其中一些有这个问题 这是我的堆栈跟踪,exception.when 我取消选中防病毒(kasper 或 mcafee)应用程序中的 Web 控制工作正常
2017-09-11 14:14:02 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - Transport error in WebSocketServerSockJsSession[id=mb2cmebn]
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1200)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.isReadyForRead(NioEndpoint.java:1127)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:58)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
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:748)
2017-09-11 14:14:02 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - Transport error in WebSocketServerSockJsSession[id=mb2cmebn]
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:147)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1200)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.isReadyForRead(NioEndpoint.java:1127)
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:58)
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
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:748)
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.s.PollingSockJsSession - Closing SockJS session mgnwddzq with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.s.PollingSockJsSession - Closing SockJS session mgnwddzq with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - PollingSockJsSession[id=mgnwddzq] closed with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - PollingSockJsSession[id=mgnwddzq] closed with CloseStatus[code=3000, reason=Go away!]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session mgnwddzq
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session mgnwddzq
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - No session for GenericMessage [payload=byte[20], headers={simpMessageType=MESSAGE, simpSubscriptionId=sub-2, contentType=application/json;charset=UTF-8, simpSessionId=mgnwddzq, simpDestination=/topic/chat.logout}]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - No session for GenericMessage [payload=byte[20], headers={simpMessageType=MESSAGE, simpSubscriptionId=sub-2, contentType=application/json;charset=UTF-8, simpSessionId=mgnwddzq, simpDestination=/topic/chat.logout}]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Closed 4 sessions: [31ukapyw, mgnwddzq, mb2cmebn, athpga4b]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Closed 4 sessions: [31ukapyw, mgnwddzq, mb2cmebn, athpga4b]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - No session for GenericMessage [payload=byte[0], headers={simpMessageType=DISCONNECT_ACK, simpDisconnectMessage=GenericMessage [payload=byte[0], headers={simpMessageType=DISCONNECT, stompCommand=DISCONNECT, simpSessionAttributes={org.springframework.messaging.simp.SimpAttributes.COMPLETED=true, IP_ADDRESS=/192.168.10.50:59361}, simpUser=org.springframework.security.authentication.UsernamePasswordAuthenticationToken@16b7d64a: Principal: org.baharan.framework.model.security.User@1; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: 192.168.10.50; SessionId: DDDB2D8563900925478C6DEB570453EE; Granted Authorities: ROLE_8501 ROLE_8305, ROLE_8304, ROLE_8306, simpSessionId=mgnwddzq}]
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:03 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122891077
2017-09-11 14:14:03 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122891077
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:03 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/app/rest/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /websocket/chat/927/1v3b22u1/xhr
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/websocket/chat/927/1v3b22u1/xhr]
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Matching patterns for request [/websocket/chat/927/1v3b22u1/xhr] are [/websocket/chat/**]
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - URI Template variables for request [/websocket/chat/927/1v3b22u1/xhr] are {}
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:28 DEBUG o.s.w.s.s.s.WebSocketHandlerMapping - Mapping [/websocket/chat/927/1v3b22u1/xhr] to HandlerExecutionChain with handler [org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler@14258421] and 1 interceptor
2017-09-11 14:14:28 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122916144
2017-09-11 14:14:28 DEBUG o.s.w.s.s.t.h.DefaultSockJsService - Processing transport request: POST http://192.168.10.70:8088/app/rest/websocket/chat/927/1v3b22u1/xhr?t=1505122916144
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:28 DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2017-09-11 14:14:42 INFO o.a.coyote.http11.Http11Processor - An error occurred in processing while on a non-container thread. The connection will be closed immediately
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1221)
at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:451)
at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:441)
at org.apache.coyote.http11.Http11OutputBuffer.flushBuffer(Http11OutputBuffer.java:514)
at org.apache.coyote.http11.Http11OutputBuffer.flush(Http11OutputBuffer.java:243)
at org.apache.coyote.http11.Http11Processor.flush(Http11Processor.java:1494)
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:284)
at org.apache.coyote.Response.action(Response.java:167)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:336)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:303)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:541)
at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:312)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at org.springframework.http.server.ServletServerHttpResponse.flush(ServletServerHttpResponse.java:96)
at org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession.writeFrameInternal(AbstractHttpSockJsSession.java:365)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:322)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.sendHeartbeat(AbstractSockJsSession.java:255)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession$HeartbeatTask.run(AbstractSockJsSession.java:451)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
2017-09-11 14:14:42 DEBUG o.s.w.s.sockjs.DisconnectedClient - Looks like the client has gone away: ; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine (For full stack trace, set the 'org.springframework.web.socket.sockjs.DisconnectedClient' log category to TRACE level)
2017-09-11 14:14:42 DEBUG o.s.w.s.sockjs.DisconnectedClient - Looks like the client has gone away: ; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine (For full stack trace, set the 'org.springframework.web.socket.sockjs.DisconnectedClient' log category to TRACE level)
2017-09-11 14:14:42 DEBUG o.s.w.s.s.t.h.HtmlFileTransportHandler$HtmlFileStreamingSockJsSession - Closing SockJS session eupikcmr with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.s.t.h.HtmlFileTransportHandler$HtmlFileStreamingSockJsSession - Closing SockJS session eupikcmr with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - HtmlFileStreamingSockJsSession[id=eupikcmr] closed with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.h.LoggingWebSocketHandlerDecorator - HtmlFileStreamingSockJsSession[id=eupikcmr] closed with CloseStatus[code=1011, reason=null]
2017-09-11 14:14:42 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session eupikcmr
2017-09-11 14:14:42 DEBUG o.s.w.s.m.SubProtocolWebSocketHandler - Clearing session eupikcmr
2017-09-11 14:14:42 ERROR o.s.s.s.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task.
org.springframework.web.socket.sockjs.SockJsTransportFailureException: Failed to write SockJsFrame content='h'; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:339)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.sendHeartbeat(AbstractSockJsSession.java:255)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession$HeartbeatTask.run(AbstractSockJsSession.java:451)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:340)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:303)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:541)
at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:312)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:176)
at org.springframework.security.web.util.OnCommittedResponseWrapper.flushBuffer(OnCommittedResponseWrapper.java:158)
at org.springframework.http.server.ServletServerHttpResponse.flush(ServletServerHttpResponse.java:96)
at org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession.writeFrameInternal(AbstractHttpSockJsSession.java:365)
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:322)
... 10 common frames omitted
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1221)
at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:451)
at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:441)
at org.apache.coyote.http11.Http11OutputBuffer.flushBuffer(Http11OutputBuffer.java:514)
at org.apache.coyote.http11.Http11OutputBuffer.flush(Http11OutputBuffer.java:243)
at org.apache.coyote.http11.Http11Processor.flush(Http11Processor.java:1494)
at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:284)
at org.apache.coyote.Response.action(Response.java:167)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:336)
... 21 common frames omitted
测试一些东西后我发现 pace.js 造成了这个问题,主要原因不是杀毒软件,我将 pace 配置更改为此
Pace.options = {
ajax: {
trackWebSockets: true,
ignoreURLs: ['/rest/websocket/chat']
}
}