Replies: 7 comments 2 replies
-
Connecting to the replicaset works from within the network. It seems to be an issue when connecting from outside. |
Beta Was this translation helpful? Give feedback.
-
There are a few ways you could get around this problem.
|
Beta Was this translation helpful? Give feedback.
-
The following worked for me compose
Command:
Host file on host
Connection string:
|
Beta Was this translation helpful? Give feedback.
-
@LaurentGoderre are you working on your local system or some clous because the same thing i am trying on my aws ec2, it is giving error WARNING: Some networks were defined but are not used by any service: db-cluster26 Creating db-mongo-node19 ... done ERROR: for db-mongo-node17 Cannot start service db-mongo-node17: driver failed programming external connectivity on endpoint db-mongo-node17 (07973999b06c76bc04444a43530a0aff03a9dbc623e9ac18dd2019e7f5748f63): Error starting userland proxy: listen tcp4 0.0.0.0:27017: bind: address already in use |
Beta Was this translation helpful? Give feedback.
-
If you have any reference to install it with full setup with docker-compose or something, It will be very helpful on Amazon linux2, 5.0.24 |
Beta Was this translation helpful? Give feedback.
-
This was on a local setup. Maybe you can use all non-default ports to avoid port in use error (27018, 27019, 27020) |
Beta Was this translation helpful? Give feedback.
-
Finally found the solution , why it was not running , actually when you will make the replica then in that , you have to use the port that you giving to the each mongodb container , like in this case 60001,60002,60003 is the port for each container and 27017 is default port , so use like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When i am trying run using the docker-compose.yml version 5.0.24 and I am doing all this in a ec2 server AWS
This is to initiate the replica set
And i have created a root user and trying to connect into my mongodb compass like this and this doesn't work it give an error -
getaddrinfo ENOTFOUND db-mongo-node17 mongodb://root:*****@host_address:27017,host_address:27018,host_address:27018/?replicaSet=db-ppd
But when i try like this - it show me the db and work fine
mongodb://root:root@host_address:27017/?directConnection=true
I have no idea why this doesn't work when i don't try with the direct connection
If you need the rs.status , if it helps here it is
If anyone can help, it will be very much appreciated
Beta Was this translation helpful? Give feedback.
All reactions