2024-06-04T11:48:12.471381+00:00 [debug] msg: mqtt_packet_received, mfa: emqx_channel:handle_in/2, line: 360, peername: 39.183.161.54:10301, clientid
: thXT4t/393423, packet: CONNECT(Q0, R0, D0, ClientId=thXT4t/393423, ProtoName=MQTT, ProtoVsn=5, CleanStart=false, KeepAlive=60
, Username=01&393423&thXT4t, Password=******), tag: MQTT
2024-06-04T11:48:12.471552+00:00 [debug] msg: mysql_connector_received, mfa: emqx_connector_mysql:on_sql_query/6, line: 412, peername: 39.184.121.14:
10301, clientid: thXT4t/393423, connector: <<“emqx_authn_mysql:1”>>, sql: emqx_authn_mysql, state: #{batch_inserts => #{},batch_params_tok
ens => #{},params_tokens => #{emqx_authn_mysql => },pool_name => <<“emqx_authn_mysql:1:2297285”>>,prepare_statement => #{emqx_authn_mysql => <<“SEL
ECT password as password_hash, null as salt FROM iotx_mqtt_user where username = ? LIMIT 1”>>}}, tag: QUERY
2024-06-04T11:48:12.474317+00:00 [debug] msg: authenticator_result, mfa: emqx_authentication:authenticate_with_provider/2, line: 679, peername: 39.18
3.161.54:10301, clientid: thXT4t/393423, authenticator: <<“password_based:mysql”>>, result: {ok,#{is_superuser => false}}, tag: AUTHN
2024-06-04T11:48:12.474539+00:00 [debug] msg: authentication_result, mfa: emqx_authentication:authenticate/2, line: 252, peername: 39.184.121.14:1030
1, clientid: thXT4t/393423, reason: chain_result, result: {stop,{ok,#{is_superuser => false}}}, tag: AUTHN
2024-06-04T11:48:12.475176+00:00 [debug] msg: insert_channel_info, mfa: emqx_cm:insert_channel_info/3, line: 157, peername: 39.183.161.54:10301, clie
ntid: thXT4t/393423
2024-06-04T11:48:12.475370+00:00 [debug] msg: mqtt_packet_sent, mfa: emqx_connection:serialize_and_inc_stats_fun/1, line: 870, peername: 39.183.161.5
4:10301, clientid: thXT4t/393423, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0), tag: MQTT
设备第一次连接的时候,日志如上图所示,emqx没有发出/connected系统消息
断开重连,发出/connected消息,如下所示
2024-06-04T11:54:21.355620+00:00 [debug] msg: mqtt_packet_sent, mfa: emqx_connection:serialize_and_inc_stats_fun/1, line: 870, peername: 172.39.20.2
:39328, clientid: mqtt_57982, packet: PUBLISH(Q0, R0, D0, Topic=$SYS/brokers/emqx@172.17.0.2/clients/thXT4t/393423/connected, PacketId=und
efined, Payload={“username”:“01&393423&thXT4t”,“ts”:1717502061355,“sockport”:8883,“protocol”:“mqtt”,“proto_ver”:5,“proto_name”:“MQTT”,“kee
palive”:60,“ipaddress”:“39.184.121.14”,“expiry_interval”:0,“connected_at”:1717502061355,“clientid”:“thXT4t/393423”,“clean_start”:false}),
tag: MQTT
是什么原因导致的,EMQX版本号:5.0.24