EMQX报错,执行emqx start没有作用

环境

  • EMQX 版本:5.1.6
    2023-10-25T08:48:58.063638+00:00 [error] Supervisor: {local,mria_sup}. Context: shutdown_error. Reason: killed. Offender: id=mria_membership,pid=<0.8040.3>.
    2023-10-25T09:24:35.225151+00:00 [error] Mnesia(‘emqx@192.168.3.28’): ** ERROR ** (core dumped to file: “/opt/emqx/MnesiaCore.emqx@192.168.3.28_1698_225875_223315”), ** FATAL ** Failed to merge schema: Bad cookie in table definition emqx_trie: ‘emqx@192.168.3.28’ = {cstruct,emqx_trie,ordered_set,[‘emqx@192.168.3.28’,‘emqx@192.168.3.21’,‘emqx@192.168.3.25’],,,,0,read_write,false,,,false,emqx_trie,[key,count],,,[{ets,[{read_concurrency,true},{write_concurrency,true}]}],{{1698084791271920000,-576460752303421918,1},‘emqx@192.168.3.26’},{{19,0},{‘emqx@192.168.3.28’,{1698,223726,910523}}}}, ‘emqx@192.168.3.25’ = {cstruct,emqx_trie,ordered_set,[‘emqx@192.168.3.27’,‘emqx@192.168.3.25’,‘emqx@192.168.3.26’],,,,0,read_write,false,,,false,emqx_trie,[key,count],,,[{ets,[{read_concurrency,true},{write_concurrency,true}]}],{{1698225323997920250,-576460752303422143,1},‘emqx@192.168.3.26’},{{4,0},{‘emqx@192.168.3.27’,{1698,225549,433516}}}}
    2023-10-25T09:24:45.224662+00:00 [error] Generic server mnesia_recover terminating. Reason: killed. Last message: {‘EXIT’,<0.2173.0>,killed}. State: {state,<0.2173.0>,undefined,undefined,undefined,0,false,true,}.
    2023-10-25T09:24:45.225599+00:00 [error] Generic server mnesia_subscr terminating. Reason: killed. Last message: {‘EXIT’,<0.2173.0>,killed}. State: {state,<0.2173.0>,#Ref<0.1078378046.3503423489.54428>}.
    2023-10-25T09:24:45.225363+00:00 [error] crasher: initial call: gen_event:init_it/6, pid: <0.2171.0>, registered_name: mnesia_event, exit: {killed,[{gen_event,terminate_server,4,[{file,“gen_event.erl”},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [mnesia_sup,<0.2169.0>], message_queue_len: 1, messages: [{notify,{mnesia_system_event,{mnesia_down,‘emqx@192.168.3.28’}}}], links: , dictionary: , trap_exit: true, status: running, heap_size: 6772, stack_size: 28, reductions: 6414; neighbours:
    2023-10-25T09:24:45.226516+00:00 [error] Generic server mnesia_monitor terminating. Reason: killed. Last message: {‘EXIT’,<0.2173.0>,killed}. State: {state,<0.2173.0>,,,true,,undefined,,}.
    2023-10-25T09:24:45.226065+00:00 [error] crasher: initial call: mnesia_subscr:init/1, pid: <0.2175.0>, registered_name: mnesia_subscr, exit: {killed,[{gen_server,decode_msg,9,[{file,“gen_server.erl”},{line,909}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [mnesia_kernel_sup,mnesia_sup,<0.2169.0>], message_queue_len: 0, messages: , links: , dictionary: , trap_exit: true, status: running, heap_size: 2586, stack_size: 28, reductions: 2445; neighbours:
    2023-10-25T09:24:45.226498+00:00 [error] crasher: initial call: application_master:init/4, pid: <0.2168.0>, registered_name: , exit: {{normal,{mnesia_app,start,[normal,]}},[{application_master,init,4,[{file,“application_master.erl”},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [<0.2167.0>], message_queue_len: 1, messages: [{‘EXIT’,<0.2169.0>,normal}], links: [<0.2167.0>,<0.1984.0>], dictionary: , trap_exit: true, status: running, heap_size: 376, stack_size: 28, reductions: 195; neighbours:
    2023-10-25T09:24:45.228279+00:00 [error] crasher: initial call: application_master:init/4, pid: <0.2160.0>, registered_name: , exit: {{bad_return,{{mria_app,start,[normal,]},{‘EXIT’,{{badmatch,{error,{normal,{mnesia_app,start,[normal,]}}}},[{mria_mnesia,ensure_started,0,[{file,“mria_mnesia.erl”},{line,112}]},{mria_app,start,2,[{file,“mria_app.erl”},{line,36}]},{application_master,start_it_old,4,[{file,“application_master.erl”},{line,293}]}]}}}},[{application_master,init,4,[{file,“application_master.erl”},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [<0.2159.0>], message_queue_len: 1, messages: [{‘EXIT’,<0.2161.0>,normal}], links: [<0.2159.0>,<0.1984.0>], dictionary: , trap_exit: true, status: running, heap_size: 376, stack_size: 28, reductions: 195; neighbours:
    2023-10-25T09:24:45.225247+00:00 [error] crasher: initial call: mnesia_recover:init/1, pid: <0.2177.0>, registered_name: mnesia_recover, exit: {killed,[{gen_server,decode_msg,9,[{file,“gen_server.erl”},{line,909}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [mnesia_kernel_sup,mnesia_sup,<0.2169.0>], message_queue_len: 0, messages: , links: , dictionary: , trap_exit: true, status: running, heap_size: 4185, stack_size: 28, reductions: 8166; neighbours:
    2023-10-25T09:24:45.230711+00:00 [error] crasher: initial call: application_master:init/4, pid: <0.2157.0>, registered_name: , exit: {{bad_return,{{emqx_machine_app,start,[normal,]},{‘EXIT’,{{badmatch,{error,{mria,{bad_return,{{mria_app,start,[normal,]},{‘EXIT’,{{badmatch,{error,{normal,{mnesia_app,start,[normal,]}}}},[{mria_mnesia,ensure_started,0,[{file,“mria_mnesia.erl”},{line,112}]},{mria_app,start,2,[{file,“mria_app.erl”},{line,36}]},{application_master,start_it_old,4,[{file,“application_master.erl”},{line,293}]}]}}}}}}},[{mria,start,0,[{file,“mria.erl”},{line,125}]},{ekka,start,0,[{file,“ekka.erl”},{line,94}]},{emqx_machine,start,0,[{file,“emqx_machine.erl”},{line,45}]},{emqx_machine_app,start,2,[{file,“emqx_machine_app.erl”},{line,27}]},{application_master,start_it_old,4,[{file,“application_master.erl”},{line,293}]}]}}}},[{application_master,init,4,[{file,“application_master.erl”},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [<0.2156.0>], message_queue_len: 1, messages: [{‘EXIT’,<0.2158.0>,normal}], links: [<0.2156.0>,<0.1984.0>], dictionary: , trap_exit: true, status: running, heap_size: 987, stack_size: 28, reductions: 221; neighbours:
    2023-10-25T09:24:45.231915+00:00 [error] crasher: initial call: mnesia_monitor:init/1, pid: <0.2174.0>, registered_name: mnesia_monitor, exit: {killed,[{gen_server,decode_msg,9,[{file,“gen_server.erl”},{line,909}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [mnesia_kernel_sup,mnesia_sup,<0.2169.0>], message_queue_len: 0, messages: , links: [<58793.2179.0>,<58796.6294.1>,<0.2236.0>,<58792.15591.3>], dictionary: , trap_exit: true, status: running, heap_size: 4185, stack_size: 28, reductions: 10171; neighbours:

报错原因是什么?

看起来是你的老版本的数据没有删除干净。

怎么能删除干净?

把data目录的东西删除干净:

data下面包含uuid、configs文件夹、mnesia文件夹、patches文件夹、root_erl_pipes文件夹、scripts文件夹、trace文件夹。这些文件和文件夹都删了吗?