Cannot access Mongo Atlas from Ubuntu server

My cluster has 3 nodes but can’t connect atlas, when I check telnet, only 2 nodes are running, the other node is failing. How to handle this error guys?

  1. Did you whitelist your IP address in MongoDB Atlas?
  2. Did you check / open any FW that might be running on your Ubuntu server?
  3. Can you please post the command you are using to try and connect to MongoDB Atlas along with any errors?
  1. I just set it to 0.0.0.0 to try to connect, so I’m sure the IP will be whitelisted
  2. How can i check? Because I don’t manage this server
  3. I just use Docker nodejs then connect by mongoose. and I receive this errors:
    MongoNetworkError: failed to connect to server [realtech-shard-00-01.hdqwa.mongodb.net:27017] on first connect [MongoNetworkTimeoutError: connection timed out
    at connectionFailureError (/usr/src/app/node_modules/mongodb/lib/core/connection/connect.js:362:14)
    at TLSSocket. (/usr/src/app/node_modules/mongodb/lib/core/connection/connect.js:330:16)
    at Object.onceWrapper (node:events:627:28)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at TLSSocket.Socket._onTimeout (node:net:550:8)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)]
    at Pool. (/usr/src/app/node_modules/mongodb/lib/core/topologies/server.js:441:11)
    at Pool.emit (node:events:513:28)
    at Pool.emit (node:domain:489:12)
    at /usr/src/app/node_modules/mongodb/lib/core/connection/pool.js:564:14
    at /usr/src/app/node_modules/mongodb/lib/core/connection/pool.js:1014:9
    at /usr/src/app/node_modules/mongodb/lib/core/connection/connect.js:32:7
    at callback (/usr/src/app/node_modules/mongodb/lib/core/connection/connect.js:300:5)
    at TLSSocket. (/usr/src/app/node_modules/mongodb/lib/core/connection/connect.js:330:7)
    at Object.onceWrapper (node:events:627:28)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at TLSSocket.Socket._onTimeout (node:net:550:8)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
    Here my ufw on ubuntu