A Timeout Occured After 30000Ms Selecting a Server Using Compositeserverselector

A timeout occured after 30000ms selecting a server using CompositeServerSelector

I am replacing the connection string method in like below.

new MongoClient("mongodb://username:password@ds011111.mongolab.com:11111/db-name")

Now it's solved.

Please see the answer from Paul Lemke.

TimeoutException: A timeout occured after 30000ms selecting a server using CompositeServerSelector

Pretty sure you need the change the name of mongo db connectionstring. Check out the DNS for services section: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/

In your case it would be mongodb-service.default.svc.cluster.local if you've deployed everything into default namespace.



Related Topics



Leave a reply



Submit