Reputation: 7708
I have two mongo
databases created in mLab. The first one is created directly from my personal account on mLab.
mongodb://nottheactualuser:[email protected]:11168/db1
The other was created from Microsoft Azure Portal > Marketplace.
mongodb://nottheactualuser:[email protected]:64278/db1
The first one is connecting successfully while the other one created from Azure is producing this error.
Connection error: MongoError: getaddrinfo ENOTFOUND
Has anyone encountered this yet? How do I solve this? Thanks.
Upvotes: 0
Views: 432
Reputation: 7708
Upon contacting the mlab support they told me this.
I cannot use the URL directly from mLab -
-Because the ICMP protocol is not permitted through the Azure load balancer, you will notice that you are unable to ping an Azure VM from the internet. You can read more about that here: https://blogs.msdn.microsoft.com/mast/2014/06/22/use-port-pings-instead-of-icmp-to-test-azure-vm-connectivity/
my mistake was I assumed that it would be fine to use the link directly from mLab. So I search further more and I came across with this post.
TL;DR
Navigate to Market Place and select your mLab database and click connection info.
A window will appear containing the MONGOLAB_URI you needed.
I hope this helps.
Upvotes: 1