org.eclipse.paho.client.mqttv3.MqttException: Timed out waiting for a response from the server
at org.eclipse.paho.client.mqttv3.internal.Token.waitForCompletion(Token.java:112) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
at org.eclipse.paho.client.mqttv3.MqttToken.waitForCompletion(MqttToken.java:67) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
at org.eclipse.paho.client.mqttv3.MqttClient.subscribe(MqttClient.java:460) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
at org.eclipse.paho.client.mqttv3.MqttClient.subscribe(MqttClient.java:429) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
at org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter.connectAndSubscribe(MqttPahoMessageDrivenChannelAdapter.java:281) ~[spring-integration-mqtt-5.5.12.jar:5.5.12]
at org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter.lambda$scheduleReconnect$2(MqttPahoMessageDrivenChannelAdapter.java:344) ~[spring-integration-mqtt-5.5.12.jar:5.5.12]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.3.20.jar:5.3.20]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
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) ~[?:?]
背景:出现这个错误是接收大图片。接收短报文不会出现这个问题。
问题:预计是什么会导致出现该问题?如何解决
你好,从发的客户端的日志来看是它认为超时了。 还看不出具体的原因, 在翻翻 EMQX 的日志是否有这相关的错误。
或者使用日志追踪,看下这个客户端的 DEBUG 日志
buffer: 4096
clientid: XXXXXXXXX
conn_state: connected
connected_at: 1718828679615
high_msgq_watermark: 8192
high_watermark: 1048576
memory: 29880
message_queue_len: 0
peername: XXXXX:47035
pid: <0.28502.398>
proto_name: MQTT
proto_ver: 4
recbuf: 369280
recv_cnt: 3838
recv_oct: 7878
reductions: 10155296
send_cnt: 7145
send_oct: 272489588
send_pend: 295585
sndbuf: 2631168
sockname: XXXXXXX:1883
socktype: tcp
username: XXXXXXX
eqmx面板有告警信息。以上是告警信息