Nslookup connection string

Hello everyone. New guy here.
I’ve been trying to connect to my atlas cluster with a JDBC driver, but i cant even nslookup the connection string.
I’ve even tried 4 different ISPs , different computers, wired/wireless connections…
Also tried nslookup -type=any cluster0.ogef46p.mongodb.net.
I created the script below to test it and it works, but i need to use a one line JDBC url, and i can’t make working even with the three shards connection urls i got from the command: dig +short SRV mongodb. tcp.cluster0.ogef46p.mongodb.net. I only get timeout. I need help…

String connectionUrl = “jdbc:mongodb:Server=<Cluster_Nome>;”
+ “User=;”
+ “Password=;”
+ “Database=testdb;”
+ “AuthDatabase=admin;”
+ “AuthMechanism=SCRAM-SHA-1;”
+ “UseSSL=true;”
+ “ReplicaSet:27017=ac-ysiaabw-shard-00-00.ogef46p.mongodb.net,”
+ “ac-ysiaabw-shard-00-01.ogef46p.mongodb.net:27017;”;

Hi @Telmo_baia

  • mongodb.net won’t respond to lookup requests, that’s a security thing.
  • If you can’t connect to your cluster, you perhaps may not have whitelisted your incoming IP address

Thank you. I solved it.
Had to use the shards to connect to it.
For anyone interested, i used:

jdbc:mongodb://:@ac-ysiaabw-shard-00-00.xxxxxxx.mongodb.net:27017,ac-ysiaabw-shard-00-01.xxxxxxx.mongodb.net:27017,ac-ysiaabw-shard-00-02.xxxxxxx.mongodb.net:27017/?retryWrites=true&ssl=true&AuthMechanism=SCRAM-SHA-1&authSource=admin

AuthMechanism=SCRAM-SHA-1 was missing.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.