I'm migrating mLab from Heroku to MongoDB Atlas. As one of steps I want to check if there is a connectivity to newly created cluster. I'm used Robo3T (formerly Robomongo) for Heroku mLab instances. But it doesn't work with Atlas. I'm getting following error when creating connection from URL:
Cannot connect to replica set "SampleProject"[cluster-abcd12ef-shard-00-00.a0b1c.mongodb.net:27017].
Set's primary is unreachable.
Reason:
Failed to initialize MongoWorker. Reason: connect failed
Tried to adjust settings, but everything looks correct there, like for Heroku, the only host and port are different.
Also looked on similar questions and on GitHub isssues but nothing helped.
If anyone getting this error while using Robo3T version 1.4.4
, we can resolve this issue by update robo3t.json
file (enable logs and you can see where this file localed)
By enable Logs, you will see where settings saved via message starts with
Info: Settings saved to: {robo3t.json_path}
From URI
as normal, then Save.robo3t.json
file using some text editor.connections
scope, lookup your connection just created from step above, find allowInvalidCertificates
property inside ssl
object, change value from false
to true
then save the fileFirst of all, check if you are using latest Robo3T. MongoDB Atlas uses mongodb+srv://
protocol, that was not supported some time before.
After that please go by following check-list:
From SRV
by copy-pasting URL from MongoDB Atlas;Set Name
should be set.important differences on Authentication tab:
Database
should be admin
not like database name (used on Heroku),Auth Mechanism
should be SCRAM-SHA-1
Manually specify visible databases
and type there admin,<you database name from Heroku>
on TLS tab:
Use TLS protocol
Authentication method
- Self-signed Certificate
Now it should work.
P.S. Previously, I also had problems with having database same like on Heroku with same db-name and user-name, also I thought that Auth Mechanism should be MONGODB-CR. But that didn't work.
P.P.S. If you don't see Manually specify visible databases
- then please check if you have the latest version (1.4.+) of Robo3T (previously known as Robomongo)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With