EMQX 版本emqx版本 4.4.2
EMQX 安装部署方式
emqx-4.4.2-otp24.1.5-3-el7-amd64.zip
直接解压启动
EMQX 集群情况
3 个节点组成集群
服务器(运行 EMQX 的机器)硬件配置
8核 16GB,CPU 型号:Intel Xeon Processor (Skylake, IBRS)
服务器操作系统和平台
linux centos7.4
x86_64
测试场景
6万模拟设备使用jemter连接上报数据,上报数据结束后,连接断开
具体问题
6万模拟设备使用jemter连接到emqx服务端,连接正常,上报数据,上报数据正常,上报数据完成后,断开连接,
java客户端接收到设备离线消息,java客户端打印错误日志,重新连接到emqx服务器,重新订阅主题,断开连接中,断开连接前后设备离线消息
,设备重新订阅后,接收不到订阅消息,大部分设备离线消息丢失
java客户端使用官网代码,java客户端报错日志如下:
2024-12-27 09:15:58,649 [MQTT Rec: ark_888addfb809242eb8bd57823262ebc63] ERROR c.i.i.t.b.d.s.i.EmqxStatusServiceImpl - EmqxPlugin失去连接:Connection lost (32109) - java.io.EOFException
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:197)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92)
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137)
… 1 more
本地代码日志如下:
2024-12-27 09:15:59,964 [MQTT Call: ark_888addfb809242eb8bd57823262ebc63] INFO c.i.i.t.b.d.s.i.EmqxStatusServiceImpl - broker连接到EMQX成功
2024-12-27 09:15:59,964 [MQTT Call: ark_888addfb809242eb8bd57823262ebc63] INFO c.i.i.t.b.d.s.i.EmqxStatusServiceImpl - EMQX服务端订阅主题开始:
后面的消息全部丢失,丢失消息率为
97.34%
emqx的日志如下,3个节点差不多一样的
emqx.log.1 的日志如下:
2024-12-18T19:14:36.694815+08:00 [critical] [EMQ X] emqx shutdown for join
2024-12-18T19:14:37.062633+08:00 [warning] [Dashboard] The initial default password for dashboard ‘admin’ user in emqx_dashboard.conf, For safety, it should be changed as soon as possible., Please use the ‘./bin/emqx_ctl admins’ CLI to change it., Then remove dashboard.default_user.login/password
from emqx_dashboard.conf
2024-12-18T21:06:34.510091+08:00 [warning] [Alarm Handler] Alarm high_system_memory_usage is activated, System memory usage is higher than 70%
2024-12-19T09:50:39.437848+08:00 [warning] [Alarm Handler] Alarm high_system_memory_usage is activated, System memory usage is higher than 70.0%
2024-12-19T09:50:39.499874+08:00 [warning] [Dashboard] The initial default password for dashboard ‘admin’ user in emqx_dashboard.conf, For safety, it should be changed as soon as possible., Please use the ‘./bin/emqx_ctl admins’ CLI to change it., Then remove dashboard.default_user.login/password
from emqx_dashboard.conf
2024-12-23T09:49:39.014778+08:00 [warning] [Alarm Handler] Alarm high_system_memory_usage is deactivated
2024-12-26T14:22:15.741581+08:00 [warning] [SYSMON] busy_dist_port warning: suspid = <0.1768.0>, port = #Port<0.14>, [{proc_lib_initial_call,{emqx_pool,init,[‘Argument__1’]}},{memory,19888},{total_heap_size,2315},{heap_size,1598},{stack_size,38},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_stacktrace,[{mnesia_tm,async_send_dirty,6,[{file,“mnesia_tm.erl”},{line,2020}]},{mnesia_tm,dirty,2,[{file,“mnesia_tm.erl”},{line,1076}]},{emqx_cm,do_unregister_channel,1,[{file,“emqx_cm.erl”},{line,151}]},{lists,foreach,2,[{file,“lists.erl”},{line,1342}]},{emqx_pool,handle_cast,2,[{file,“emqx_pool.erl”},{line,108}]},{gen_server,try_dispatch,4,[{file,“gen_server.erl”},{line,695}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,771}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,236}]}]},{registered_name,emqx_pool_1},{status,suspended},{message_queue_len,4},{group_leader,<0.1612.0>},{priority,normal},{trap_exit,false},{reductions,5087896},{last_calls,false},{catchlevel,3},{trace,0},{suspending,},{sequential_trace_token,},{error_handler,error_handler}], [{name,“tcp_inet”},{links,[<0.1643.0>,<0.1476.0>]},{id,112},{connected,<0.1643.0>},{input,83454241},{output,56},{os_pid,undefined}]
2024-12-26T15:36:50.019533+08:00 [warning] [Alarm Handler] Alarm high_cpu_usage is activated, 86.29884570581383% cpu usage
2024-12-26T15:37:50.021630+08:00 [warning] [Alarm Handler] Alarm high_cpu_usage is deactivated
2024-12-26T15:47:50.037503+08:00 [warning] [Alarm Handler] Alarm high_cpu_usage is activated, 84.09825740079782% cpu usage
2024-12-26T15:50:50.041587+08:00 [warning] [Alarm Handler] Alarm high_cpu_usage is deactivated
2024-12-27T09:15:58.714589+08:00 [warning] [SYSMON] busy_dist_port warning: suspid = <0.1771.0>, port = #Port<0.13>, [{proc_lib_initial_call,{emqx_pool,init,[‘Argument__1’]}},{memory,333040},{total_heap_size,35462},{heap_size,28690},{stack_size,38},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_stacktrace,[{mnesia_tm,async_send_dirty,6,[{file,“mnesia_tm.erl”},{line,2020}]},{mnesia_tm,dirty,2,[{file,“mnesia_tm.erl”},{line,1076}]},{emqx_cm,do_unregister_channel,1,[{file,“emqx_cm.erl”},{line,151}]},{lists,foreach,2,[{file,“lists.erl”},{line,1342}]},{emqx_pool,handle_cast,2,[{file,“emqx_pool.erl”},{line,108}]},{gen_server,try_dispatch,4,[{file,“gen_server.erl”},{line,695}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,771}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,236}]}]},{registered_name,emqx_pool_4},{status,suspended},{message_queue_len,549},{group_leader,<0.1612.0>},{priority,normal},{trap_exit,false},{reductions,4818302},{last_calls,false},{catchlevel,3},{trace,0},{suspending,},{sequential_trace_token,},{error_handler,error_handler}], [{name,“tcp_inet”},{links,[<0.1641.0>,<0.1476.0>]},{id,104},{connected,<0.1641.0>},{input,213036117},{output,56},{os_pid,undefined}]
2024-12-27T09:44:00.025959+08:00 [error] message=channel_closed driver=tcp socket=“#Port<0.31>” action=stopping
2024-12-27T09:44:00.026791+08:00 [error] message=channel_closed driver=tcp socket=“#Port<0.33>” action=stopping
2024-12-27T09:44:00.027299+08:00 [error] message=channel_closed driver=tcp socket=“#Port<0.80>” action=stopping
2024-12-27T09:44:36.746366+08:00 [error] message=channel_closed driver=tcp socket=“#Port<0.35>” action=stopping
2024-12-27T09:44:36.747006+08:00 [error] message=channel_closed driver=tcp socket=“#Port<0.71>” action=stopping
2024-12-27T09:48:27.923832+08:00 [warning] [Dashboard] The initial default password for dashboard ‘admin’ user in emqx_dashboard.conf, For safety, it should be changed as soon as possible., Please use the ‘./bin/emqx_ctl admins’ CLI to change it., Then remove dashboard.default_user.login/password
from emqx_dashboard.conf
erlang.log.1的日志如下:后面是我定位重启过emqx
===== ALIVE Fri Dec 27 06:36:53 CST 2024
===== ALIVE Fri Dec 27 06:51:53 CST 2024
===== ALIVE Fri Dec 27 07:06:53 CST 2024
===== ALIVE Fri Dec 27 07:21:53 CST 2024
===== ALIVE Fri Dec 27 07:36:53 CST 2024
===== ALIVE Fri Dec 27 07:51:53 CST 2024
===== ALIVE Fri Dec 27 08:06:53 CST 2024
===== ALIVE Fri Dec 27 08:21:53 CST 2024
===== ALIVE Fri Dec 27 08:36:53 CST 2024
===== ALIVE Fri Dec 27 08:51:54 CST 2024
===== ALIVE Fri Dec 27 09:06:54 CST 2024
===== ALIVE Fri Dec 27 09:21:54 CST 2024
===== ALIVE Fri Dec 27 09:36:54 CST 2024
===== Fri Dec 27 09:45:46 CST 2024
Stop http:management listener on 0.0.0.0:8081 successfully.
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
=====
===== LOGGING STARTED Fri Dec 27 09:48:21 CST 2024
Erlang/OTP 24 [erts-12.1.5] [emqx] [64-bit] [smp:8:8] [ds:8:8:8] [async-threads:4]
Starting emqx on node emqx@172.29.247.161
Start mqtt:tcp:internal listener on 127.0.0.1:11883 successfully.
Start mqtt:tcp:external listener on 0.0.0.0:1884 successfully.
Start mqtt:ws:external listener on 0.0.0.0:8083 successfully.
Start mqtt:ssl:external listener on 0.0.0.0:8883 successfully.
Start mqtt:wss:external listener on 0.0.0.0:8084 successfully.
Start http:management listener on 8081 successfully.
Start http:dashboard listener on 18083 successfully.
EMQ X Broker 4.4.2 is running now!
Eshell V12.1.5 (abort with ^G)
(emqx@172.29.247.161)1>
===== ALIVE Fri Dec 27 10:03:28 CST 2024
请问这种有办法解决吗》新版本是否有这种问题?