0

We are using mongodb community addition . We are able to connect to independent nodes primary, and 2 replicas using direct connection. But when we try to connect to replica set using url:-

mongodb://sorterapp:[email protected]:27017,15.207.33.131:27017,13.234.13.53:27017/?authSource=sorter&replicaSet=stagesorter

It is not able to connect. Error:- getaddrinfo ENOTFOUND primary

Not sure what is the error We tried using mongo compass as well as application library

2
  • Did you try with hostnames? Should be preferred over IP-Address anyway. Did you initiate the replica set? Commented Jan 25, 2023 at 11:46
  • we initiated the replica set and tried hostnames also Commented Jan 29, 2023 at 11:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.