EMQX protocol_error

2026-09-12T03:30:58.414971+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:58985 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=<CLIENT_ID>, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=<MQTT_USERNAME>, Password=******)
2026-09-12T03:30:58.415316+00:00 [QUERY] <CLIENT_ID>@<CLIENT_IP>:58985 msg: http_connector_received, connector: emqx_authn_http:1, request: {“/link/socket/login”,[{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}],<<“{"username":"<MQTT_USERNAME>","password":"[REDACTED]"}”>>}, state: [base_path: /, connect_timeout: 15000, host: <AUTH_SERVER_IP>, pool_name: emqx_authn_http:1, pool_type: random, port: 8080, request: undefined]
2026-09-12T03:30:58.418452+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:58985 msg: http_response, provider: emqx_authn_http, request: [base_url: http://<AUTH_SERVER_IP>:8080/link/socket/login, body: {“username”:“<MQTT_USERNAME>”,“password”:“[REDACTED]”}, headers: [{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}], method: post, path_query: /link/socket/login], resource: emqx_authn_http:1, response: [body: {“result”:“allow”}, headers: [{<<“transfer-encoding”>>,<<“chunked”>>},{<<“content-type”>>,<<“application/json”>>},{<<“date”>>,<<“Sat, 12 Sep 2026 03:30:58 GMT”>>}], status: 200]
2026-09-12T03:30:58.418578+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:58985 msg: authenticator_result, authenticator: password_based:http, result: {ok,#{is_superuser => false,user_property => #{}}}
2026-09-12T03:30:58.418612+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:58985 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false,user_property => #{}}}}
2026-09-12T03:30:58.418999+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:58985 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:30:58.419240+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:58985 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2026-09-12T03:30:58.474590+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:58985 msg: socket_force_closed, reason: protocol_error
2026-09-12T03:30:58.474989+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:58985 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:30:58.475103+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:58985 msg: emqx_connection_terminated, reason: {shutdown,protocol_error}
2026-09-12T03:30:58.475207+00:00 [info] msg: terminate, mfa: emqx_connection:terminate/2(673), peername: <CLIENT_IP>:58985, clientid: <CLIENT_ID>, reason: {shutdown,protocol_error}

2026-09-12T03:32:00.075206+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59131 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=<CLIENT_ID>, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=<MQTT_USERNAME>, Password=******)
2026-09-12T03:32:00.075565+00:00 [QUERY] <CLIENT_ID>@<CLIENT_IP>:59131 msg: http_connector_received, connector: emqx_authn_http:1, request: {“/link/socket/login”,[{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}],<<“{"username":"<MQTT_USERNAME>","password":"[REDACTED]"}”>>}, state: [base_path: /, connect_timeout: 15000, host: <AUTH_SERVER_IP>, pool_name: emqx_authn_http:1, pool_type: random, port: 8080, request: undefined]
2026-09-12T03:32:00.078520+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59131 msg: http_response, provider: emqx_authn_http, request: [base_url: http://<AUTH_SERVER_IP>:8080/link/socket/login, body: {“username”:“<MQTT_USERNAME>”,“password”:“[REDACTED]”}, headers: [{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}], method: post, path_query: /link/socket/login], resource: emqx_authn_http:1, response: [body: {“result”:“allow”}, headers: [{<<“transfer-encoding”>>,<<“chunked”>>},{<<“content-type”>>,<<“application/json”>>},{<<“date”>>,<<“Sat, 12 Sep 2026 03:32:00 GMT”>>}], status: 200]
2026-09-12T03:32:00.078646+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59131 msg: authenticator_result, authenticator: password_based:http, result: {ok,#{is_superuser => false,user_property => #{}}}
2026-09-12T03:32:00.078677+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59131 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false,user_property => #{}}}}
2026-09-12T03:32:00.079176+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59131 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:32:00.079394+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59131 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2026-09-12T03:32:00.134471+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59131 msg: socket_force_closed, reason: protocol_error
2026-09-12T03:32:00.134823+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59131 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:32:00.134931+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59131 msg: emqx_connection_terminated, reason: {shutdown,protocol_error}
2026-09-12T03:32:00.134992+00:00 [info] msg: terminate, mfa: emqx_connection:terminate/2(673), peername: <CLIENT_IP>:59131, clientid: <CLIENT_ID>, reason: {shutdown,protocol_error}

2026-09-12T03:33:01.775074+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59304 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=<CLIENT_ID>, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=<MQTT_USERNAME>, Password=******)
2026-09-12T03:33:01.775365+00:00 [QUERY] <CLIENT_ID>@<CLIENT_IP>:59304 msg: http_connector_received, connector: emqx_authn_http:1, request: {“/link/socket/login”,[{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}],<<“{"username":"<MQTT_USERNAME>","password":"[REDACTED]"}”>>}, state: [base_path: /, connect_timeout: 15000, host: <AUTH_SERVER_IP>, pool_name: emqx_authn_http:1, pool_type: random, port: 8080, request: undefined]
2026-09-12T03:33:01.778204+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59304 msg: http_response, provider: emqx_authn_http, request: [base_url: http://<AUTH_SERVER_IP>:8080/link/socket/login, body: {“username”:“<MQTT_USERNAME>”,“password”:“[REDACTED]”}, headers: [{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}], method: post, path_query: /link/socket/login], resource: emqx_authn_http:1, response: [body: {“result”:“allow”}, headers: [{<<“transfer-encoding”>>,<<“chunked”>>},{<<“content-type”>>,<<“application/json”>>},{<<“date”>>,<<“Sat, 12 Sep 2026 03:33:01 GMT”>>}], status: 200]
2026-09-12T03:33:01.778336+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59304 msg: authenticator_result, authenticator: password_based:http, result: {ok,#{is_superuser => false,user_property => #{}}}
2026-09-12T03:33:01.778370+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59304 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false,user_property => #{}}}}
2026-09-12T03:33:01.778744+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59304 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:33:01.778911+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59304 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2026-09-12T03:33:01.862692+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59304 msg: socket_force_closed, reason: protocol_error
2026-09-12T03:33:01.863269+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59304 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:33:01.863474+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59304 msg: emqx_connection_terminated, reason: {shutdown,protocol_error}
2026-09-12T03:33:01.863534+00:00 [info] msg: terminate, mfa: emqx_connection:terminate/2(673), peername: <CLIENT_IP>:59304, clientid: <CLIENT_ID>, reason: {shutdown,protocol_error}

2026-09-12T03:34:03.554863+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59497 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=<CLIENT_ID>, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=<MQTT_USERNAME>, Password=******)
2026-09-12T03:34:03.555108+00:00 [QUERY] <CLIENT_ID>@<CLIENT_IP>:59497 msg: http_connector_received, connector: emqx_authn_http:1, request: {“/link/socket/login”,[{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}],<<“{"username":"<MQTT_USERNAME>","password":"[REDACTED]"}”>>}, state: [base_path: /, connect_timeout: 15000, host: <AUTH_SERVER_IP>, pool_name: emqx_authn_http:1, pool_type: random, port: 8080, request: undefined]
2026-09-12T03:34:03.558507+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59497 msg: http_response, provider: emqx_authn_http, request: [base_url: http://<AUTH_SERVER_IP>:8080/link/socket/login, body: {“username”:“<MQTT_USERNAME>”,“password”:“[REDACTED]”}, headers: [{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}], method: post, path_query: /link/socket/login], resource: emqx_authn_http:1, response: [body: {“result”:“allow”}, headers: [{<<“transfer-encoding”>>,<<“chunked”>>},{<<“content-type”>>,<<“application/json”>>},{<<“date”>>,<<“Sat, 12 Sep 2026 03:34:03 GMT”>>}], status: 200]
2026-09-12T03:34:03.558654+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59497 msg: authenticator_result, authenticator: password_based:http, result: {ok,#{is_superuser => false,user_property => #{}}}
2026-09-12T03:34:03.558689+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59497 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false,user_property => #{}}}}
2026-09-12T03:34:03.559205+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59497 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:34:03.559462+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59497 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2026-09-12T03:34:03.634522+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59497 msg: socket_force_closed, reason: protocol_error
2026-09-12T03:34:03.634922+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59497 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:34:03.635013+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59497 msg: emqx_connection_terminated, reason: {shutdown,protocol_error}
2026-09-12T03:34:03.635066+00:00 [info] msg: terminate, mfa: emqx_connection:terminate/2(673), peername: <CLIENT_IP>:59497, clientid: <CLIENT_ID>, reason: {shutdown,protocol_error}

2026-09-12T03:35:05.543074+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59623 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=<CLIENT_ID>, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=<MQTT_USERNAME>, Password=******)
2026-09-12T03:35:05.543317+00:00 [QUERY] <CLIENT_ID>@<CLIENT_IP>:59623 msg: http_connector_received, connector: emqx_authn_http:1, request: {“/link/socket/login”,[{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}],<<“{"username":"<MQTT_USERNAME>","password":"[REDACTED]"}”>>}, state: [base_path: /, connect_timeout: 15000, host: <AUTH_SERVER_IP>, pool_name: random, port: 8080, request: undefined]
2026-09-12T03:35:05.546258+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59623 msg: http_response, provider: emqx_authn_http, request: [base_url: http://<AUTH_SERVER_IP>:8080/link/socket/login, body: {“username”:“<MQTT_USERNAME>”,“password”:“[REDACTED]”}, headers: [{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}], method: post, path_query: /link/socket/login], resource: emqx_authn_http:1, response: [body: {“result”:“allow”}, headers: [{<<“transfer-encoding”>>,<<“chunked”>>},{<<“content-type”>>,<<“application/json”>>},{<<“date”>>,<<“Sat, 12 Sep 2026 03:35:05 GMT”>>}], status: 200]
2026-09-12T03:35:05.546390+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59623 msg: authenticator_result, authenticator: password_based:http, result: {ok,#{is_superuser => false,user_property => #{}}}
2026-09-12T03:35:05.546424+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59623 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false,user_property => #{}}}}
2026-09-12T03:35:05.546822+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59623 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:35:05.546971+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59623 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2026-09-12T03:35:05.622923+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59623 msg: socket_force_closed, reason: protocol_error
2026-09-12T03:35:05.623299+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59623 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:35:05.623593+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59623 msg: emqx_connection_terminated, reason: {shutdown,protocol_error}
2026-09-12T03:35:05.623650+00:00 [info] msg: terminate, mfa: emqx_connection:terminate/2(673), peername: <CLIENT_IP>:59623, clientid: <CLIENT_ID>, reason: {shutdown,protocol_error}

2026-09-12T03:36:07.262930+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59809 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=<CLIENT_ID>, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=<MQTT_USERNAME>, Password=******)
2026-09-12T03:36:07.263231+00:00 [QUERY] <CLIENT_ID>@<CLIENT_IP>:59809 msg: http_connector_received, connector: emqx_authn_http:1, request: {“/link/socket/login”,[{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}],<<“{"username":"<MQTT_USERNAME>","password":"[REDACTED]"}”>>}, state: [base_path: /, connect_timeout: 15000, host: <AUTH_SERVER_IP>, pool_name: emqx_authn_http:1, pool_type: random, port: 8080, request: undefined]
2026-09-12T03:36:07.266102+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59809 msg: http_response, provider: emqx_authn_http, request: [base_url: http://<AUTH_SERVER_IP>:8080/link/socket/login, body: {“username”:“<MQTT_USERNAME>”,“password”:“[REDACTED]”}, headers: [{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}], method: post, path_query: /link/socket/login], resource: emqx_authn_http:1, response: [body: {“result”:“allow”}, headers: [{<<“transfer-encoding”>>,<<“chunked”>>},{<<“content-type”>>,<<“application/json”>>},{<<“date”>>,<<“Sat, 12 Sep 2026 03:36:07 GMT”>>}], status: 200]
2026-09-12T03:36:07.266232+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59809 msg: authenticator_result, authenticator: password_based:http, result: {ok,#{is_superuser => false,user_property => #{}}}
2026-09-12T03:36:07.266278+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59809 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false,user_property => #{}}}}
2026-09-12T03:36:07.266748+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59809 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:36:07.266911+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59809 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2026-09-12T03:36:07.350500+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59809 msg: socket_force_closed, reason: protocol_error
2026-09-12T03:36:07.350885+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59809 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:36:07.350986+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59809 msg: emqx_connection_terminated, reason: {shutdown,protocol_error}
2026-09-12T03:36:07.351042+00:00 [info] msg: terminate, mfa: emqx_connection:terminate/2(673), peername: <CLIENT_IP>:59809, clientid: <CLIENT_ID>, reason: {shutdown,protocol_error}

2026-09-12T03:37:09.174720+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59913 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=<CLIENT_ID>, ProtoName=MQTT, ProtoVsn=4, CleanStart=true, KeepAlive=60, Username=<MQTT_USERNAME>, Password=******)
2026-09-12T03:37:09.174999+00:00 [QUERY] <CLIENT_ID>@<CLIENT_IP>:59913 msg: http_connector_received, connector: emqx_authn_http:1, request: {“/link/socket/login”,[{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}],<<“{"username":"<MQTT_USERNAME>","password":"[REDACTED]"}”>>}, state: [base_path: /, connect_timeout: 15000, host: <AUTH_SERVER_IP>, pool_name: random, port: 8080, request: undefined]
2026-09-12T03:37:09.178114+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59913 msg: http_response, provider: emqx_authn_http, request: [base_url: http://<AUTH_SERVER_IP>:8080/link/socket/login, body: {“username”:“<MQTT_USERNAME>”,“password”:“[REDACTED]”}, headers: [{<<“accept”>>,<<“application/json”>>},{<<“cache-control”>>,<<“no-cache”>>},{<<“connection”>>,<<“keep-alive”>>},{<<“content-type”>>,<<“application/json”>>},{<<“keep-alive”>>,<<“timeout=30, max=1000”>>}], method: post, path_query: /link/socket/login], resource: emqx_authn_http:1, response: [body: {“result”:“allow”}, headers: [{<<“transfer-encoding”>>,<<“chunked”>>},{<<“content-type”>>,<<“application/json”>>},{<<“date”>>,<<“Sat, 12 Sep 2026 03:37:09 GMT”>>}], status: 200]
2026-09-12T03:37:09.178248+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59913 msg: authenticator_result, authenticator: password_based:http, result: {ok,#{is_superuser => false,user_property => #{}}}
2026-09-12T03:37:09.178291+00:00 [AUTHN] <CLIENT_ID>@<CLIENT_IP>:59913 msg: authentication_result, reason: chain_result, result: {stop,{ok,#{is_superuser => false,user_property => #{}}}}
2026-09-12T03:37:09.178702+00:00 [BRIDGE] <CLIENT_ID>@<CLIENT_IP>:59913 msg: bridge_action, bridge_id: webhook:<BRIDGE_ID>
2026-09-12T03:37:09.178880+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59913 msg: mqtt_packet_sent, packet: CONNACK(Q0, R0, D0, AckFlags=0, ReasonCode=0)
2026-09-12T03:37:09.254621+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59913 msg: mqtt_packet_received, packet: SUBSCRIBE(Q1, R0, D0, PacketId=39680 TopicFilters=[dunext/PostRsp/<CLIENT_ID>/Login(#{nl => 0,qos => 1,rap => 0,rh => 0})])
2026-09-12T03:37:09.254848+00:00 [info] msg: authorization_permission_allowed, mfa: emqx_authz:log_allowed/1(438), peername: <CLIENT_IP>:59913, clientid: <CLIENT_ID>, topic: dunext/PostRsp/<CLIENT_ID>/Login, ipaddr: <CLIENT_IP>, source: file, username: <<“<MQTT_USERNAME>”>>
2026-09-12T03:37:09.255387+00:00 [SUBSCRIBE] <CLIENT_ID>@<CLIENT_IP>:59913 msg: subscribe, sub_id: <CLIENT_ID>, sub_opts: [nl: 0, qos: 1, rap: 0, rh: 0, sub_props: ], topic: dunext/PostRsp/<CLIENT_ID>/Login
2026-09-12T03:37:09.255623+00:00 [MQTT] <CLIENT_ID>@<CLIENT_IP>:59913 msg: mqtt_packet_sent, packet: SUBACK(Q0, R0, D0, PacketId=39680, ReasonCodes=[1])
2026-09-12T03:37:09.334521+00:00 [SOCKET] <CLIENT_ID>@<CLIENT_IP>:59913 msg: socket_force_closed, reason: protocol_error

看日志,HTTP 认证已经通过,问题不在认证服务:/link/socket/login 返回 200 和 {“result”:“allow”},EMQX 也已经发送 CONNACK。随后连接被以 protocol_error 关闭,但当前日志没有记录触发协议错误的具体报文。
需要补充一下信息:

  • EMQX 完整版本和部署方式(Docker、安装包或 K8s),以及客户端 SDK/版本。
  • 客户端收到 CONNACK 后实际发送的完整报文或客户端日志,尤其是 SUBSCRIBE 之后是否还有重连或重复 CONNECT。
  • 03:37:09.174 到 03:37:09.335 之间的完整 EMQX 日志。现在只能看到 SUBSCRIBE 成功并返回 SUBACK,随后立即 socket_force_closed,无法判断是哪一个后续报文触发了协议错误。
  • 用 MQTTX 或 mosquitto_sub 使用同一账号连接同一监听器,是否能稳定订阅。如果可以,优先对比原客户端发出的 MQTT 报文;如果仍复现,再补充一下 listener 配置、TLS/代理信息和脱敏后的抓包。
  • 如果当前版本支持 protocol_error 追踪日志,把同一连接对应的 unexpected_* 或 trace 日志也贴出来;旧版本可以先在测试环境升级到当前维护版本验证。

protocol_error 是通用断开原因,单凭这段日志还不能判断是客户端报文、代理改包还是 EMQX 版本问题。

1、EMQX完整版本的5.3.0 ,客户端SDK版本org.eclipse.paho.client.mqttv3-1.2.5.jar,相关的部署方式暂时不确定。
2、目前完整报文没有抓取到
3、目前这个现在在多个不同的设备不同的时间段内出现,而且持续和恢复的时间都不固定,存在重复的时间段,但发生和恢复的时间点都不同。这个复现只能等设备触发发现,并没有比较明显的规律。

可以先按客户端发出的 MQTT 报文方向排查,当前信息还不足以把 protocol_error 归因到 EMQX。

现在能确认的是:HTTP 认证返回 200/allow,EMQX 发送了 CONNACK;部分连接在 SUBSCRIBE/SUBACK 后才被关闭。protocol_error 只是连接终止原因,缺少触发错误的具体报文时,客户端报文、代理/LB 改包和 5.3.0 本身都不能排除。

需要抓一条“失败连接”的完整证据:

  • 在故障设备上开启 Paho 的连接丢失日志,记录 connectionLost 的异常和重连过程;同时用 Wireshark/tcpdump 抓从 CONNECT 到断开前的 TCP 流,至少覆盖 CONNACK 后的第一个客户端报文。

  • 提供该客户端实际连接的监听器信息:部署方式、端口是否经过 TLS、Nginx/SLB/网关或 NAT,以及同一时段对应的 EMQX 完整日志。原日志里 03:37:09.174 到 03:37:09.335 的窗口仍然缺少触发 protocol_error 的报文。

  • 用 MQTTX 或 mosquitto_sub 使用同一账号、同一监听器做对照。如果对照客户端稳定,优先比对 Paho 发出的报文和中间代理;如果也失败,再看监听器/代理和 EMQX 版本。

5.3.0 已经比较旧,可以在测试环境用当前维护版本做一次 A/B 对照,但先不要根据 protocol_error 直接修改认证配置;认证链路从现有日志看是成功的。

非常抱歉,如果没有详细的日志,通过这些模糊的说明,很难去推断是什么原因。

:00 [debug] tag: MQTT, clientid: 1081060023206001, msg: raw_bin_received,

目前德debug日志是这样的