我的emqx用的是6.1单节点部署,运行几天之后异常掉线,日志报错,
另一个日志报错
是什么原因啊
现在是启动一下,马上就异常终止了。
先把日志原文贴出来,截图看不清,没法判断。
请补这些:
emqx6.1.0,部署方式是安装包tar包,解压直接执行bin下的可执行文件启动的,操作系统是乌班图22.04
2026-02-26T14:05:50.511752+08:00 [error] Supervisor: {local,emqx_mt_sup}. Context: child_terminated. Reason: {aborted,{no_exists,[emqx_mt_tombstone,[{{emqx_mt_tombstone,‘$1’,‘‘},[],[’$1’]}]]}}. Offender: id=emqx_mt_config_janitor,pid=<0.8638.0>.
2026-02-26T14:05:50.524931+08:00 [error] Generic server emqx_mt_config_janitor terminating. Reason: {{aborted,{no_exists,[emqx_mt_tombstone,[{{emqx_mt_tombstone,‘$1’,'’},,[‘$1’]}]]}},[{mnesia,abort,1,[{file,“mnesia.erl”},{line,686}]},{emqx_mt_config_janitor,enumerate_deleted_namespaces,0,[{file,“emqx_mt_config_janitor.erl”},{line,124}]},{emqx_mt_config_janitor,handle_cleanup_tombstones,0,[{file,“emqx_mt_config_janitor.erl”},{line,106}]},{emqx_mt_config_janitor,handle_continue,2,[{file,“emqx_mt_config_janitor.erl”},{line,81}]},{gen_server,try_handle_continue,3,[{file,“gen_server.erl”},{line,2424}]},{gen_server,loop,4,[{file,“gen_server.erl”},{line,2291}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}. Last message: {continue,{clean_tombstones}}. State: #{check_timer => undefined}.
2026-02-26T14:05:50.525519+08:00 [error] crasher: initial call: emqx_mt_config_janitor:init/1, pid: <0.8708.0>, registered_name: emqx_mt_config_janitor, exit: {{aborted,{no_exists,[emqx_mt_tombstone,[{{emqx_mt_tombstone,‘$1’,‘‘},[],[’$1’]}]]}},[{mnesia,abort,1,[{file,“mnesia.erl”},{line,686}]},{emqx_mt_config_janitor,enumerate_deleted_namespaces,0,[{file,“emqx_mt_config_janitor.erl”},{line,124}]},{emqx_mt_config_janitor,handle_cleanup_tombstones,0,[{file,“emqx_mt_config_janitor.erl”},{line,106}]},{emqx_mt_config_janitor,handle_continue,2,[{file,“emqx_mt_config_janitor.erl”},{line,81}]},{gen_server,try_handle_continue,3,[{file,“gen_server.erl”},{line,2424}]},{gen_server,loop,4,[{file,“gen_server.erl”},{line,2291}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}, ancestors: [emqx_mt_sup,<0.5503.0>], message_queue_len: 0, messages: [], links: [<0.5504.0>], dictionary: [], trap_exit: false, status: running, heap_size: 6772, stack_size: 29, reductions: 12908; neighbours:
2026-02-26T14:05:50.526775+08:00 [error] Supervisor: {local,emqx_mt_sup}. Context: child_terminated. Reason: {aborted,{no_exists,[emqx_mt_tombstone,[{{emqx_mt_tombstone,‘$1’,'’},,[‘$1’]}]]}}. Offender: id=emqx_mt_config_janitor,pid=<0.8708.0>.
2026-02-26T14:05:50.538727+08:00 [error] Generic server emqx_mt_config_janitor terminating. Reason: {{aborted,{no_exists,[emqx_mt_tombstone,[{{emqx_mt_tombstone,‘$1’,‘‘},[],[’$1’]}]]}},[{mnesia,abort,1,[{file,“mnesia.erl”},{line,686}]},{emqx_mt_config_janitor,enumerate_deleted_namespaces,0,[{file,“emqx_mt_config_janitor.erl”},{line,124}]},{emqx_mt_config_janitor,handle_cleanup_tombstones,0,[{file,“emqx_mt_config_janitor.erl”},{line,106}]},{emqx_mt_config_janitor,handle_continue,2,[{file,“emqx_mt_config_janitor.erl”},{line,81}]},{gen_server,try_handle_continue,3,[{file,“gen_server.erl”},{line,2424}]},{gen_server,loop,4,[{file,“gen_server.erl”},{line,2291}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}. Last message: {continue,{clean_tombstones}}. State: #{check_timer => undefined}.
2026-02-26T14:05:50.539401+08:00 [error] crasher: initial call: emqx_mt_config_janitor:init/1, pid: <0.8778.0>, registered_name: emqx_mt_config_janitor, exit: {{aborted,{no_exists,[emqx_mt_tombstone,[{{emqx_mt_tombstone,‘$1’,'’},,[‘$1’]}]]}},[{mnesia,abort,1,[{file,“mnesia.erl”},{line,686}]},{emqx_mt_config_janitor,enumerate_deleted_namespaces,0,[{file,“emqx_mt_config_janitor.erl”},{line,124}]},{emqx_mt_config_janitor,handle_cleanup_tombstones,0,[{file,“emqx_mt_config_janitor.erl”},{line,106}]},{emqx_mt_config_janitor,handle_continue,2,[{file,“emqx_mt_config_janitor.erl”},{line,81}]},{gen_server,try_handle_continue,3,[{file,“gen_server.erl”},{line,2424}]},{gen_server,loop,4,[{file,“gen_server.erl”},{line,2291}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}, ancestors: [emqx_mt_sup,<0.5503.0>], message_queue_len: 0, messages: , links: [<0.5504.0>], dictionary: , trap_exit: false, status: running, heap_size: 6772, stack_size: 29, reductions: 12908; neighbours:
2026-02-26T14:05:50.540370+08:00 [error] Supervisor: {local,emqx_mt_sup}. Context: child_terminated. Reason: {aborted,{no_exists,[emqx_mt_tombstone,[{{emqx_mt_tombstone,‘$1’,‘_’},,[‘$1’]}]]}}. Offender: id=emqx_mt_config_janitor,pid=<0.8778.0>.
2026-02-26T14:05:50.540763+08:00 [error] Supervisor: {local,emqx_mt_sup}. Context: shutdown. Reason: reached_max_restart_intensity. Offender: id=emqx_mt_config_janitor,pid=<0.8778.0>.
2026-02-26T14:05:51.373626+08:00 [error] Generic server emqx_delayed terminating. Reason: {badarg,[{ets,internal_delete_all,[emqx_delayed,undefined],[{error_info,#{cause => id,module => erl_stdlib_errors}}]},{ets,delete_all_objects,1,[{file,“ets.erl”},{line,363}]},{emqx_delayed,do_load_or_unload,2,[{file,“emqx_delayed.erl”},{line,489}]},{gen_server,try_terminate,3,[{file,“gen_server.erl”},{line,2482}]},{gen_server,terminate,9,[{file,“gen_server.erl”},{line,2733}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}. Last message: {‘EXIT’,<0.5322.0>,shutdown}. State: #{stats_fun => #Fun<emqx_stats.1.132520358>,stats_timer => #Ref<0.1686780452.1815347212.242544>,publish_at => 0,publish_timer => undefined}.
2026-02-26T14:05:51.374420+08:00 [error] crasher: initial call: emqx_delayed:init/1, pid: <0.5331.0>, registered_name: emqx_delayed, error: {badarg,[{ets,internal_delete_all,[emqx_delayed,undefined],[{error_info,#{cause => id,module => erl_stdlib_errors}}]},{ets,delete_all_objects,1,[{file,“ets.erl”},{line,363}]},{emqx_delayed,do_load_or_unload,2,[{file,“emqx_delayed.erl”},{line,489}]},{gen_server,try_terminate,3,[{file,“gen_server.erl”},{line,2482}]},{gen_server,terminate,9,[{file,“gen_server.erl”},{line,2733}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}, ancestors: [emqx_modules_sup,<0.5317.0>], message_queue_len: 0, messages: , links: [<0.5322.0>], dictionary: , trap_exit: true, status: running, heap_size: 6772, stack_size: 29, reductions: 11499; neighbours:
2026-02-26T14:05:51.375048+08:00 [error] Supervisor: {local,emqx_modules_sup}. Context: shutdown_error. Reason: {badarg,[{ets,internal_delete_all,[emqx_delayed,undefined],[{error_info,#{cause => id,module => erl_stdlib_errors}}]},{ets,delete_all_objects,1,[{file,“ets.erl”},{line,363}]},{emqx_delayed,do_load_or_unload,2,[{file,“emqx_delayed.erl”},{line,489}]},{gen_server,try_terminate,3,[{file,“gen_server.erl”},{line,2482}]},{gen_server,terminate,9,[{file,“gen_server.erl”},{line,2733}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}. Offender: id=emqx_delayed,pid=<0.5331.0>.
这是eqmx.log的日志
You are currently using the EMQX Community License included with this software.
Permitted Use: Free use of a single node in your internal environment.
What Requires a Different License:
Crash dump is being written to: /opt/tool/emqx/log/erl_crash.2026.02.26.13.51.08.dump…done
Erlang/OTP 28 [erts-16.1.2] [emqx] [64-bit] [smp:64:64] [ds:64:64:8] [async-threads:4] [jit:ns]
Listener tcp:default on 0.0.0.0:1883 started.
Listener ssl:default on 0.0.0.0:8883 started.
Listener ws:default on 0.0.0.0:8083 started.
Listener wss:default on 0.0.0.0:8084 started.
=====================================================================
You are currently using the EMQX Community License included with this software.
Permitted Use: Free use of a single node in your internal environment.
What Requires a Different License:
Crash dump is being written to: /opt/tool/emqx/log/erl_crash.2026.02.26.14.04.42.dump…done
这是erlang.log的日志
启动是成功的,等两分钟就停止了
这是元数据(mnesia)表缺失导致 emqx_mt_config_janitor 崩溃,单节点启动几分钟后触发清理就退出。直接修数据:
可以清理数据,怎么操作呢,租户配置是指客户端的账号密码吗?我把完整的日志前后200行和路径我也发给你
你的日志里面有 3 个问题:
1.
2026-02-02T09:35:00.800736+08:00 [warning] msg: config_roots_not_recognized, config_roots: auth
emqx 的配置里面没有以 auth 开头的配置。你应该是配置错了。
在你的 etc/emqx.conf里面。
如果你可以删除数据的话,把/opt/tool/emqx2/data/ 整个清空 掉。
2026-02-02T09:43:00.744214+08:00 [error] crasher: initial call: disk_log:init/2, pid: <0.4052.0>, registered_name: , exit: {{{failed,{error,{file_error,“/opt/tool/emqx2/data/mnesia/emqx@127.0.0.1/PREVIOUS.LOG”,enoent}}},[{disk_log,reopen,2}]},[{disk_log,do_exit,4,[{file,“disk_log.erl”},{line,1873}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,333}]}]}, ancestors: [disk_log_sup,kernel_safe_sup,kernel_sup,<0.3812.0>], message_queue_len: 0, messages: , links: [<0.3874.0>], dictionary: [{quiet,false},{write_cache_timer_is_running,true}], trap_exit: true, status: running, heap_size: 987, stack_size: 29, reductions: 19310; neighbours:
2026-02-02T09:43:00.745320+08:00 [error] Supervisor: {local,disk_log_sup}. Context: child_terminated. Reason: {{failed,{error,{file_error,“/opt/tool/emqx2/data/mnesia/emqx@127.0.0.1/PREVIOUS.LOG”,enoent}}},[{disk_log,reopen,2}]}. Offender: id=disk_log,pid=<0.4052.0>.
2026-02-02T09:43:00.945625+08:00 [error] Mnesia(‘emqx@127.0.0.1’): ** ERROR ** (core dumped to file: “/opt/tool/emqx/MnesiaCore.emqx@127.0.0.1_1769_996580_942857”), ** FATAL ** {error,{“Cannot rename disk_log file”,latest_log,“/opt/tool/emqx2/data/mnesia/emqx@127.0.0.1/PREVIOUS.LOG”,{log_header,trans_log,“4.3”,“4.24.1”,‘emqx@127.0.0.1’,{1769,996580,743158}},{file_error,“/opt/tool/emqx2/data/mnesia/emqx@127.0.0.1/PREVIOUS.LOG”,enoent}}}
2026-02-02T09:43:10.944175+08:00 [error] Supervisor: {local,emqx_conf_sup}. Context: child_terminated. Reason: killed. Offender: id=emqx_cluster_rpc,pid=<0.4179.0>.
2026-02-02T09:43:10.944162+08:00 [error] Supervisor: {local,mria_sup}. Context: child_terminated. Reason: killed. Offender: id=mria_schema,pid=<0.4076.0>.
2026-02-02T09:43:10.944113+08:00 [error] msg: unexpected_info, req: {‘EXIT’,<0.4034.0>,killed}
2026-02-21T07:02:42.944004+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944218+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944085+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944336+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944358+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944566+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944788+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944751+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944325+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944413+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944913+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944870+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
2026-02-21T07:02:42.944743+08:00 [warning] Ranch acceptor reducing accept rate: out of file descriptors
你没有做系统参数调优,系统的文件描述符全用完了。
2026-02-26T14:05:49.893403+08:00 [error] Supervisor: {local,mnesia_kernel_sup}. Context: child_terminated. Reason: killed. Offender: id=mnesia_locker,pid=<0.4032.0>.
2026-02-26T14:05:49.893729+08:00 [error] Supervisor: {local,mnesia_kernel_sup}. Context: shutdown. Reason: reached_max_restart_intensity. Offender: id=mnesia_locker,pid=<0.4032.0>.
2026-02-26T14:05:49.893480+08:00 [error] Mnesia(‘emqx@127.0.0.1’): ** ERROR ** (could not write core file: emfile), ** FATAL ** Cannot open log file “/opt/tool/emqx/data/mnesia/emqx@127.0.0.1/PREVIOUS.LOG”: {file_error,“/opt/tool/emqx/data/mnesia/emqx@127.0.0.1/PREVIOUS.LOG”,emfile}
2026-02-26T14:05:49.896850+08:00 [warning] msg: cm_registry_mnesia_down, node: ‘emqx@127.0.0.1’
2026-02-26T14:05:49.897412+08:00 [error] Supervisor: {local,mnesia_sup}. Context: child_terminated. Reason: shutdown. Offender: id=mnesia_kernel_sup,pid=<0.4029.0>.
2026-02-26T14:05:49.897851+08:00 [error] Supervisor: {local,mnesia_sup}. Context: shutdown. Reason: reached_max_restart_intensity. Offender: id=mnesia_kernel_sup,pid=<0.4029.0>.
2026-02-26T14:05:49.942022+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943013+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943077+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943126+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943039+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943038+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943184+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943209+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943049+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943219+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943199+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943274+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943233+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943229+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943263+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
2026-02-26T14:05:49.943998+08:00 [critical] msg: cannot_accept_more_connections, cause: EMFILE (Too many open files), listener: 0.0.0.0:1883
26 号就是只有这个 too many open files, 按文档做完系统调优应该就好了。
我这个auth,是emqx.conf配置的1883的连接的账号和密码啊,第二个恢复数据库的文件,我没有emqx2这个目录啊,我opt下tool下就只有个emqx目录
EMQX 6.1 没有这种东西。你配置错了,看看对应版本的文档。
那个数据库恢复的文件是 2 号报的错。估计是你已经删除掉了?
你直接系统调优就好了,26 号的错,对应的就是这个原因。
我先把系统按照文档调优了