guogm: reason: {shutdown,tcp_closed} 这种tcp_closed 一般比较难查。EMQX 这边是发现 Socket 异常关闭了,才会打印这个日志,并关闭这个客户端连接。可能是由于: 客户端进程异常关闭了 Socket 中间的网络设备或者程序,异常关闭了 Socket 建议是通过 tcpdump 或者 Wireshark 抓包,检查下 TCP 的 FIN 是谁先发起的。
根据日志追踪发现有些设备不断的连接又立马断开 reason: {shutdown,tcp_closed}, 正常下线日志是 emqx_connection_terminated, reason: {shutdown,normal} 2023-03-18T18:25:02+08:00 [MQTT] P566511OPBP@183.171.78.210:47926 msg: mqtt_packet_received, packet: CONNECT(Q0, R0, D0, ClientId=P566511O...
#关键字:“reason: {shutdown, tcp_closed}” 这一日志表示客户端在没有发送 DISCONNECT 报文的情况下直接关闭了网络连接,与之对应的是reason: {shutdown, normal},这表示客户端先发送了一个 Reason Code 为 0 的 DISCONNECT 报文,然后再关闭了网络连接。
connection is "Terminated due to {shutdown,tcp_closed}",but next Non-normal connection ,Not certified,can reponse hearbeat to client ,so client don't think it disconnected.result in this equipment cycle is stuck in constant reconnectio How to reproduce it (as minimally and precisely as possib...
执行emqx_ctl listeners,查看对应端口下的 shutdown_count 统计。客户端断开链接错误码列表:keepalive_timeout:MQTT keepalive 超时 closed:TCP 客户端断开连接(客户端发来的 FIN,但没收到 MQTT DISCONNECT) normal:MQTT 客户端正常断开 einval:EMQX 想向客户端发送一条消息,但是 Socket 已经断开 function_clause:...
09:52:26.072 [debug] Client(10.200.8.176:5549): Terminated for {shutdown,closed} 09:52:26.369 [error] Connection Id 462860817 closing with reason: tcp_closed 09:52:26.369 [error] gen_server <0.1892.0> terminated with reason: tcp_closed ...
closed^M43[os_mon] cpu supervisor port (cpu_sup): Erlang has closed^M44{"Kernel pid terminated",application_controller,"{application_start_failure,emqx,{bad_return,{{emqx_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_router_sup,{shutdown,{...
closed^M43[os_mon] cpu supervisor port (cpu_sup): Erlang has closed^M44{"Kernel pid terminated",application_controller,"{application_start_failure,emqx,{bad_return,{{emqx_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_router_sup,{shutdown,{...
本身对TCP的机制了解不够深信,目前已知一个独立的外网IP只能提供最多6W的端口号,但每个TCP需要分配一个指定的端口号。所以理论上讲一台EMQ的服务器最多能跑6W链接数。 关于一直报”shutdown,eaddrnotavail”是因为测试的客户机端口号分配不足,并不是服务端无法分配端口号。
43 [os_mon] cpu supervisor port (cpu_sup): Erlang has closed^M 44 {"Kernel pid terminated",application_controller,"{application_start_failure,emqx,{bad_return,{{emqx_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_router_sup,{shutdown,{failed_...