环境信息
- EMQX 版本:4.4.3
- 操作系统及版本:centos7
- broker 2核 4G
两台集群
问题描述
客户端发布消息后收到客户机未连接的提示,客户端到服务器的连接断开,然后自动重连,后又断开,然后收到订阅消息后发布消息又断开,一直死循环执行,这个是什么原因?如何解决?
还有正在进行过多的发布的日志,但是客户端没有断开重连。
查日志当时有消息积压。
配置文件及日志
emqx的日志:
2022-07-24T21:14:39.347617+08:00 [warning] emq-client_prod-7ca4b536@112.74.47.243:41164 [Session] Dropped msg due to mqueue is full: Message(Id=0005E48B8E0755C76AE600000BCD0052, QoS=1, Topic=topic/face/capture/request/AF9004-1742CB-0000FF, From=<<"AF9004-1742CB-0000FF">>, Flags=[], Headers=#{peerhost => {14,211,252,222}, properties => #{},proto_ver => 4,protocol => mqtt,username => <<"person">>})
2022-07-25T14:35:27.559397+08:00 [warning] emq-client_prod-1a6dfce5@120.77.41.86:59354 [Session] Dropped msg due to mqueue is full: Message(Id=0005E49A700A071E6AE6000034410006, QoS=1, Topic=topic/face/capture/request/D7879C-2EFECB-0000FF, From=<<"D7879C-2EFECB-0000FF">>, Flags=[], Headers=#{peerhost => {14,211,252,222}, properties => #{},proto_ver => 4,protocol => mqtt,username => <<"person">>})
mqtt客户端的日志:
2022-07-25 00:00:42.573|ERROR|-|MQTT Call: emq-client_prod-1a6dfce5|com.ameter.platform.passage.iot.common.protocol.mqtt.MqttClient|123|publish|emq publish error errorMsg=客户机未连接 , topic=topic/face/capture/response/D7879C-2EFECB-0000FF , payload={"reply":"ACK","cmd":"face","code":0,"sequence_no":413,"cap_time":"2022/07/24 21:03:27.954"} , qos=1 , retain=false
2022-07-25 00:00:57.688|INFO|-|http-nio-10888-exec-8|com.ameter.platform.passage.web.car.controller.DisplayEquipmentController|24|heartbeat|心跳设备 mac40AA56B037BD
2022-07-25 00:00:58.885|INFO|-|MQTT Call: emq-client_prod-1a6dfce5|com.ameter.platform.passage.person.manager.listener.MqttMessageCallback|120|connectComplete|MqttMessageCallback-->connectComplete->[MQTT] 连接成功,重新订阅主题...
2022-07-25 00:01:06.208|INFO|-|scheduled-pool-6|com.ameter.platform.passage.car.manager.task.HeartbeatDetectionTask|33|process|heartbeat detection start
2022-07-25 00:01:28.889|ERROR|-|MQTT Ping: emq-client_prod-1a6dfce5|org.eclipse.paho.client.mqttv3.internal.ClientState|210|logToJsr47|emq-client_prod-1a6dfce5: Timed out as no activity, keepAlive=15,000,000,000 lastOutboundActivity=25,015,741,850,164,867 lastInboundActivity=25,015,726,854,551,447 time=25,015,756,850,201,534 lastPing=25,015,741,850,167,366
2022-07-25 00:01:28.891|ERROR|-|MQTT Ping: emq-client_prod-1a6dfce5|com.ameter.platform.passage.person.manager.listener.MqttMessageCallback|51|connectionLost|MqttMessageCallback-->connectionLost->[MQTT] 断开连接...error:等待来自服务器的响应时超时
2022-07-25 00:01:28.904|ERROR|-|MQTT Call: emq-client_prod-1a6dfce5|com.ameter.platform.passage.iot.common.protocol.mqtt.MqttClient|133|subscribe|emq subscribe error errorMsg=等待来自服务器的响应时超时 , topicFilter=$queue/topic/face/manage/response/+ , qos=1
2022-07-25 00:01:28.904|ERROR|-|MQTT Call: emq-client_prod-1a6dfce5|com.ameter.platform.passage.iot.common.protocol.mqtt.MqttClient|133|subscribe|emq subscribe error errorMsg=客户机未连接 , topicFilter=$queue/topic/face/heart/request/+ , qos=0
2022-07-25 00:01:28.905|ERROR|-|MQTT Call: emq-client_prod-1a6dfce5|com.ameter.platform.passage.iot.common.protocol.mqtt.MqttClient|133|subscribe|emq subscribe error errorMsg=客户机未连接 , topicFilter=$queue/topic/face/capture/request/+ , qos=2
2022-07-25 00:01:53.907|INFO|-|DubboServerHandler-172.24.21.184:20882-thread-151|com.ameter.platform.passage.car.manager.component.push.QianyPushComponent|122|publishMqtt|publishMqtt, topic:/qiany/12ZA19ENN520754A/parking/config/request, payloadStr:{"utc_ts":1658678513,"cmd":"rs485","rs485ch1_data":[{"data":"qlUAAAAnABMBFAEAz+ZNR0czMDcgOS0xODAxbdKv"},{"data":"qlUAAAAnAAwCFAEAu7bTrbK0s7VMiK8="},{"data":"/QAdAQFbdjRdz+ZNR0czMDcgOS0xODAxu7bTrbK0s7U="}],"msg_id":"1658678513907EHJVvku","encode_type":"base64"}
2022-07-25 00:01:53.909|ERROR|-|DubboServerHandler-172.24.21.184:20882-thread-151|com.ameter.platform.passage.iot.common.protocol.mqtt.MqttClient|123|publish|emq publish error errorMsg=正在进行过多的发布 , topic=/qiany/12ZA19ENN520754A/parking/config/request , payload={"utc_ts":1658678513,"cmd":"rs485","rs485ch1_data":[{"data":"qlUAAAAnABMBFAEAz+ZNR0czMDcgOS0xODAxbdKv"},{"data":"qlUAAAAnAAwCFAEAu7bTrbK0s7VMiK8="},{"data":"/QAdAQFbdjRdz+ZNR0czMDcgOS0xODAxu7bTrbK0s7U="}],"msg_id":"1658678513907EHJVvku","encode_type":"base64"} , qos=1 , retain=true