Excessive ERROR Logs Failed with Spring SockJS and Non-Websocket Transports

We use Spring SockJS with Stomp to send push messages to the browser. While it works fine, but when the client (browser) disconnects, each time we get the ERROR log, because scheduled listening does not work:

11: 11: 18.241 [MessageBroker-1] ERROR [org.springframework.scheduling.support.TaskUtils $ LoggingErrorHandler] - An unexpected error occurred in a scheduled task. org.springframework.web.socket.sockjs.SockJsTransportFailureException: Failed to write content SockJsFrame = 'h'; The nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe on org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame (AbstractSockJsSession.javahaps39) ~ [spring - websocket-4.3.4.RELEASE.jar: 4.3.4.RELEASE] on org.springframework.web.socket.sockjs.transport.session.PollingSockJsSession.writeFrame (PollingSockJsSession.java:82) ~ [spring -websocket-4.3.4 .RELEASE.jar: 4.3.4.RELEASE] at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.sendHeartbeat (AbstractSockJsSession.java:255) ~ [spring -websocket-4.3.4.RELEASE.jar: 4.3.4.RELEASE] on org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession $ HeartbeatTask.run (AbstractSockJsession .java: 451) ~ [spring -websocket-4.3.4.RELEASE.jar: 4.3.4.RELEASE] on org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run (DelegatingErrorHandlingRunnable.java:54) ~ [spring -context- 4.3.4.RELEASE.jar: 4.3.4.RELEASE]run (DelegatingErrorHandlingRunnable.java:54) ~ [spring -context-4.3.4.RELEASE.jar: 4.3.4.RELEASE]run (DelegatingErrorHandlingRunnable.java:54) ~ [spring -context-4.3.4.RELEASE.jar: 4.3.4.RELEASE]

XHR-Polling, websocket . nginx - tomcat 8.0.39. Nginx 499 ( ) , SockJsTransportFailureException

, ? org.springframework.scheduling.support.TaskUtils, .

+4

Source: https://habr.com/ru/post/1665712/


All Articles