ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint ltg_db_1
Problem
when i do the following : ± docker-compose up Starting ltg_db_1 ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint ltg_db_1 (ecc3bf3036508fade24ffa4d6bc3e5fee0180073c5351667c471922a10fad60f): Error starting userland proxy: Bind for 0.0.0.0:27017 failed: port is already allocated ERROR: Encountered errors while bringing up the project. ± sudo docker inspect mongo [ { "Id": "sha256:135883d5d0b960b498e4c6c2009444b243b322d3fcb8fc4aa0cc741542dd6528", "RepoTags": [ "mongo:latest" ], "RepoDigests": [ "mongo@sha256:89ad0ed6321f48107356db1e11984e56614bdee64c3ad8a05484187f276ff705" ], "Parent": "", "Comment": "", "Created": "2016-11-01T23:31:04.120003872Z", "Container": "3e20e01de569b06a9cb43787870428254c585a56c2497835db2a616871db6f09", "ContainerConfig": { "Hostname": "397f80c505a4", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "27017/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "GOSU_VERSION=1.7", "GPG_KEYS=DFFA3DCF326E302C4787673A01C4E7FAAAB2461C \t42F
Error Output
ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint ltg_db_1 (ecc3bf3036508fade24ffa4d6bc3e5fee0180073c5351667c471922a10fad60f): Error starting userland proxy:
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint ltg_db_1
I was getting the same error but was able to successfully continue after: `service mongodb stop` I'm a little confused (and new to docker & compose, to be quite honest) but shouldn't a db service running on the host not have a conflict with a db service running within a container?
Trust Score
8 verifications
- 1
I was getting the same error but was able to successfully continue after:
`service mongodb stop`
- 2
I'm a little confused (and new to docker & compose, to be quite honest) but shou
I'm a little confused (and new to docker & compose, to be quite honest) but shouldn't a db service running on the host not have a conflict with a db service running within a container?
Validation
Resolved in docker/compose GitHub issue #4126. Community reactions: 63 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep