3

这必须与负载有关,但没有警告或错误 SimpleBrokerMessageHandler - 处理 DISCONNECT 开始发生在一定数量的同时连接之上。我已经尝试过跟踪日志记录,但我仍然看不到会话关闭的原因。但是,即使少一个客户端连接,测试也能顺利进行。

这是一个非常标准的 spring framework 4 websocket STOMP 应用程序,除了我为入站、出站和代理通道配置了 reactor-spring RingBufferAsyncTaskExecutor。我使用的是简单代理,因为目前我总是只回复 websocket 会话的连接客户端,即:org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - 广播到 1 个会话。

这是日志的一部分,一切看起来都很正常,然后所有 websocket 会话都断开连接,我的客户端自动尝试重新连接,但他们无法连接。是否在某个地方设置了限制,或者有更多春季经验的人知道问题出在哪里?

DEBUG: org.springframework.messaging.simp.user.UserDestinationMessageHandler - Translated /user/loadtest-31/queue/results -> [/queue/results-user5f]
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing MESSAGE destination=/queue/results-user5f session=null payload={"serialNumber":"loadtest-31","timestamp":1417095684735,"action":"ChecksumAndFil...(truncated)
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Broadcasting to 1 sessions.
TRACE: org.springframework.messaging.simp.stomp.StompEncoder - Encoding STOMP MESSAGE, headers={contentType=[application/json], destination=[/user/queue/results], content-type=[application/json;charset=UTF-8], subscription=[sub-0], message-id=[5f-62]}.
TRACE: org.springframework.web.socket.adapter.NativeWebSocketSession - Sending TextMessage payload= MESSAGE co.., byteCount=908, last=true], StandardWebSocketSession[id=5f, uri=/xxxxxx/wscon]
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Searching methods to handle SEND /app/isenabled session=5e
TRACE: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Found 1 methods: [{[/isenabled],messageType=[MESSAGE]}]
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Invoking com.xxxxx.controller.StompController#executeCheckEnabled[2 args]
TRACE: org.springframework.messaging.handler.HandlerMethod - Resolved arguments: [Message [serialNumber=null, timestamp=0, action=IsEnabled, actionDescription=null, actionMsg=null, origin=CLIENT, destinationUrl=null], com.xxxxx.websocket.DaemonHandshakeHandler$1@5f3f9317]
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Searching methods to handle SEND /app/licfileverify session=5e
TRACE: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Found 1 methods: [{[/licfileverify],messageType=[MESSAGE]}]
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Invoking com.xxxxx.controller.StompController#executeVerify[2 args]
TRACE: org.springframework.messaging.handler.HandlerMethod - Resolved arguments: [Message [serialNumber=null, timestamp=0, action=ChecksumAndFileSize, actionDescription=null, actionMsg=null, origin=CLIENT, destinationUrl=null], com.xxxxx.websocket.DaemonHandshakeHandler$1@5f3f9317]
DEBUG: org.springframework.messaging.simp.user.UserDestinationMessageHandler - Translated /user/loadtest-23/queue/results -> [/queue/results-user5e]
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing MESSAGE destination=/queue/results-user5e session=null payload={"serialNumber":"loadtest-23","timestamp":1417095684777,"action":"ChecksumAndFil...(truncated)
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Broadcasting to 1 sessions.
TRACE: org.springframework.messaging.simp.stomp.StompEncoder - Encoding STOMP MESSAGE, headers={contentType=[application/json], destination=[/user/queue/results], content-type=[application/json;charset=UTF-8], subscription=[sub-0], message-id=[5e-63]}.
TRACE: org.springframework.web.socket.adapter.NativeWebSocketSession - Sending TextMessage payload= MESSAGE co.., byteCount=908, last=true], StandardWebSocketSession[id=5e, uri=/xxxxxx/wscon]
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Searching methods to handle SEND /app/licfileverify session=62
TRACE: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Found 1 methods: [{[/licfileverify],messageType=[MESSAGE]}]
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Invoking com.xxxxx.controller.StompController#executeVerify[2 args]
TRACE: org.springframework.messaging.handler.HandlerMethod - Resolved arguments: [Message [serialNumber=null, timestamp=0, action=ChecksumAndFileSize, actionDescription=null, actionMsg=null, origin=CLIENT, destinationUrl=null], com.xxxxx.websocket.DaemonHandshakeHandler$1@38374ae2]
DEBUG: org.springframework.messaging.simp.user.UserDestinationMessageHandler - Translated /user/loadtest-25/queue/results -> [/queue/results-user62]
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing MESSAGE destination=/queue/results-user62 session=null payload={"serialNumber":"loadtest-25","timestamp":1417095684808,"action":"ChecksumAndFil...(truncated)
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Broadcasting to 1 sessions.
TRACE: org.springframework.messaging.simp.stomp.StompEncoder - Encoding STOMP MESSAGE, headers={contentType=[application/json], destination=[/user/queue/results], content-type=[application/json;charset=UTF-8], subscription=[sub-0], message-id=[62-64]}.
TRACE: org.springframework.web.socket.adapter.NativeWebSocketSession - Sending TextMessage payload= MESSAGE co.., byteCount=908, last=true], StandardWebSocketSession[id=62, uri=/xxxxxx/wscon]
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=4f, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 4f
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=4f
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=59, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 59
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=59
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=62, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 62
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=62
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=4d, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 4d
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=4d
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=65, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 65
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=65
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=4a, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 4a
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=4a
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=47, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 47
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=47
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=58, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 58
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=58
TRACE: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - Handling TextMessage payload= -----BEGIN.., byteCount=800, last=true] in StandardWebSocketSession[id=45, uri=/xxxxxx/wscon]
TRACE: org.springframework.messaging.simp.stomp.StompDecoder - Decoded SEND {destination=[/app/licfileverify]} session=null
TRACE: org.springframework.web.socket.messaging.StompSubProtocolHandler - From client: SEND /app/licfileverify session=null
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=45, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 45
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Searching methods to handle SEND /app/licfileverify session=45
TRACE: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Found 1 methods: [{[/licfileverify],messageType=[MESSAGE]}]
DEBUG: org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler - Invoking com.xxxxx.controller.StompController#executeVerify[2 args]
TRACE: org.springframework.messaging.handler.HandlerMethod - Resolved arguments: [Message [serialNumber=null, timestamp=0, action=ChecksumAndFileSize, actionDescription=null, actionMsg=null, origin=CLIENT, destinationUrl=null], com.xxxxx.websocket.DaemonHandshakeHandler$1@1d8deca5]
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=5a, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 5a
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=61, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 61

