MQTT报错

环境

  • EMQX 版本:5.1.6

2023-10-27T18:12:17.298233+00:00 [error] Mnesia(‘emqx@192.168.3.15’): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, ‘emqx@192.168.3.13’}
2023-10-27T18:12:17.298244+00:00 [critical] msg: Core cluster partition, mfa: mria_node_monitor:handle_info/2, line: 160, context: running_partitioned_network, from: ‘emqx@192.168.3.13’
2023-10-27T18:12:17.303546+00:00 [warning] msg: alarm_is_activated, mfa: emqx_alarm:do_actions/3, line: 418, message: <<“Partition occurs at node emqx@192.168.3.13”>>, name: partition
2023-10-27T18:12:17.308577+00:00 [error] Mnesia(‘emqx@192.168.3.15’): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, ‘emqx@192.168.3.14’}
2023-10-27T18:12:17.308540+00:00 [critical] msg: Core cluster partition, mfa: mria_node_monitor:handle_info/2, line: 160, context: running_partitioned_network, from: ‘emqx@192.168.3.14’
2023-10-27T18:12:17.318476+00:00 [error] Mnesia(‘emqx@192.168.3.15’): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, ‘emqx@192.168.3.16’}
2023-10-27T18:12:17.318510+00:00 [critical] msg: Core cluster partition, mfa: mria_node_monitor:handle_info/2, line: 160, context: running_partitioned_network, from: ‘emqx@192.168.3.16’
2023-10-27T18:12:17.319931+00:00 [error] Mnesia(‘emqx@192.168.3.15’): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, ‘emqx@192.168.3.12’}
2023-10-27T18:12:17.319908+00:00 [critical] msg: Core cluster partition, mfa: mria_node_monitor:handle_info/2, line: 160, context: running_partitioned_network, from: ‘emqx@192.168.3.12’
2023-10-27T18:12:17.859374+00:00 [warning] ‘global’ at node ‘emqx@192.168.3.15’ requested disconnect from node ‘emqx@192.168.3.12’ in order to prevent overlapping partitions
2023-10-27T18:12:17.860505+00:00 [warning] ‘global’ at node ‘emqx@192.168.3.15’ requested disconnect from node ‘emqx@192.168.3.16’ in order to prevent overlapping partitions
2023-10-27T18:12:17.878941+00:00 [error] Mnesia(‘emqx@192.168.3.15’): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, ‘emqx@192.168.3.12’}
2023-10-27T18:12:17.878923+00:00 [critical] msg: Core cluster partition, mfa: mria_node_monitor:handle_info/2, line: 160, context: running_partitioned_network, from: ‘emqx@192.168.3.12’
2023-10-27T18:12:17.889158+00:00 [error] Mnesia(‘emqx@192.168.3.15’): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, ‘emqx@192.168.3.16’}
2023-10-27T18:12:17.890325+00:00 [critical] msg: Core cluster partition, mfa: mria_node_monitor:handle_info/2, line: 160, context: running_partitioned_network, from: ‘emqx@192.168.3.16’
2023-10-27T18:12:18.405491+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {mnesia_locker,‘emqx@192.168.3.12’,granted}
2023-10-27T18:12:18.406151+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5058.0>,normal}
2023-10-27T18:12:18.424784+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5079.0>,normal}
2023-10-27T18:12:18.425379+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5080.0>,normal}
2023-10-27T18:12:18.426036+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5081.0>,normal}
2023-10-27T18:12:18.426607+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5082.0>,normal}
2023-10-27T18:12:18.427344+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5083.0>,normal}
2023-10-27T18:12:18.427868+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5084.0>,normal}
2023-10-27T18:12:18.428879+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5085.0>,normal}
2023-10-27T18:12:18.429606+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5086.0>,normal}
2023-10-27T18:12:18.430099+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5087.0>,normal}
2023-10-27T18:12:18.430622+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5088.0>,normal}
2023-10-27T18:12:18.431080+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5089.0>,normal}
2023-10-27T18:12:18.431625+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5090.0>,normal}
2023-10-27T18:12:18.432094+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5091.0>,normal}
2023-10-27T18:12:18.433037+00:00 [error] msg: unexpected_info, mfa: emqx_router_helper:handle_info/2, line: 170, info: {‘EXIT’,<0.5092.0>,normal}
2023-10-27T18:12:36.206922+00:00 [warning] msg: Stopping mria, mfa: mria:stop/1, line: 134, reason: join
2023-10-27T18:12:37.616833+00:00 [error] msg: ctl_command_crashed, mfa: emqx_ctl:run_command/2, line: 126, reason: {error,{aborted,function_clause}}, stacktrace: [{mria_lib,ensure_ok,1,[{file,“mria_lib.erl”},{line,187}]},{mria_mnesia,join_cluster,1,[{file,“mria_mnesia.erl”},{line,152}]},{mria,do_join,3,[{file,“mria.erl”},{line,600}]},{global,trans,4,[{file,“global.erl”},{line,477}]},{emqx_mgmt_cli,cluster,1,[{file,“emqx_mgmt_cli.erl”},{line,113}]},{emqx_ctl,run_command,2,[{file,“emqx_ctl.erl”},{line,122}]},{erpc,execute_call,4,[{file,“erpc.erl”},{line,589}]}]

在MQTT运行的过程中出现了几个报错,可以看一下是什么原因引起的吗?

这个是你集群间的节点,网络出现了异常,导致集群的节点同步出了问题。
出现分片了。

网络出现异常以后,分片需要处理吗?会不会影响网络恢复后的再次集群?

按理在网络恢复后,EMQX 会自动治愈集群的。在发生网络分区后的这 2023-10-27T18:12:17-2023-10-27T18:12:37 这段时间后,后面 EMQX 有回复正常么?

目前我们的处理方式是网络出现异常后,会把对应的节点移除。因为不确定出现异常的设备是不再使用还是真的就是网络出现了异常。网络恢复后,会重新加入集群