You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
I have followed your compose and scripts closely. However, when connecting from a java (spring boot app in my case) I discovered that the config setup for the repl set needs to be the hostname of the machine (or the external IP address). for example,
config= {"_id": "mongors", members:[{"_id": 0, "host": "external-hostname::27017", "priority": 2},{"_id": 1, "host": "external-hostname:27018", "priority": 0},{"_id": 2, "host": "external-hostname:27019", "priority": 0}]}
If I dont and instead give it the docker's internal ip address it does not work. I get a connection error (looks like the hearbeat checks against the address specified in the config variable.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have followed your compose and scripts closely. However, when connecting from a java (spring boot app in my case) I discovered that the config setup for the repl set needs to be the hostname of the machine (or the external IP address). for example,
config= {"_id": "mongors", members:[{"_id": 0, "host": "external-hostname::27017", "priority": 2},{"_id": 1, "host": "external-hostname:27018", "priority": 0},{"_id": 2, "host": "external-hostname:27019", "priority": 0}]}
If I dont and instead give it the docker's internal ip address it does not work. I get a connection error (looks like the hearbeat checks against the address specified in the config variable.
The text was updated successfully, but these errors were encountered: