https://rancher.com/ logo
a

abundant-queen-40434

02/24/2023, 3:57 PM
I’m trying to run a MongoDB replica set on Rancher Desktop. I got MongoDB running, but I’m having problems connecting. I used RancherDesktop to port-forward the mongodb service to the standard port of 27017. When I try to connect using MongoDB Compass with the url:
<mongodb://user:password@localhost:27017/admin>
, I get the error message:
getaddrinfo ENOTFOUND example-mongodb-1.example-mongodb-svc.mongodb.svc.cluster.local
. I assume this is because I’m running a replica set and that is the master node. Is installing ingress my best option to get this to work?
I have multiple ports forwarded for each of the node ports, but now I’m getting:
Server selection timed out after 30000 ms
. My connection string looks like:
<mongodb://user:password@localhost:27017>,localhost:27018,localhost:27019/admin?tls=true&tlsInsecure=true
21 Views