puback_packetId_not_found

环境

  • EMQX 版本:5.0.21
  • 操作系统版本:centos

puback_packetId_not_found请问这个一般是什么原因

2025-01-06T08:02:59.913459+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.32:36076, clientid: 1211023290094358, packetId: 3

日志追踪:

2020-03-17T10:37:10+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_sent, packet: PUBLISH(Q1, R0, D0, Topic=/v1/1211023290094358/device/response, PacketId=1, Payload={“mid”:9,“type”:“EVENT_LINKUP”,“msg”:“SUCCESS”,“code”:200,“timestamp”:“2025-01-06 08:55:10”,“deviceId”:“1211023290094358”,“param”:{}})
2020-03-17T10:37:11+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PUBACK(Q0, R0, D0, PacketId=1, ReasonCode=0)
2020-03-17T10:37:11+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_sent, packet: PUBLISH(Q1, R0, D0, Topic=/v1/1211023290094358/device/response, PacketId=2, Payload={“mid”:10,“type”:“EVENT_LINKUP”,“msg”:“SUCCESS”,“code”:200,“timestamp”:“2025-01-06 08:55:10”,“deviceId”:“1211023290094358”,“param”:{}})
2020-03-17T10:37:11+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PUBACK(Q0, R0, D0, PacketId=2, ReasonCode=0)
2020-03-17T10:38:12+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PINGREQ(Q0, R0, D0)
2020-03-17T10:38:12+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_sent, packet: PINGRESP(Q0, R0, D0)
2020-03-17T10:38:44+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PUBLISH(Q0, R0, D0, Topic=/v1/1211023290094358/device/request, PacketId=undefined, Payload={“deviceId”:“1211023290094358”,“timestamp”:“2025-01-06 08:56:38”,“type”:“EVENT_HEARTBEAT”})
2020-03-17T10:38:44+08:00 [PUBLISH] 1211023290094358@205.100.129.32:40484 msg: publish_to, topic: /v1/1211023290094358/device/request, payload: {“deviceId”:“1211023290094358”,“timestamp”:“2025-01-06 08:56:38”,“type”:“EVENT_HEARTBEAT”}
2020-03-17T10:38:44+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_sent, packet: PUBLISH(Q1, R0, D0, Topic=/v1/1211023290094358/device/response, PacketId=3, Payload={“mid”:0,“type”:“EVENT_HEARTBEAT”,“msg”:“SUCCESS”,“code”:200,“timestamp”:“2025-01-06 08:56:42”,“deviceId”:“1211023290094358”,“param”:{}})
2020-03-17T10:38:44+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PUBACK(Q0, R0, D0, PacketId=3, ReasonCode=0)
2020-03-17T10:38:45+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PUBLISH(Q0, R0, D0, Topic=/v1/1211023290094358/device/request, PacketId=undefined, Payload={“channel”:“698”,“deviceId”:“1211023290094358”,“mid”:12,“param”:{“cpu”:{“arch”:“armv7l”,“cache”:0.5,“cpuLmt”:90,“cpus”:4,“frequency”:1.0},“dev”:{“boardVersion”:“”,“devID”:“SCUXXXX01001202406060608”,“devName”:“”,“devStatus”:“”,“devType”:“SCU”,“esam”:“740100000001D7E6”,“esn”:“1211023290094358”,“hardVersion”:“HV00.02”,“mfgInfo”:“XXXX01”},“disk”:{“disk”:8192,“diskLmt”:80},“links”:[{“name”:“LTE”,“type”:“LTE”},{“name”:“RS485-I”,“type”:“RS485”},{“name”:“RS485-II”,“type”:“RS485”},{“name”:“RS485-III/RS232-I”,“type”:“RS485”},{“name”:“RS485-IV/RS232-II”,“type”:“RS485”},{“id”:“28:b8:60:11:06:14”,“ip”:“192.168.1.101”,“mac”:“28:b8:60:11:06:14”,“name”:“FE0”,“type”:“Ethernet”,“useFor”:“00”},{“ICCID”:“89860323960275464325”,“IMEI”:“869889074340395”,“id”:“869889074340395”,“ip”:“205.100.129.32”,“mac”:“00:00:00:00:00:00”,“name”:“ppp-0”,“type”:“4G”,“version”:“GN4-N720V5-01.1”},{“ICCID”:“”,“IMEI”:“869889074346459”,“id”:“869889074346459”,“ip”:“”,“mac”:“”,“name”:“”,“type”:“4G”,“version”:“GN4-N720V5-01.1”}],“mem”:{“memLmt”:90,“phy”:1913,“virt”:1913},“os”:{“distro”:“Shuniu2.0”,“edgecliVersion”:“v02.006”,“kernel”:“4.14.155.16”,“patchVersion”:“original”,“privateVersion”:" 01_02.006_000_20230608_OFF",“softVersion”:“SV02.006”,“version”:“SV02.006”}},“timestamp”:“2025-01-06 08:56:38”,“type”:“EVENT_LINKUP”})
2020-03-17T10:38:45+08:00 [PUBLISH] 1211023290094358@205.100.129.32:40484 msg: publish_to, topic: /v1/1211023290094358/device/request, payload: {“channel”:“698”,“deviceId”:“1211023290094358”,“mid”:12,“param”:{“cpu”:{“arch”:“armv7l”,“cache”:0.5,“cpuLmt”:90,“cpus”:4,“frequency”:1.0},“dev”:{“boardVersion”:“”,“devID”:“SCUXXXX01001202406060608”,“devName”:“”,“devStatus”:“”,“devType”:“SCU”,“esam”:“740100000001D7E6”,“esn”:“1211023290094358”,“hardVersion”:“HV00.02”,“mfgInfo”:“XXXX01”},“disk”:{“disk”:8192,“diskLmt”:80},“links”:[{“name”:“LTE”,“type”:“LTE”},{“name”:“RS485-I”,“type”:“RS485”},{“name”:“RS485-II”,“type”:“RS485”},{“name”:“RS485-III/RS232-I”,“type”:“RS485”},{“name”:“RS485-IV/RS232-II”,“type”:“RS485”},{“id”:“28:b8:60:11:06:14”,“ip”:“192.168.1.101”,“mac”:“28:b8:60:11:06:14”,“name”:“FE0”,“type”:“Ethernet”,“useFor”:“00”},{“ICCID”:“89860323960275464325”,“IMEI”:“869889074340395”,“id”:“869889074340395”,“ip”:“205.100.129.32”,“mac”:“00:00:00:00:00:00”,“name”:“ppp-0”,“type”:“4G”,“version”:“GN4-N720V5-01.1”},{“ICCID”:“”,“IMEI”:“869889074346459”,“id”:“869889074346459”,“ip”:“”,“mac”:“”,“name”:“”,“type”:“4G”,“version”:“GN4-N720V5-01.1”}],“mem”:{“memLmt”:90,“phy”:1913,“virt”:1913},“os”:{“distro”:“Shuniu2.0”,“edgecliVersion”:“v02.006”,“kernel”:“4.14.155.16”,“patchVersion”:“original”,“privateVersion”:" 01_02.006_000_20230608_OFF",“softVersion”:“SV02.006”,“version”:“SV02.006”}},“timestamp”:“2025-01-06 08:56:38”,“type”:“EVENT_LINKUP”}
2020-03-17T10:38:45+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_sent, packet: PUBLISH(Q1, R0, D0, Topic=/v1/1211023290094358/device/response, PacketId=4, Payload={“mid”:12,“type”:“EVENT_LINKUP”,“msg”:“SUCCESS”,“code”:200,“timestamp”:“2025-01-06 08:56:43”,“deviceId”:“1211023290094358”,“param”:{}})
2020-03-17T10:38:45+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PUBACK(Q0, R0, D0, PacketId=4, ReasonCode=0)
2020-03-17T10:39:55+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_received, packet: PINGREQ(Q0, R0, D0)
2020-03-17T10:39:55+08:00 [MQTT] 1211023290094358@205.100.129.32:40484 msg: mqtt_packet_sent, packet: PINGRESP(Q0, R0, D0)
2020-03-17T10:41:54+08:00 [SOCKET] 1211023290094358@205.100.129.32:40484 msg: socket_force_closed, reason: keepalive_timeout
2020-03-17T10:41:54+08:00 [SOCKET] 1211023290094358@205.100.129.32:40484 msg: emqx_connection_terminated, reason: {shutdown,keepalive_timeout}
2020-03-17T10:42:41+08:00 [API] 1211023290094358@ msg: trace_stopping,

