Answer the question
In order to leave comments, you need to log in
Docker container won't start, port is busy, how to start second mongo?
The second mongi container does not start, it writes the port is busy, although the ips are different
From the console:
Starting els-admin-backend-redis ...
Starting els-admin-backend-mongo ... error
Starting els-admin-backend-redis ... error
ERROR: for els-admin-backend-mongo Cannot start service els-admin-backend-mongo: Ports are not available: listen tcp 127.0.0.11:27017: bind: can't assign requested address
ERROR: for els-admin-backend-redis Cannot start service els-admin-backend-redis: Ports are not available: listen tcp 127.0.0.11:6379: bind: can't assign requested address
ERROR: for els-admin-backend-mongo Cannot start service els-admin-backend-mongo: Ports are not available: listen tcp 127.0.0.11:27017: bind: can't assign requested address
ERROR: for els-admin-backend-redis Cannot start service els-admin-backend-redis: Ports are not available: listen tcp 127.0.0.11:6379: bind: can't assign requested address
ERROR: Encountered errors while bringing up the project.
Answer the question
In order to leave comments, you need to log in
127.0.0.x is localhost aka loopback , so 2 identical ports will not be published. It does not matter in this case the fourth act, it will all be localhost. You either need to publish different ports for different Mongo instances or have different real addresses on the machine, for this you need to have 2 network cards with different real network ip addresses.
Another option is to raise 3 dockers with webui (for example, mongotron.io), deplete all 3 containers with the docker-compose network, then they can work each with their own port on the address allocated by the docker, forward the webui address outside, and manage the mongs through it, then merge the mongs to the cluster and the master to publish the port to the outside.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question