【问题标题】:Spring integration unable to find outbound socket errorSpring集成无法找到出站套接字错误
【发布时间】:2016-06-15 02:14:38
【问题描述】:

处理从特定服务器响应收到的请求后。
但是出现“无法找到出站套接字”错误。

错误信息是...

2016-06-15 10:06:41.784 ERROR 5916 --- [task-scheduler-6] o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessageHandlingException: Unable to find outbound socket
at org.springframework.integration.ip.tcp.TcpSendingMessageHandler.handleMessageInternal(TcpSendingMessageHandler.java:113)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78)
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:101)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97)
....
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

调试日志是...

2016-06-15 10:06:41.773 DEBUG 5916 --- [task-scheduler-6] o.s.integration.channel.DirectChannel    : preSend on channel 'flowForConvertingPlainJsonToBytes.channel#2', message: GenericMessage [payload=byte[201], headers={json__ContentTypeId__=class java.lang.String, json__TypeId__=class java.util.HashMap, ip_tcp_remotePort=62114, ip_connectionId=192.168.3.96:62114:5001:9f5bfc60-9e72-44e8-813d-2884b2e12ae1, ip_address=192.168.3.96, id=6dccdee4-7edd-d9bc-c0ac-aa58ebd8a6c7, json__KeyTypeId__=class java.lang.String, contentType=application/json, ip_hostname=192.168.3.96, timestamp=1465952801773}]
2016-06-15 10:06:41.775 DEBUG 5916 --- [task-scheduler-6] o.s.i.ip.tcp.TcpSendingMessageHandler    : plainHandler received message: GenericMessage [payload=byte[201], headers={json__ContentTypeId__=class java.lang.String, json__TypeId__=class java.util.HashMap, ip_tcp_remotePort=62114, ip_connectionId=192.168.3.96:62114:5001:9f5bfc60-9e72-44e8-813d-2884b2e12ae1, ip_address=192.168.3.96, id=6dccdee4-7edd-d9bc-c0ac-aa58ebd8a6c7, json__KeyTypeId__=class java.lang.String, contentType=application/json, ip_hostname=192.168.3.96, timestamp=1465952801773}]
2016-06-15 10:06:41.778 ERROR 5916 --- [task-scheduler-6] o.s.i.ip.tcp.TcpSendingMessageHandler    : Unable to find outbound socket for GenericMessage [payload=byte[201], headers={json__ContentTypeId__=class java.lang.String, json__TypeId__=class java.util.HashMap, ip_tcp_remotePort=62114, ip_connectionId=192.168.3.96:62114:5001:9f5bfc60-9e72-44e8-813d-2884b2e12ae1, ip_address=192.168.3.96, id=6dccdee4-7edd-d9bc-c0ac-aa58ebd8a6c7, json__KeyTypeId__=class java.lang.String, contentType=application/json, ip_hostname=192.168.3.96, timestamp=1465952801773}]
2016-06-15 10:06:41.780 DEBUG 5916 --- [task-scheduler-6] o.s.i.channel.PublishSubscribeChannel    : preSend on channel 'errorChannel', message: ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: Unable to find outbound socket, headers={id=152129a7-062a-409b-2f2d-7c5843ba8296, timestamp=1465952801780}]
2016-06-15 10:06:41.782 DEBUG 5916 --- [task-scheduler-6] o.s.integration.handler.LoggingHandler   : (inner bean)#8c49d03 received message: ErrorMessage [payload=org.springframework.messaging.MessageHandlingException: Unable to find outbound socket, headers={id=152129a7-062a-409b-2f2d-7c5843ba8296, timestamp=1465952801780}]

ip_connectionId 存在。有什么问题?

【问题讨论】:

    标签: spring sockets spring-integration


    【解决方案1】:

    相应的套接字已关闭,或者您正在发送到与错误连接工厂关联的出站适配器。

    DEBUG 日志记录应该对您有所帮助。

    此外,在提出此类问题时,您应该始终包含您的配置。

    【讨论】:

    • 我们很高兴看到你现在很好,但真的会更好地与所有其他人分享解决方案以提供帮助
    猜你喜欢
    • 2012-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-24
    • 2020-11-27
    • 2013-02-13
    • 2011-03-21
    • 2017-06-23
    相关资源
    最近更新 更多