emq4.x版本社区版集群用户认证问题

部署了2个节点的集群,使用匿名访问,集群正常,开启用户认证后,节点之间相互发现不了。
配置 如下
emqx.conf
allow_anonymous = false
acl_nomatch = deny

cat /usr/local/tools/emqx/etc/plugins/emqx_auth_mnesia.conf
auth.client.1.clientid = admin
auth.client.1.password =123456
auth.user.1.username = admin
auth.user.1.password = 123456

请大师帮解答一下,是不是社区版不支持用户密码认证方式

你好,用户名密码认证都是支持的。

节点之间相互发现不了是指从集群状态变成两个单节点了吗?具体有什么现象吗?包括 EMQX 有没有输出什么日志?

日志信息
[root@zhtc-mq2 log]# more emqx.log.1
2022-11-04T09:36:08.695935+08:00 [error] Mnesia(‘emq1@172.17.20.39’): ** ERROR ** mnesia_event got {inconsistent_database, starting_partitioned_network, ‘emq1@172.17.20.38’}
2022-11-04T09:36:08.717536+08:00 [error] Mnesia(‘emq1@172.17.20.39’): ** ERROR ** (core dumped to file: “/usr/local/tools/emqx/MnesiaCore.emq1@172.17.20.39_1667_525768_717184”), ** FATAL ** Failed to merge schema: Bad
cookie in table definition emqx_shared_subscription: ‘emq1@172.17.20.39’ = {cstruct,emqx_shared_subscription,bag,[‘emq1@172.17.20.39’,‘emq1@172.17.20.38’],,,,0,read_write,false,,,false,emqx_shared_subscriptio
n,[group,topic,subpid],,,,{{1667445417177902581,-576460752303422557,1},‘emq1@172.17.20.38’},{{3,0},{‘emq1@172.17.20.39’,{1667,445898,265398}}}}, ‘emq1@172.17.20.38’ = {cstruct,emqx_shared_subscription,bag,[‘emq1@
172.17.20.38’],,,,0,read_write,false,,,false,emqx_shared_subscription,[group,topic,subpid],,,,{{1667446097163866360,-576460752303422461,1},‘emq1@172.17.20.38’},{{2,0},}}
2022-11-04T09:36:18.718120+08:00 [error] Supervisor: {local,mnesia_sup}. Context: start_error. Reason: killed. Offender: id=mnesia_kernel_sup,pid=undefined.
2022-11-04T09:36:18.718418+08:00 [error] Generic server mnesia_recover terminating. Reason: killed. Last message: {‘EXIT’,<0.1626.0>,killed}. State: {state,<0.1626.0>,undefined,undefined,undefined,0,false,true,}.
2022-11-04T09:36:18.718365+08:00 [error] Generic server mnesia_subscr terminating. Reason: killed. Last message: {‘EXIT’,<0.1626.0>,killed}. State: {state,<0.1626.0>,#Ref<0.774154825.1246887937.33166>}.
2022-11-04T09:36:18.718510+08:00 [error] Generic server mnesia_monitor terminating. Reason: killed. Last message: {‘EXIT’,<0.1626.0>,killed}. State: {state,<0.1626.0>,,,true,,undefined,,}.
2022-11-04T09:36:18.718636+08:00 [error] crasher: initial call: mnesia_subscr:init/1, pid: <0.1628.0>, registered_name: mnesia_subscr, exit: {killed,[{gen_server,decode_msg,9,[{file,“gen_server.erl”},{line,475}]},{proc
lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,226}]}]}, ancestors: [mnesia_kernel_sup,mnesia_sup,<0.1622.0>], message_queue_len: 0, messages: [], links: [], dictionary: [], trap_exit: true, status: running, heap
size: 1598, stack_size: 28, reductions: 4396; neighbours:

增加用户认证时,集群状态是正确的,目前应该是出现了脑裂

是脑裂了。解决办法是:删掉其中一个节点的 data/mnesia/*,然后把这个节点 join 到另一个节点上去。