emqx:5.1.3使用mongodb认证时连接超时

我在统一局域网的两台服务器上分别安装了mongodb6.0.8,版本是一样的,密码也是一样的,然而一台能能使用emqx:5.1.3连上进行认证,切换到另一台服务器上的mongodb时却连接不上,关闭防火墙后依然连不上


查看日志:错误信息如下
2023-09-25T09:02:57.049978+00:00 [error] crasher: initial call: mc_topology:init/1, pid: <0.5897.16>, registered_name: , exit: {{connect_failed,timeout},[{gen_server,init_it,6,[{file,“gen_server.erl”},{line,835}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [<0.5895.16>,<0.5894.16>,<0.5892.16>,ecpool_sup,<0.2438.0>], message_queue_len: 1, messages: [{‘$gen_cast’,init_seeds}], links: [<0.5895.16>], dictionary: , trap_exit: false, status: running, heap_size: 610, stack_size: 28, reductions: 372; neighbours:
2023-09-25T09:02:57.050195+00:00 [error] Supervisor: {<0.5894.16>,ecpool_worker_sup}. Context: start_error. Reason: {connect_failed,timeout}. Offender: id={worker,1},pid=undefined.
2023-09-25T09:02:57.050255+00:00 [error] crasher: initial call: ecpool_worker:init/1, pid: <0.5895.16>, registered_name: , exit: {{connect_failed,timeout},[{gen_server,init_it,6,[{file,“gen_server.erl”},{line,835}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,240}]}]}, ancestors: [<0.5894.16>,<0.5892.16>,ecpool_sup,<0.2438.0>], message_queue_len: 0, messages: , links: [<0.5896.16>,<0.5897.16>,<0.5894.16>], dictionary: , trap_exit: true, status: running, heap_size: 610, stack_size: 28, reductions: 332; neighbours:
2023-09-25T09:02:57.050388+00:00 [error] Supervisor: {<0.5892.16>,ecpool_pool_sup}. Context: start_error. Reason: {shutdown,{failed_to_start_child,{worker,1},{connect_failed,timeout}}}. Offender: id=worker_sup,pid=undefined.
2023-09-25T09:02:57.050500+00:00 [error] Generic server mc_pool_sup terminating. Reason: {connect_failed,timeout}. Last message: {‘EXIT’,<0.5895.16>,{connect_failed,timeout}}. State: {state,{local,mc_pool_sup},simple_one_for_one,{[worker_pool],#{worker_pool => {child,undefined,worker_pool,{poolboy,start_link,},transient,false,5000,worker,[poolboy]}}},{maps,#{}},1000,3600,,0,never,mc_pool_sup,}.
2023-09-25T09:02:57.050624+00:00 [error] crasher: initial call: supervisor:mc_pool_sup/1, pid: <0.5896.16>, registered_name: mc_pool_sup, exit: {{connect_failed,timeout},[{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: [<0.5895.16>,<0.5894.16>,<0.5892.16>,ecpool_sup,<0.2438.0>], message_queue_len: 0, messages: , links: , dictionary: , trap_exit: true, status: running, heap_size: 4185, stack_size: 28, reductions: 4122; neighbours:
2023-09-25T09:02:57.051016+00:00 [error] msg: start_ecpool_error, mfa: emqx_resource_pool:start/3, line: 51, pool_name: <<“emqx_authn_mongodb:7801”>>, reason: {connect_failed,timeout}
2023-09-25T09:02:57.051140+00:00 [warning] msg: start_resource_failed, mfa: emqx_resource_manager:start_resource/2, line: 492, id: <<“emqx_authn_mongodb:7801”>>, reason: {start_pool_failed,<<“emqx_authn_mongodb:7801”>>,{connect_failed,timeout}}
2023-09-25T09:02:57.051295+00:00 [warning] msg: alarm_is_activated, mfa: emqx_alarm:do_actions/3, line: 418, message: <<“resource down: {start_pool_failed,<<"emqx_authn_mongodb:7801">>,{connect_failed,timeout}}”>>, name: <<“emqx_authn_mongodb:7801”>>
2023-09-25T09:03:05.697891+00:00 [warning] msg: alarm_is_deactivated, mfa: emqx_alarm:do_actions/3, line: 424, name: <<“emqx_authn_mongodb:7801”>>

timeout 应该是网络不通的问题,你使用 telnet 测试一下 mongodb 端口看看。