TRACE: org.springframework.messaging.simp.user.UserDestinationMessageHandler - No user destinations found for /user/loadtest-34/queue/results
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=45
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=5a
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=61
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=67, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 67
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=67
TRACE: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - Handling TextMessage payload= CONNECT he.., byteCount=56, last=true] in StandardWebSocketSession[id=49, uri=/xxxxxx/wscon]
TRACE: org.springframework.messaging.simp.stomp.StompDecoder - Decoded CONNECT {heart-beat=[10000,10000], accept-version=[1.1,1.0]} session=null
TRACE: org.springframework.web.socket.messaging.StompSubProtocolHandler - From client: CONNECT session=null
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=49, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 49
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing CONNECT user=loadtest-4 session=49
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - No session for GenericMessage [payload=byte[540], headers={simpMessageType=CONNECT_ACK, simpConnectMessage=GenericMessage [payload=byte[0], headers={stompCommand=CONNECT, nativeHeaders={heart-beat=[10000,10000], accept-version=[1.1,1.0]}, simpSessionAttributes={org.springframework.messaging.simp.SimpAttributes.COMPLETED=true}, simpMessageType=CONNECT, simpUser=com.xxxxx.websocket.DaemonHandshakeHandler$1@68c2e436, simpSessionId=49}], simpSessionId=49}]
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=49
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=56, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 56
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=56
DEBUG: org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator - StandardWebSocketSession[id=4c, uri=/xxxxxx/wscon] closed with CloseStatus[code=1001, reason=Shutdown]
DEBUG: org.springframework.web.socket.messaging.SubProtocolWebSocketHandler - Clearing session 4c
DEBUG: org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler - Processing DISCONNECT session=4c
4

0 回答 0