Hi,
We have a few hosts set up and there’s replication taking place between 4 hosts (Azure VMs) in 2 different Azure regions. We successfully use the DB for Production (i.e. our services manage to connect to the DB and the replication works).
I SSH into the primary server and perform a series of the actions below:
mongo
db.auth("***", "****"); //the asterisks stand for secrets
use admin
db.enableFreeMonitoring();
Unable to get immediate response from the Cloud Monitoring service. We willcontinue to retry in the background. Please check your firewall settings to ensure that mongod can communicate with "https://cloud.mongodb.com/freemonitoring/mongo"
Afterwards I exit the Mongo Shell and curl
to https://cloud.mongodb.com/freemonitoring/mongo
. This seems to work well (i.e. HTTP status code is 200).
Additional details:
Mongo version: 4.2.18
OS: Linux
Distro: CentOS
Version: centos 8.5.2111
Connectivity:
Inbound: only connections from Azure VNets (or VPN) is allowed.
Outbound: can connect freely to the internet from any port to any port.
Notes:
AFAIK, only outbound connections are needed to send the data. Hence, the outbound connections aren’t blocked. As seen above, I tested them and they seem to work.
No iptables
are enabled on Azure VMs. Azure Network Security Groups regulate the connectivity instead.