EMQX v5.0 Connect to MongoDB Atlas

Can I use mongoDB Atlas as authentication in EMQX v5.0 ?? I set up all the setting but I cant connect.

This is supported. If you cannot connect, you can check the EMQX log, there will be error messages in it. You can also attach it here.

I set up the EMQX as a container in a docker locally, and I can connect to MongoDB Atlas. but if I run the same config file in a Container in an EC2 I’m not able to connect to MongoDB. I received this log.

2022-12-30T02:19:03.249173+00:00 [warning] line: 421, mfa: emqx_alarm:do_actions/3, msg: alarm_is_deactivated, name: <<“emqx_authn_mongodb:56”>
2022-12-30T02:19:03.236383+00:00 [warning] line: 295, mfa: emqx_connector_mongo:check_worker_health/1, msg: mongo_connection_get_status_error, reason: timeout
2022-12-30T02:19:03.237185+00:00 [warning] line: 295, mfa: emqx_connector_mongo:check_worker_health/1, msg: mongo_connection_get_status_error, reason: timeout
2022-12-30T02:19:03.237749+00:00 [warning] instance_id: <<“emqx_authn_mongodb:56:57”>>, line: 274, mfa: emqx_connector_mongo:on_get_status/2, msg: emqx_connector_mongo_health_check, status: failed
2022-12-30T02:19:03.236159+00:00 [warning] line: 295, mfa: emqx_connector_mongo:check_worker_health/1, msg: mongo_connection_get_status_error, reason: timeout
2022-12-30T02:19:03.236231+00:00 [warning] line: 295, mfa: emqx_connector_mongo:check_worker_health/1, msg: mongo_connection_get_status_error, reason: timeout
2022-12-30T02:19:03.236301+00:00 [warning] line: 295, mfa: emqx_connector_mongo:check_worker_health/1, msg: mongo_connection_get_status_error, reason: timeout

Sorry for not seeing your reply in time. This means that the connection timed out, can you connect to it using MongoDB’s command-line tools in the current environment?