- EMQX 版本: 4.3.2
- java mqtt客户端:org.eclipse.paho.client.mqttv5:1.2.5
这个服务里面两个客户端id是不一样,两个客户端连接的是同一个emqx,两个客户端都会断开连接,每天都会断个一次的样子。是其他服务里面一个客户端从来不会断。现在没有思路,大概从哪些方面定位?
客户端日志如下:
[2024-06-11 21:31:28.695] ERROR[MQTT Ping: server1718065579910]org.eclipse.paho.mqttv5.client.internal.ClientState[210] sig_server1718065579910: Timed out as no write activity, keepAlive=60,000,000,000 lastOutboundActivity=36,019,990,853,495,040 lastInboundActivity=36,019,930,920,185,297 time=36,020,130,633,033,528 lastPing=0
[2024-06-11 21:31:28.696] ERROR[MQTT Snd: server1718065579910]org.eclipse.paho.mqttv5.client.internal.CommsSender[210] sig_server1718065579910: exception java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.eclipse.paho.mqttv5.client.wire.MqttOutputStream.flush(MqttOutputStream.java:53)
at org.eclipse.paho.mqttv5.client.internal.CommsSender.run(CommsSender.java:147)
at java.lang.Thread.run(Thread.java:748)
[2024-06-11 21:31:28.696] ERROR[pool-662076-thread-1]com.signal.domain.mqtt.MqttV5[278] 发布消息失败 org.eclipse.paho.mqttv5.common.MqttException: Timed out while waiting to write messages to the server
at org.eclipse.paho.mqttv5.client.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:32)
at org.eclipse.paho.mqttv5.client.internal.ClientState.checkForActivity(ClientState.java:753)
at org.eclipse.paho.mqttv5.client.internal.ClientComms.checkForActivity(ClientComms.java:875)
at org.eclipse.paho.mqttv5.client.internal.ClientComms.checkForActivity(ClientComms.java:863)
at org.eclipse.paho.mqttv5.client.TimerPingSender$PingTask.run(TimerPingSender.java:105)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)