Hi,
It seems like a connection can be made. But then it redirects to the internal IP-address, which isn’t available from the outside.
connecting to: mongodb://PublicIP:27017,PublicIP:27017/?compressors=disabled&gssapiServiceName=mongodb&replicaSet=MongoDB-Cluster
2020-09-01T19:24:07.199+0200 I NETWORK [js] Starting new replica set monitor for MongoDB-Cluster/PublicIP:27017,PublicIP:27017
2020-09-01T19:24:07.199+0200 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to PublicIP:27017
2020-09-01T19:24:07.199+0200 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to PublicIP:27017
2020-09-01T19:24:07.331+0200 I NETWORK [ReplicaSetMonitor-TaskExecutor] Confirmed replica set for MongoDB-Cluster is MongoDB-Cluster/PrivateIP:27017,PrivateIP:27017
2020-09-01T19:24:07.331+0200 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to PrivateIP:27017
2020-09-01T19:24:07.331+0200 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to PrivateIP:27017
2020-09-01T19:24:17.722+0200 W NETWORK [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set MongoDB-Cluster
2020-09-01T19:24:17.722+0200 I NETWORK [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set MongoDB-Cluster. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2020-09-01T19:24:23.229+0200 W NETWORK [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set MongoDB-Cluster
2020-09-01T19:24:23.229+0200 I NETWORK [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set MongoDB-Cluster. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2020-09-01T19:24:23.229+0200 E QUERY [js] Error: connect failed to replica set MongoDB-Cluster/PublicIP:27017,PublicIP:27017 :
connect@src/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-09-01T19:24:23.233+0200 F - [main] exception: connect failed
2020-09-01T19:24:23.233+0200 E - [main] exiting with code 1
Maybe I added the nodes in a wrong way ? Or do I have to specify their public IP somewhere ?