EMQX总是断开连接

环境信息

  • EMQ X 版本: 4.3.7
  • 操作系统及版本:centos
  • 其他

问题描述

emqx服务器总是断开连接,原因不明

配置文件及日志

2021-11-03T19:50:16.472398+08:00 [info] 1e1b4dce-e2ba-456a-a457-6e9b44203c86@172.25.213.227:51982 file: emqx_connection.erl, line: 520, mfa: {emqx_connection,terminate,2}, msg: terminate, pid: <0.31808.1>, reason: {shutdown,protocol_error}
2021-11-03T19:50:16.472588+08:00 [info] [Shared Sub] Shared subscriber down: <0.31808.1>
2021-11-03T19:50:16.472459+08:00 [debug] ab13519d-d4df-45cb-9d3d-df91deb764aa@172.17.128.145:59618 [MQTT] SEND PUBLISH(Q1, R0, D0, Topic=$SYS/brokers/emqx@127.0.0.1/clients/1e1b4dce-e2ba-456a-a457-6e9b44203c86/disconnected, PacketId=36961, Payload=<<"{“username”:“iot-gateway”,“ts”:1635940216472,“sockport”:11883,“reason”:“protocol_error”,“proto_ver”:5,“proto_name”:“MQTT”,“ipaddress”:“172.25.213.227”,“disconnected_at”:1635940216472,“clientid”:“1e1b4dce-e2ba-456a-a457-6e9b44203c86”}">>)

file: emqx_connection.erl, line: 783, mfa: {emqx_connection,check_oom,1}, msg: check_oom, pid: <0.7250.1>, policy: #{max_heap_size => 8388608,message_queue_len => 10000}

需要抓包看你的设备行为是啥,日志中看只有

这个部分是说设备的协议栈实现出了错。可以使用日志追踪看下这台设备。