emqx / ekka

Autocluster and Autoheal for EMQX Broker
https://www.emqx.com
Apache License 2.0
97 stars 49 forks source link

Crash when starting a replicant node. #183

Closed ieQu1 closed 1 year ago

ieQu1 commented 1 year ago

I start a core node by make run, and want to join a replicant node to the core node. But the replicant node just crash:

EMQX_CLUSTER__CORE_NODES='emqx@127.0.0.1' EMQX_NODE__DB_ROLE=replicant EMQX_LOG__FILE_HANDLERS__DEFAULT__ENABLE=false EMQX_LOG__CONSOLE_HANDLER__LEVEL=info EMQX_LOG__CONSOLE_HANDLER__ENABLE=true EMQX_NODE__NAME=emqx2@127.0.0.1 EMQX_LISTENERS__WS__DEFAULT__PROXY_PROTOCOL=true EMQX_LISTENERS__TCP__DEFAULT__PROXY_PROTOCOL=true EMQX_LISTENERS__TCP__DEFAULT__BIND='0.0.0.0:1881' EMQX_LISTENERS__SSL__DEFAULT__BIND='0.0.0.0:8881' EMQX_LISTENERS__WS__DEFAULT__BIND='0.0.0.0:8081' EMQX_LISTENERS__WSS__DEFAULT__BIND='0.0.0.0:8094' EMQX_DASHBOARD__LISTENERS__HTTP__BIND='0.0.0.0:18081' EMQX_NODE__DATA_DIR='./data2' ./_build/emqx/rel/emqx/bin/emqx console
2022-12-28T20:34:35.955734+08:00 [error] crasher: initial call: mria_lb:init/1, pid: <0.2147.0>, registered_name: mria_lb, error: {function_clause,[{lists,usort,[ignore],[{file,"lists.erl"},{line,1063}]},{mria_lb,list_core_nodes,1,[{file,"mria_lb.erl"},{line,164}]},{mria_lb,do_update,1,[{file,"mria_lb.erl"},{line,140}]},{mria_lb,handle_info,2,[{file,"mria_lb.erl"},{line,89}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [mria_rlog_sup,mria_sup,<0.2075.0>], message_queue_len: 0, messages: [], links: [<0.2145.0>], dictionary: [{'$logger_metadata$',#{domain => [mria,rlog,lb]}},{rand_seed,{#{bits => 58,jump => #Fun<rand.3.92093067>,next => #Fun<rand.0.92093067>,type => exsss,uniform => #Fun<rand.1.92093067>,uniform_n => #Fun<rand.2.92093067>},[11155160292792974|260709835617318854]}}], trap_exit: true, status: running, heap_size: 4185, stack_size: 29, reductions: 10281; neighbours:
ieQu1 commented 1 year ago

Fixed by https://github.com/emqx/ekka/pull/184