你最好一个 ping 是发出去的。到了

还没有收到其它的 mqtt我,就心跳 keepalive timout 了。心跳时间是在 connect 包里面设置的,你可以找找设置的是多少。

您好,这个keepalive一般是在客户端连接emqx的时候设置的是吧,默认值是300秒

您好,请问不断出现下面这个告警日志,请问如何排查,这种告警日志有什么影响吗

2025-01-06T03:41:02.628665+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.126:49570, clientid: 1211022440182024, packetId: 11
2025-01-06T04:03:00.640323+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.126:50694, clientid: 1211022440182024, packetId: 9
2025-01-06T04:03:00.641160+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.126:50694, clientid: 1211022440182024, packetId: 10
2025-01-06T04:15:38.198897+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.119:53276, clientid: 1411022440233077, packetId: 2
2025-01-06T04:15:38.302180+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.119:53276, clientid: 1411022440233077, packetId: 2
2025-01-06T05:15:08.243996+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.13:57478, clientid: 1211023290090298, packetId: 3
2025-01-06T05:15:08.245515+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.13:57478, clientid: 1211023290090298, packetId: 4
2025-01-06T05:15:08.246376+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.13:57478, clientid: 1211023290090298, packetId: 3
2025-01-06T05:15:08.247296+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.13:57478, clientid: 1211023290090298, packetId: 4
2025-01-06T05:30:14.295708+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.130.174:43354, clientid: 1211023290090783, packetId: 10
2025-01-06T05:41:22.137798+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.183:36860, clientid: 1211022410161901, packetId: 1
2025-01-06T05:41:22.139146+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.183:36860, clientid: 1211022410161901, packetId: 2
2025-01-06T05:41:22.139655+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.183:36860, clientid: 1211022410161901, packetId: 1
2025-01-06T05:41:22.140175+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.183:36860, clientid: 1211022410161901, packetId: 2
2025-01-06T06:15:26.658154+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.128.122:59756, clientid: 1211022440182869, packetId: 2
2025-01-06T06:15:26.743111+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.128.122:59756, clientid: 1211022440182869, packetId: 2
2025-01-06T07:01:48.277406+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.130.174:48016, clientid: 1211023290090783, packetId: 1
2025-01-06T07:01:48.278288+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.130.174:48016, clientid: 1211023290090783, packetId: 2
2025-01-06T07:01:48.278744+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.130.174:48016, clientid: 1211023290090783, packetId: 1
2025-01-06T07:01:48.279166+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.130.174:48016, clientid: 1211023290090783, packetId: 2
2025-01-06T07:01:58.421627+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.128.135:51734, clientid: 1411022440232424, packetId: 2
2025-01-06T07:02:16.556539+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.163:58770, clientid: 1411022440233546, packetId: 3
2025-01-06T07:02:16.557264+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.163:58770, clientid: 1411022440233546, packetId: 4
2025-01-06T07:02:39.034884+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.117:60044, clientid: 1211022440182534, packetId: 2108
2025-01-06T07:02:39.036195+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.117:60044, clientid: 1211022440182534, packetId: 2109
2025-01-06T07:03:05.634176+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.126:59970, clientid: 1211022440182024, packetId: 3
2025-01-06T07:03:05.635537+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.126:59970, clientid: 1211022440182024, packetId: 4
2025-01-06T07:10:50.795606+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.132.29:53414, clientid: 1411022440234067, packetId: 1163
2025-01-06T07:10:50.796860+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.132.29:53414, clientid: 1411022440234067, packetId: 1164
2025-01-06T07:11:05.219020+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.130.174:48016, clientid: 1211023290090783, packetId: 11
2025-01-06T08:02:59.913459+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.129.32:36076, clientid: 1211023290094358, packetId: 3

与 MQTT 协议中的 QoS 1 消息确认机制:

这个错误出现的典型场景是:

  1. 收到了一个 PUBACK 报文
  2. 但是找不到与这个 PUBACK 中的 packetId 对应的原始 PUBLISH 消息

估计你是遇到了和这位同学一样的问题:

试试里面的方法

您好,请问为什么会连续出现下面的告警日志(IP和客户端ID都相同),
1411022440234529订阅了11个qos2的主题:

2025-01-06T16:09:18.103416+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.30:40170, clientid: 1411022440234529, packetId: 7
2025-01-06T16:09:18.104103+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.30:40170, clientid: 1411022440234529, packetId: 8
2025-01-06T16:09:18.104641+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.30:40170, clientid: 1411022440234529, packetId: 7
2025-01-06T16:09:18.105070+08:00 [warning] msg: puback_packetId_not_found, mfa: emqx_channel:handle_in/2, line: 448, peername: 205.100.133.30:40170, clientid: 1411022440234529, packetId: 8

不知道。试试上面的方法