- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近正在测试与 Spring 的 tcp ip 通信。我遇到的问题是在从我连接的 IP 接收数据包时发生的。
下面是应用程序(与 DynamicTcpClientApplication 非常相似,出于测试原因,我自己做了一些更改。
我做错了什么,我有一个用于接收消息的适配器,但似乎只有从我的服务器发送的消息不会到达它们。如果我的客户有问题,请告诉我。
这让我头疼......
@SpringBootApplication
@EnableMessageHistory
public class ClientApplication {
public static ConfigurableApplicationContext context;
public static void main(String[] args) throws IOException, InterruptedException {
SpringApplicationBuilder builder = new SpringApplicationBuilder(ClientApplication.class);
builder.headless(false);
context = builder.run(args);
new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
}
@Bean
public ClientConfiguration config() {
File file = new File(Paths.getInstallationFolder() + File.separator + "client.properties");
if (!file.exists())
try {
if (file.createNewFile()) {
Logger.getLogger("Client").warning("Properties not found! New properties created." +
"Please restart the application!");
}
} catch (IOException e) {
e.printStackTrace();
}
try {
return new ClientConfiguration(Paths.getInstallationFolder().getAbsolutePath());
} catch (ConfigurationException | IOException e) {
e.printStackTrace();
return null;
}
}
@Bean(name = PollerMetadata.DEFAULT_POLLER)
public PollerMetadata defaultPoller() {
PollerMetadata pollerMetadata = new PollerMetadata();
pollerMetadata.setTrigger(new PeriodicTrigger(10));
return pollerMetadata;
}
// Client side
@MessagingGateway(defaultRequestChannel = "toTcp.input")
public interface ToTCP {
void send(String data, @Header("host") String host, @Header("port") int port);
}
@Bean
public IntegrationFlow toTcp() {
return f -> f.route(new TcpRouter());
}
@Bean
public TcpNetServerConnectionFactory cf() {
TcpNetServerConnectionFactory factory = new TcpNetServerConnectionFactory(6666);
factory.setSingleUse(false);
ByteArrayCrLfSerializer serializer = (ByteArrayCrLfSerializer) factory.getSerializer();
serializer.setMaxMessageSize(20480);
ByteArrayCrLfSerializer deserializer = (ByteArrayCrLfSerializer) factory.getDeserializer();
deserializer.setMaxMessageSize(20480);
return factory;
}
@Bean
public TcpReceivingChannelAdapter inbound(AbstractServerConnectionFactory cf) {
TcpReceivingChannelAdapter messageHandler = new TcpReceivingChannelAdapter();
messageHandler.setConnectionFactory(cf);
messageHandler.setOutputChannel(outputChannel());
messageHandler.setAutoStartup(true);
messageHandler.start();
return messageHandler;
}
@Bean
public QueueChannel outputChannel() {
return new QueueChannel();
}
@Transformer(inputChannel = "outputChannel", outputChannel = "serviceChannel")
@Bean
public ObjectToStringTransformer transformer() {
return new ObjectToStringTransformer();
}
public static class TcpRouter extends AbstractMessageRouter {
@SuppressWarnings("SpringJavaAutowiringInspection")
@Autowired
private IntegrationFlowContext flowContext;
private final static int MAX_CACHED = 10; // When this is exceeded, we remove the LRU.
@SuppressWarnings("serial")
private final LinkedHashMap<String, MessageChannel> subFlows =
new LinkedHashMap<String, MessageChannel>(MAX_CACHED, .75f, true) {
@Override
protected boolean removeEldestEntry(Map.Entry<String, MessageChannel> eldest) {
if (size() > MAX_CACHED) {
removeSubFlow(eldest);
return true;
} else {
return false;
}
}
};
private MessageChannel createNewSubflow(Message<?> message) {
String host = (String) message.getHeaders().get("host");
Integer port = (Integer) message.getHeaders().get("port");
Assert.state(host != null && port != null, "host and/or port header missing");
String hostPort = host + port;
TcpNetClientConnectionFactory cf = new TcpNetClientConnectionFactory(host, port);
TcpSendingMessageHandler handler = new TcpSendingMessageHandler();
handler.setConnectionFactory(cf);
IntegrationFlow flow = f -> f.handle(handler);
IntegrationFlowRegistration flowRegistration =
this.flowContext.registration(flow)
.addBean(cf)
.id(hostPort + ".flow")
.register();
MessageChannel inputChannel = flowRegistration.getInputChannel();
this.subFlows.put(hostPort, inputChannel);
return inputChannel;
}
private void removeSubFlow(Map.Entry<String, MessageChannel> eldest) {
String hostPort = eldest.getKey();
this.flowContext.remove(hostPort + ".flow");
}
@Override
protected Collection<MessageChannel> determineTargetChannels(Message<?> message) {
MessageChannel channel = this.subFlows
.get(message.getHeaders().get("host", String.class) + message.getHeaders().get("port"));
if (channel == null) {
channel = createNewSubflow(message);
}
return Collections.singletonList(channel);
}
}
}
错误:
2017-11-20 16:54:10.712 WARN 6816 --- [pool-2-thread-1] o.s.i.i.tcp.connection.TcpNetConnection : Unexpected message - no endpoint registered with connection interceptor: 192.168.200.107:6666:46707:a02d3f05-8e32-4215-8130-29c56d25ab36 - GenericMessage [payload=byte[40], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:46707:a02d3f05-8e32-4215-8130-29c56d25ab36, ip_localInetAddress=/192.168.200.88, ip_address=192.168.200.107, id=9031c426-438d-535d-affa-09caa09b9e22, ip_hostname=192.168.200.107, timestamp=1511193250712}]
2017-11-20 16:54:10.712 WARN 6816 --- [pool-2-thread-1] o.s.i.i.tcp.connection.TcpNetConnection : Unexpected message - no endpoint registered with connection interceptor: 192.168.200.107:6666:46707:a02d3f05-8e32-4215-8130-29c56d25ab36 - GenericMessage [payload=byte[0], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:46707:a02d3f05-8e32-4215-8130-29c56d25ab36, ip_localInetAddress=/192.168.200.88, ip_address=192.168.200.107, id=63ff31e2-8f25-8282-fec4-f3c4cfc38cd6, ip_hostname=192.168.200.107, timestamp=1511193250712}]
调试日志:客户端
19:00:35.878 [main] INFO o.s.i.config.IntegrationRegistrar - No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
19:00:35.879 [main] DEBUG o.s.i.config.IntegrationRegistrar - The '#jsonPath' SpEL function cannot be registered: there is no jayway json-path.jar on the classpath.
19:00:35.879 [main] DEBUG o.s.i.config.IntegrationRegistrar - SpEL function '#xpath' isn't registered: there is no spring-integration-xml.jar on the classpath.
19:00:35.949 [main] INFO o.s.i.c.DefaultConfiguringBeanFactoryPostProcessor - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
19:00:35.950 [main] INFO o.s.i.c.DefaultConfiguringBeanFactoryPostProcessor - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
C:\Users\Sebas\<myApp>\client.properties
19:00:36.088 [main] DEBUG o.s.i.h.ServiceActivatingHandler - Unable to attempt conversion of Message payload types. Component 'fileManager.service.serviceActivator.handler' has no explicit ConversionService reference, and there is no 'integrationConversionService' bean within the context.
19:00:36.132 [main] INFO o.s.i.i.t.c.TcpNetServerConnectionFactory - started cf, port=6666
19:00:36.132 [main] INFO o.s.i.i.t.TcpReceivingChannelAdapter - started org.springframework.integration.ip.tcp.TcpReceivingChannelAdapter@2dd29a59
19:00:36.133 [pool-1-thread-1] INFO o.s.i.i.t.c.TcpNetServerConnectionFactory - cf, port=6666 Listening
19:00:36.282 [main] DEBUG o.s.i.c.GlobalChannelInterceptorProcessor - No global channel interceptors.
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component 'inbound'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component 'outputChannel'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component '<myApp>ClientApplication$ToTCP'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component 'errorChannel'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component '_org.springframework.integration.errorLogger'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component '<myApp>ClientApplication.transformer.transformer.handler'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component 'fileManager.service.serviceActivator.handler'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component 'serviceChannel'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component 'toTcp.input'
19:00:36.283 [main] INFO o.s.i.h.MessageHistoryConfigurer - Enabling MessageHistory tracking for component 'de.iutp.<myApp>.<myApp>client.<myApp>ClientApplication$TcpRouter#0'
19:00:36.283 [main] INFO o.s.i.endpoint.EventDrivenConsumer - Adding {service-activator:fileManager.service.serviceActivator} as a subscriber to the 'serviceChannel' channel
19:00:36.283 [main] INFO o.s.i.channel.DirectChannel - Channel 'application.serviceChannel' has 1 subscriber(s).
19:00:36.283 [main] INFO o.s.i.endpoint.EventDrivenConsumer - started fileManager.service.serviceActivator
19:00:36.283 [main] INFO o.s.i.g.GatewayProxyFactoryBean$MethodInvocationGateway - started <myApp>ClientApplication$ToTCP
19:00:36.283 [main] INFO o.s.i.g.GatewayCompletableFutureProxyFactoryBean - started <myApp>ClientApplication$ToTCP
19:00:36.283 [main] INFO o.s.i.endpoint.EventDrivenConsumer - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
19:00:36.283 [main] INFO o.s.i.c.PublishSubscribeChannel - Channel 'application.errorChannel' has 1 subscriber(s).
19:00:36.283 [main] INFO o.s.i.endpoint.EventDrivenConsumer - started _org.springframework.integration.errorLogger
19:00:36.283 [main] INFO o.s.i.endpoint.EventDrivenConsumer - Adding {router} as a subscriber to the 'toTcp.input' channel
19:00:36.283 [main] INFO o.s.i.channel.DirectChannel - Channel 'application.toTcp.input' has 1 subscriber(s).
19:00:36.283 [main] INFO o.s.i.endpoint.EventDrivenConsumer - started org.springframework.integration.config.ConsumerEndpointFactoryBean#0
19:00:36.284 [main] INFO o.s.i.endpoint.PollingConsumer - started <myApp>ClientApplication.transformer.transformer
19:00:37.285 [task-scheduler-1] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:38.296 [task-scheduler-2] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:39.307 [task-scheduler-1] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:40.318 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:41.329 [task-scheduler-2] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:42.341 [task-scheduler-4] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:43.352 [task-scheduler-1] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:44.363 [task-scheduler-5] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:45.374 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:46.385 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:47.396 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:48.407 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:49.419 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:50.430 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:51.441 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:52.453 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:53.297 [Timer-0] DEBUG o.s.i.channel.DirectChannel - preSend on channel 'toTcp.input', message: GenericMessage [payload=64198e68-c701-44ae-856a-f5bf9a765e11::7d670b67-3605-4faa-908f-b9843e227b26::01717546021 ,R-Muehle D_M72.7 keine Silovorwahl
, headers={host=192.168.200.107, history=<myApp>ClientApplication$ToTCP,toTcp.input, id=f70a3c7b-e419-eea5-945b-0531d4acf2e0, port=6666, timestamp=1511200853297}]
19:00:53.302 [Timer-0] INFO o.s.i.endpoint.EventDrivenConsumer - Adding {ip:tcp-outbound-channel-adapter} as a subscriber to the '192.168.200.1076666.flow.input' channel
19:00:53.302 [Timer-0] INFO o.s.i.channel.DirectChannel - Channel 'application.192.168.200.1076666.flow.input' has 1 subscriber(s).
19:00:53.302 [Timer-0] INFO o.s.i.i.t.c.TcpNetClientConnectionFactory - started 192.168.200.1076666.floworg.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory#0, host=192.168.200.107, port=6666
19:00:53.302 [Timer-0] INFO o.s.i.endpoint.EventDrivenConsumer - started org.springframework.integration.config.ConsumerEndpointFactoryBean#1
19:00:53.302 [Timer-0] DEBUG o.s.i.channel.DirectChannel - preSend on channel '192.168.200.1076666.flow.input', message: GenericMessage [payload=64198e68-c701-44ae-856a-f5bf9a765e11::7d670b67-3605-4faa-908f-b9843e227b26::01717546021 ,R-Muehle D_M72.7 keine Silovorwahl
, headers={host=192.168.200.107, history=<myApp>ClientApplication$ToTCP,toTcp.input,de.iutp.<myApp>.<myApp>client.<myApp>ClientApplication$TcpRouter#0, id=0e1ead22-e947-6ae4-bb5c-13b8fa80c5e1, port=6666, timestamp=1511200853297}]
19:00:53.302 [Timer-0] DEBUG o.s.i.i.tcp.TcpSendingMessageHandler - org.springframework.integration.ip.tcp.TcpSendingMessageHandler#0 received message: GenericMessage [payload=64198e68-c701-44ae-856a-f5bf9a765e11::7d670b67-3605-4faa-908f-b9843e227b26::01717546021 ,R-Muehle D_M72.7 keine Silovorwahl
, headers={host=192.168.200.107, history=<myApp>ClientApplication$ToTCP,toTcp.input,de.iutp.<myApp>.<myApp>client.<myApp>ClientApplication$TcpRouter#0, id=0e1ead22-e947-6ae4-bb5c-13b8fa80c5e1, port=6666, timestamp=1511200853297}]
19:00:53.302 [Timer-0] DEBUG o.s.i.i.t.c.TcpNetClientConnectionFactory - Opening new socket connection to 192.168.200.107:6666
19:00:53.464 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:54.475 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:55.486 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:56.497 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:57.509 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:58.520 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:00:58.961 [Timer-0] DEBUG o.s.i.i.t.c.TcpNetConnection - New connection 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a
19:00:58.961 [Timer-0] DEBUG o.s.i.i.t.c.TcpNetClientConnectionFactory - 192.168.200.1076666.floworg.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory#0: Added new connection: 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a
19:00:58.962 [pool-2-thread-1] DEBUG o.s.i.i.t.c.TcpNetConnection - 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a Reading...
19:00:58.962 [pool-2-thread-1] DEBUG o.s.i.i.t.s.ByteArrayCrLfSerializer - Available to read: 0
19:00:58.962 [Timer-0] DEBUG o.s.i.i.tcp.TcpSendingMessageHandler - Got Connection 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a
19:00:58.963 [Timer-0] DEBUG o.s.i.i.t.c.TcpNetConnection - 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a Message sent GenericMessage [payload=64198e68-c701-44ae-856a-f5bf9a765e11::7d670b67-3605-4faa-908f-b9843e227b26::01717546021 ,R-Muehle D_M72.7 keine Silovorwahl
, headers={host=192.168.200.107, history=<myApp>ClientApplication$ToTCP,toTcp.input,de.iutp.<myApp>.<myApp>client.<myApp>ClientApplication$TcpRouter#0, id=0e1ead22-e947-6ae4-bb5c-13b8fa80c5e1, port=6666, timestamp=1511200853297}]
19:00:58.963 [Timer-0] DEBUG o.s.i.channel.DirectChannel - postSend (sent=true) on channel '192.168.200.1076666.flow.input', message: GenericMessage [payload=64198e68-c701-44ae-856a-f5bf9a765e11::7d670b67-3605-4faa-908f-b9843e227b26::01717546021 ,R-Muehle D_M72.7 keine Silovorwahl
, headers={host=192.168.200.107, history=<myApp>ClientApplication$ToTCP,toTcp.input,de.iutp.<myApp>.<myApp>client.<myApp>ClientApplication$TcpRouter#0, id=0e1ead22-e947-6ae4-bb5c-13b8fa80c5e1, port=6666, timestamp=1511200853297}]
19:00:58.963 [Timer-0] DEBUG o.s.i.channel.DirectChannel - postSend (sent=true) on channel 'toTcp.input', message: GenericMessage [payload=64198e68-c701-44ae-856a-f5bf9a765e11::7d670b67-3605-4faa-908f-b9843e227b26::01717546021 ,R-Muehle D_M72.7 keine Silovorwahl
, headers={host=192.168.200.107, history=<myApp>ClientApplication$ToTCP,toTcp.input, id=f70a3c7b-e419-eea5-945b-0531d4acf2e0, port=6666, timestamp=1511200853297}]
19:00:59.214 [pool-2-thread-1] DEBUG o.s.i.i.t.c.TcpNetConnection - Message received GenericMessage [payload=byte[40], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a, ip_localInetAddress=/10.0.8.2, ip_address=192.168.200.107, id=efd1d331-7289-5074-e6e4-d85458d0abae, ip_hostname=192.168.200.107, timestamp=1511200859214}]
19:00:59.215 [pool-2-thread-1] WARN o.s.i.i.t.c.TcpNetConnection - Unexpected message - no endpoint registered with connection interceptor: 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a - GenericMessage [payload=byte[40], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a, ip_localInetAddress=/10.0.8.2, ip_address=192.168.200.107, id=efd1d331-7289-5074-e6e4-d85458d0abae, ip_hostname=192.168.200.107, timestamp=1511200859214}]
19:00:59.215 [pool-2-thread-1] DEBUG o.s.i.i.t.s.ByteArrayCrLfSerializer - Available to read: 2
19:00:59.215 [pool-2-thread-1] DEBUG o.s.i.i.t.c.TcpNetConnection - Message received GenericMessage [payload=byte[0], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a, ip_localInetAddress=/10.0.8.2, ip_address=192.168.200.107, id=a6807249-9f8f-16f1-53e2-e4c1b7076483, ip_hostname=192.168.200.107, timestamp=1511200859215}]
19:00:59.215 [pool-2-thread-1] WARN o.s.i.i.t.c.TcpNetConnection - Unexpected message - no endpoint registered with connection interceptor: 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a - GenericMessage [payload=byte[0], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a, ip_localInetAddress=/10.0.8.2, ip_address=192.168.200.107, id=a6807249-9f8f-16f1-53e2-e4c1b7076483, ip_hostname=192.168.200.107, timestamp=1511200859215}]
19:00:59.215 [pool-2-thread-1] DEBUG o.s.i.i.t.s.ByteArrayCrLfSerializer - Available to read: 0
19:00:59.531 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:01:00.542 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:01:01.553 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:01:02.565 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:01:03.577 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:01:04.588 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
19:01:05.599 [task-scheduler-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
最佳答案
该错误表明连接工厂之一正在接收数据,但没有 TcpListener
。
请编辑问题以附加显示双方的调试日志。
编辑
19:00:59.214 [pool-2-thread-1] DEBUG o.s.i.i.t.c.TcpNetConnection - Message received GenericMessage [payload=byte[40], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a, ip_localInetAddress=/10.0.8.2, ip_address=192.168.200.107, id=efd1d331-7289-5074-e6e4-d85458d0abae, ip_hostname=192.168.200.107, timestamp=1511200859214}]
19:00:59.215 [pool-2-thread-1] WARN o.s.i.i.t.c.TcpNetConnection - Unexpected message - no endpoint registered with connection interceptor: 192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a - GenericMessage [payload=byte[40], headers={ip_tcp_remotePort=6666, ip_connectionId=192.168.200.107:6666:51251:94af931e-65e3-498d-a88b-b7389b1df65a, ip_localInetAddress=/10.0.8.2, ip_address=192.168.200.107, id=efd1d331-7289-5074-e6e4-d85458d0abae, ip_hostname=192.168.200.107, timestamp=1511200859214}]
您的客户端未配置为处理回复。
如果您处于请求/回复场景,则需要使用 TcpOutboundGateway
而不是发送 channel 适配器。
如果要处理任意入站/出站消息,则需要在客户端中使用接收 channel 适配器。
关于java - 意外消息 - 没有使用连接拦截器注册端点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47396262/
我刚开始使用新的拦截方法,有一个基本问题,想知道如何在一个测试中链接下面的两个断言。 cy.intercept('GET', '/states').as('states'); cy.reload(tr
我有一个标签控件的自定义版本(使用用户控件构建)。在设计器中工作时,我想截取 Name 属性的设置(在属性面板中)并使用它来生成 Text 属性。也就是说,如果我在属性面板的 Name 属性中输入“l
嗨,我想通过 soapUI 解析 ssl soap 消息,而我试图通过 HttpMonitor 进行拦截它显示在异常下方 ERROR:Exception in request: javax.net.s
是否有可能从某个任意层拦截反向梯度,修改其值并继续反向传播回到网络的开始,根据您提供的修改后的梯度值更新所有先前层的反向梯度? 我知道你可以directly modify the gradients
我可以从什么 dll 中获得 Intercept 的扩展?我从 http://github.com/danielmarbach/ninject.extensions.interception 添加了
我有一个实现 onCreateOptionsMenu 方法的顶级 TabHost。我希望子 Activity (选项卡内的子 Activity )能够通过 onOptionsItemSelected
我在尝试反序列化 URL 时遇到此错误 Caused by: java.net.MalformedURLException: no protocol: www.boo.com at java.
首先,我是 Spring 的新手,这是我第一次尝试使用 Spring 编写基于 REST 的应用程序。 我计划在请求参数和响应中使用 Json。这让我想到两个问题。 有没有办法将 products="
在我基于 j_security_check 的登录表单中登录时一切正常。在这种情况下,我看到 JSESSIONID cookie 中的路径具有来自 URL 的值。但是当另一个登录页面构造动态表单(它正
我有一个我一直致力于下载文件的程序。一切正常,除非用户使用 AVG。奇怪的是,为了解决这个问题,似乎必须禁用 AVG 的“电子邮件保护”;将我的程序或 JRE 添加到异常(exception)列表不起
我正在寻找一种方法来挂接 SMSManager 或较低级别的机制,以便我可以在发送任何外发 SMS 消息之前拦截、读取和取消它们。 最佳答案 迟到总比不到好:) 我已经在这上面花了 2 天...并且不
我已成功拦截对 read() 的调用, write() , open() , unlink() , rename() , creat()但不知何故截获完全相同的语义stat()没有发生。我已经使用 L
阿里云ECS通过安全组屏蔽/拦截/阻断特定IP对云服务器的访问 所适用的场景: 通过安全组屏蔽、拦截、阻止特定IP对用户云服务器的访问,或者屏蔽IP访问服务器的特定端口。 配置的方法: 1、
我希望能够在类本身的构造函数中代理类的所有方法。 class Boy { constructor() { // proxy logic, do something before
使用 ajax 请求可以使用以下代码完成: let oldXHROpen = window.XMLHttpRequest.prototype.open; window.lastXhr = ''; wi
我想“拦截”/更改将 OData 与 Web API 一起使用时生成的 OData 查询..但我不完全确定如何“提取”生成的查询..我假设 OData 过滤器、扩展和更多一些如何生成某种表达式树或某种
当 JUnit 中的断言失败时,我想做一些“自己的事情”。我想要这个: public class MyAssert extends org.junit.Assert { // @Overrid
如何拦截 PartialFunction?例如在 Actor 中,如果我只想打印进入以下接收方法的所有内容,然后再将其传递给流程方法: class MyActor extends Actor {
我们正在使用 fluentvalidation(带有服务堆栈)来验证我们的请求 DTO。我们最近扩展了我们的框架以接受“PATCH”请求,这意味着我们现在需要仅在补丁包含要验证的字段时才应用验证。 我
我有一个作为 excel 插件运行的 WPF 应用程序,它有这样的可视化树 精益求精 元素主机 WPF 用户控件 WPF 色带条控件 现在,在 excel 中加载插件时,不会启用位于 WPF 功能区栏
我是一名优秀的程序员,十分优秀!