开 emqx 的 debug 日志看看
日志钟只有第一次成功发送的消息日志,后面失败的消息没有日志信息
能把 emqx 的完整日志拿来看看么
2025-02-24T14:42:31.216679+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=swap-iot, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=username, Password=******)
2025-02-24T14:42:31.217000+08:00 [debug] msg: insert_channel_info, mfa: emqx_cm:insert_channel_info/3(159), peername: 127.0.0.1:61306, clientid: swap-iot
2025-02-24T14:42:31.217191+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2025-02-24T14:42:31.238000+08:00 [debug] msg: raw_bin_received, mfa: emqx_connection:when_bytes_in/3(778), peername: 127.0.0.1:61306, clientid: swap-iot, bin: 820E000100092F696F742F70726F6400, size: 16, type: hex
2025-02-24T14:42:31.237671+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_received, packet: SUBSCRIBE(Q1, R0, D0, PacketId=1 TopicFilters=[/iot/prod(#{nl => 0,qos => 0,rap => 0,rh => 0})])
2025-02-24T14:42:31.237774+08:00 [AUTHZ] swap-iot@127.0.0.1:61306 msg: authorization_module_nomatch, ipaddr: {127,0,0,1}, module: emqx_authz_client_info, pub_sub: [action_type: subscribe, qos: 0], topic: /iot/prod, username: username
2025-02-24T14:42:31.238000+08:00 [info] msg: authorization_permission_allowed, mfa: emqx_authz:log_allowed/1(507), peername: 127.0.0.1:61306, clientid: swap-iot, topic: /iot/prod, ipaddr: {127,0,0,1}, source: file, username: <<“username”>>
2025-02-24T14:42:31.237979+08:00 [SUBSCRIBE] swap-iot@127.0.0.1:61306 msg: subscribe, sub_id: swap-iot, sub_opts: [nl: 0, qos: 0, rap: 0, rh: 0, sub_props: ], topic: /iot/prod
2025-02-24T14:42:31.238081+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_sent, packet: SUBACK(Q0, R0, D0, PacketId=1, ReasonCodes=[0])
2025-02-24T14:42:31.238000+08:00 [debug] msg: insert_channel_info, mfa: emqx_cm:insert_channel_info/3(159), peername: 127.0.0.1:61306, clientid: swap-iot
2025-02-24T14:42:50.070670+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_sent, packet: PUBLISH(Q0, R0, D0, Topic=/iot/prod, PacketId=undefined, Payload=test)
2025-02-24T14:42:50.147000+08:00 [debug] msg: raw_bin_received, mfa: emqx_connection:when_bytes_in/3(778), peername: 127.0.0.1:61306, clientid: swap-iot, bin: 304000162F696F742F70726F642F323233343536373839303030EA0202030405060708090000000100EA14BC67A110000000001E377800780000000028263764AE00, size: 66, type: hex
2025-02-24T14:42:50.147163+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_received, packet: [[80,85,66,76,73,83,72,40,81,“0”,44,32,82,“0”,44,32,68,“0”],“, “,[[84,111,112,105,99,61,”/iot/prod/223456789000”,44,32,80,97,99,107,101,116,73,100,61,“undefined”],“, “,[“Payload=”,{error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,234,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,174,0>>}]],”)”]
2025-02-24T14:42:50.147470+08:00 [AUTHZ] swap-iot@127.0.0.1:61306 msg: authorization_module_nomatch, ipaddr: {127,0,0,1}, module: emqx_authz_client_info, pub_sub: [action_type: publish, qos: 0, retain: false], topic: /iot/prod/223456789000, username: username
2025-02-24T14:42:50.148000+08:00 [info] msg: authorization_permission_allowed, mfa: emqx_authz:log_allowed/1(507), peername: 127.0.0.1:61306, clientid: swap-iot, topic: /iot/prod/223456789000, ipaddr: {127,0,0,1}, source: file, username: <<“username”>>
2025-02-24T14:42:50.147982+08:00 [PUBLISH] swap-iot@127.0.0.1:61306 msg: publish_to, topic: /iot/prod/223456789000, payload: {error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,234,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,174,0>>}
2025-02-24T14:42:51.227995+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_sent, packet: PUBLISH(Q0, R0, D0, Topic=/iot/prod, PacketId=undefined, Payload=test)
2025-02-24T14:42:51.296000+08:00 [debug] msg: raw_bin_received, mfa: emqx_connection:when_bytes_in/3(778), peername: 127.0.0.1:61306, clientid: swap-iot, bin: 304D00232F696F742F70726F642F3232333435363738393030302F323233343536373839303030EA0202030405060708090000000100EB14BC67A110000000001E3778007800000000282637646300, size: 79, type: hex
2025-02-24T14:42:51.295988+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_received, packet: [[80,85,66,76,73,83,72,40,81,“0”,44,32,82,“0”,44,32,68,“0”],“, “,[[84,111,112,105,99,61,”/iot/prod/223456789000/223456789000”,44,32,80,97,99,107,101,116,73,100,61,“undefined”],“, “,[“Payload=”,{error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,235,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,99,0>>}]],”)”]
2025-02-24T14:42:51.296398+08:00 [AUTHZ] swap-iot@127.0.0.1:61306 msg: authorization_module_nomatch, ipaddr: {127,0,0,1}, module: emqx_authz_client_info, pub_sub: [action_type: publish, qos: 0, retain: false], topic: /iot/prod/223456789000/223456789000, username: username
2025-02-24T14:42:51.297000+08:00 [info] msg: authorization_permission_allowed, mfa: emqx_authz:log_allowed/1(507), peername: 127.0.0.1:61306, clientid: swap-iot, topic: /iot/prod/223456789000/223456789000, ipaddr: {127,0,0,1}, source: file, username: <<“username”>>
2025-02-24T14:42:51.296807+08:00 [PUBLISH] swap-iot@127.0.0.1:61306 msg: publish_to, topic: /iot/prod/223456789000/223456789000, payload: {error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,235,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,99,0>>}
2025-02-24T14:42:51.729652+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_sent, packet: PUBLISH(Q0, R0, D0, Topic=/iot/prod, PacketId=undefined, Payload=test)
2025-02-24T14:42:51.800000+08:00 [debug] msg: raw_bin_received, mfa: emqx_connection:when_bytes_in/3(778), peername: 127.0.0.1:61306, clientid: swap-iot, bin: 305A00302F696F742F70726F642F3232333435363738393030302F3232333435363738393030302F323233343536373839303030EA0202030405060708090000000100EB14BC67A110000000001E3778007800000000282637646300, size: 92, type: hex
2025-02-24T14:42:51.799899+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_received, packet: [[80,85,66,76,73,83,72,40,81,“0”,44,32,82,“0”,44,32,68,“0”],“, “,[[84,111,112,105,99,61,”/iot/prod/223456789000/223456789000/223456789000”,44,32,80,97,99,107,101,116,73,100,61,“undefined”],“, “,[“Payload=”,{error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,235,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,99,0>>}]],”)”]
2025-02-24T14:42:51.800308+08:00 [AUTHZ] swap-iot@127.0.0.1:61306 msg: authorization_module_nomatch, ipaddr: {127,0,0,1}, module: emqx_authz_client_info, pub_sub: [action_type: publish, qos: 0, retain: false], topic: /iot/prod/223456789000/223456789000/223456789000, username: username
2025-02-24T14:42:51.801000+08:00 [info] msg: authorization_permission_allowed, mfa: emqx_authz:log_allowed/1(507), peername: 127.0.0.1:61306, clientid: swap-iot, topic: /iot/prod/223456789000/223456789000/223456789000, ipaddr: {127,0,0,1}, source: file, username: <<“username”>>
2025-02-24T14:42:51.800820+08:00 [PUBLISH] swap-iot@127.0.0.1:61306 msg: publish_to, topic: /iot/prod/223456789000/223456789000/223456789000, payload: {error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,235,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,99,0>>}
2025-02-24T14:42:52.068289+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_sent, packet: PUBLISH(Q0, R0, D0, Topic=/iot/prod, PacketId=undefined, Payload=test)
2025-02-24T14:42:52.139000+08:00 [debug] msg: raw_bin_received, mfa: emqx_connection:when_bytes_in/3(778), peername: 127.0.0.1:61306, clientid: swap-iot, bin: 3067003D2F696F742F70726F642F3232333435363738393030302F3232333435363738393030302F3232333435363738393030302F323233343536373839303030EA0202030405060708090000000100EC14BC67A110000000001E3778007800000000282637640500, size: 105, type: hex
2025-02-24T14:42:52.139355+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_received, packet: [[80,85,66,76,73,83,72,40,81,“0”,44,32,82,“0”,44,32,68,“0”],“, “,[[84,111,112,105,99,61,”/iot/prod/223456789000/223456789000/223456789000/223456789000”,44,32,80,97,99,107,101,116,73,100,61,“undefined”],“, “,[“Payload=”,{error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,236,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,5,0>>}]],”)”]
2025-02-24T14:42:52.139867+08:00 [AUTHZ] swap-iot@127.0.0.1:61306 msg: authorization_module_nomatch, ipaddr: {127,0,0,1}, module: emqx_authz_client_info, pub_sub: [action_type: publish, qos: 0, retain: false], topic: /iot/prod/223456789000/223456789000/223456789000/223456789000, username: username
2025-02-24T14:42:52.141000+08:00 [info] msg: authorization_permission_allowed, mfa: emqx_authz:log_allowed/1(507), peername: 127.0.0.1:61306, clientid: swap-iot, topic: /iot/prod/223456789000/223456789000/223456789000/223456789000, ipaddr: {127,0,0,1}, source: file, username: <<“username”>>
2025-02-24T14:42:52.141403+08:00 [PUBLISH] swap-iot@127.0.0.1:61306 msg: publish_to, topic: /iot/prod/223456789000/223456789000/223456789000/223456789000, payload: {error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,236,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,5,0>>}
2025-02-24T14:42:52.372724+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_sent, packet: PUBLISH(Q0, R0, D0, Topic=/iot/prod, PacketId=undefined, Payload=test)
2025-02-24T14:42:52.442000+08:00 [debug] msg: raw_bin_received, mfa: emqx_connection:when_bytes_in/3(778), peername: 127.0.0.1:61306, clientid: swap-iot, bin: 3074004A2F696F742F70726F642F3232333435363738393030302F3232333435363738393030302F3232333435363738393030302F3232333435363738393030302F323233343536373839303030EA0202030405060708090000000100EC14BC67A110000000001E3778007800000000282637640500, size: 118, type: hex
2025-02-24T14:42:52.442356+08:00 [MQTT] swap-iot@127.0.0.1:61306 msg: mqtt_packet_received, packet: [[80,85,66,76,73,83,72,40,81,“0”,44,32,82,“0”,44,32,68,“0”],“, “,[[84,111,112,105,99,61,”/iot/prod/223456789000/223456789000/223456789000/223456789000/223456789000”,44,32,80,97,99,107,101,116,73,100,61,“undefined”],“, “,[“Payload=”,{error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,236,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,5,0>>}]],”)”]
2025-02-24T14:42:52.442868+08:00 [AUTHZ] swap-iot@127.0.0.1:61306 msg: authorization_module_nomatch, ipaddr: {127,0,0,1}, module: emqx_authz_client_info, pub_sub: [action_type: publish, qos: 0, retain: false], topic: /iot/prod/223456789000/223456789000/223456789000/223456789000/223456789000, username: username
2025-02-24T14:42:52.444000+08:00 [info] msg: authorization_permission_allowed, mfa: emqx_authz:log_allowed/1(507), peername: 127.0.0.1:61306, clientid: swap-iot, topic: /iot/prod/223456789000/223456789000/223456789000/223456789000/223456789000, ipaddr: {127,0,0,1}, source: file, username: <<“username”>>
2025-02-24T14:42:52.443483+08:00 [PUBLISH] swap-iot@127.0.0.1:61306 msg: publish_to, topic: /iot/prod/223456789000/223456789000/223456789000/223456789000/223456789000, payload: {error,,<<234,2,2,3,4,5,6,7,8,9,0,0,0,1,0,236,20,188,103,161,16,0,0,0,0,30,55,120,0,120,0,0,0,0,40,38,55,100,5,0>>}
payload 组包不是标准的 mqtt 协议。