I created a mongodb cluster and unable to connect to it when using RoboMongo client to connect to it using the connection parameters showin the mongo dashboard . When i ping the host displayed in the connnection string , i am seeing the error No address associated with hostname . is there anything else that i have to do apart from creating the mongodb cluster and creating the database and user ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
Cluster hostnames do not resolve using standard
dig
requests to the hostname in the connection string.MongoDB clusters are hosted on multiple nodes and each has its own hostname. To retrieve the node hostnames of a cluster using
dig
, you must specify thesrv
record type in the request and prepend_mongodb._tcp.
to the hostname in the connection string like this:When you connect to your cluster, you need to make sure that you provide the
+srv
flag in the connection string as follows:If you are still unable to connect, you might have locked down the database cluster to a specific set of IP addresses via the Trusted Sources. If this is the case, make sure to add your IP address to the Trusted Sources list as well.
Let me know how it goes!
Best,
Bobby