0

I'm trying new GUI of MongoDB called Compass.

However, my MongoDB server is on the Azure virtual machine which has private IP only.

All Azure servers in our virtual subnet are accessible via one server called monitoring Server which has public IP and one haproxy is installed on it and all requests are directed to concern servers accordingly.

So how do I access MongoDB from my desktop(centos) using Compass?

I have made following changes on haproxy and still not able to access mongodb using Compass.

listen cc-mongo-1 <public ip of monitoring server>:27017
  mode tcp
  balance roundrobin
  server cc-mongo-1 <private ip of mongodb>:27017

Or can we do like I installed it on server directly and then try to open GUI from local machine?

innervoice
  • 21
  • 7

1 Answers1

0

If your MongoDB is a replica set - that doesn't work well connecting through a load balancer. Most MongoDB clients will connect and download the replica set topology, then try to connect directly to the members of the replica set.

If you have (or can install) an ssh server on the monitoring server, use the ssh tunnel feature in Compass. Just enter the username/password or identity file you use to connect to the monitoring server from outside, and Compass will take care of the tunnels automatically.