Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose won't start container: already connected to network #17729

Closed
joskuijpers opened this issue Nov 5, 2015 · 35 comments
Closed

Compose won't start container: already connected to network #17729

joskuijpers opened this issue Nov 5, 2015 · 35 comments
Assignees
Labels
priority/P1 Important: P1 issues are a top priority and a must-have for the next release.
Milestone

Comments

@joskuijpers
Copy link

Today I upgraded to 1.9 on my OSX machine.

docker version:

Client:
 Version:      1.9.0
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   76d6bc9
 Built:        Tue Nov  3 19:20:09 UTC 2015
 OS/Arch:      darwin/amd64

Server:
 Version:      1.9.0
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   76d6bc9
 Built:        Tue Nov  3 19:20:09 UTC 2015
 OS/Arch:      linux/amd64

docker info:

Containers: 6
Images: 145
Server Version: 1.9.0
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 157
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.12-boot2docker
Operating System: Boot2Docker 1.9.0 (TCL 6.4); master : 16e4a2a - Tue Nov  3 19:49:22 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: default
ID: XMYV:6VY5:PCA6:NMTT:DZD2:J76G:PCV4:SJYH:44SM:SRC5:EEUA:HCNP
Debug mode (server): true
 File Descriptors: 38
 Goroutines: 64
 System Time: 2015-11-05T17:44:22.417063203Z
 EventsListeners: 0
 Init SHA1: 
 Init Path: /usr/local/bin/docker
 Docker Root Dir: /mnt/sda1/var/lib/docker
Username: joskuijpers
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox

uname -a:

Darwin Joss-iMac.local 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64

I tried to start my unchanged development environment using docker-compose up -d, and this was the result:

Starting redis_1
Starting db_1
Starting graphite_1
Starting pgbnc_1
Starting node_1
Starting nginx_1
ERROR: Cannot start container bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e: container already connected to network bridge

The failing container is nginx.

I expected the nginx containter to start successfully.

Running docker network inspect bridge after the previous command:

[
    {
        "Name": "bridge",
        "Id": "cb04924e44ca52bd858ce1fb1450cb58319f9bad3446bf457a53c6b5962b97d5",
        "Scope": "local",
        "Driver": "bridge",
        "IPAM": {
            "Driver": "default",
            "Config": [
                {
                    "Subnet": "172.17.0.0/16"
                }
            ]
        },
        "Containers": {
            "069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354": {
                "EndpointID": "88217bb8e17f534cad3567f1cf11a60bf0a2ae075b9ab6f6119011788bd9e927",
                "MacAddress": "02:42:ac:11:00:07",
                "IPv4Address": "172.17.0.7/16",
                "IPv6Address": ""
            },
            "4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453": {
                "EndpointID": "9f1b4ebb240a62e731919eef27a68909e36d6b6b4250d623a7d1bfd1b2f26cbf",
                "MacAddress": "02:42:ac:11:00:04",
                "IPv4Address": "172.17.0.4/16",
                "IPv6Address": ""
            },
            "7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a": {
                "EndpointID": "0cc72dd54706ae0259008991a39e82c91716d6d8d7988e21e2533a87420532f5",
                "MacAddress": "02:42:ac:11:00:05",
                "IPv4Address": "172.17.0.5/16",
                "IPv6Address": ""
            },
            "c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c": {
                "EndpointID": "31cd0308dd140263a0d7fec80d895917fc40e61ffdf0bf15fe307a99801c6b85",
                "MacAddress": "02:42:ac:11:00:06",
                "IPv4Address": "172.17.0.6/16",
                "IPv6Address": ""
            },
            "debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504": {
                "EndpointID": "123ac0f97f97a5fe132d7fbd25861527c307d8bc73b2ecc4d90c429d80ee5508",
                "MacAddress": "02:42:ac:11:00:03",
                "IPv4Address": "172.17.0.3/16",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        }
    }
]

I can't find the 'already connected' container.

Debug logs:

time="2015-11-05T17:42:11.480337167Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:11.480384013Z" level=info msg="GET /v1.19/containers/json?all=0&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:11.484239793Z" level=debug msg="Calling GET /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/json" 
time="2015-11-05T17:42:11.484280950Z" level=info msg="GET /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/json" 
time="2015-11-05T17:42:11.486870746Z" level=debug msg="Calling GET /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/json" 
time="2015-11-05T17:42:11.486928666Z" level=info msg="GET /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/json" 
time="2015-11-05T17:42:11.489664200Z" level=debug msg="Calling GET /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/json" 
time="2015-11-05T17:42:11.489705298Z" level=info msg="GET /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/json" 
time="2015-11-05T17:42:11.492299227Z" level=debug msg="Calling GET /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/json" 
time="2015-11-05T17:42:11.492340699Z" level=info msg="GET /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/json" 
time="2015-11-05T17:42:11.498823835Z" level=debug msg="Calling GET /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/json" 
time="2015-11-05T17:42:11.498869169Z" level=info msg="GET /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/json" 
time="2015-11-05T17:42:11.502721030Z" level=debug msg="Calling POST /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/stop" 
time="2015-11-05T17:42:11.502763946Z" level=info msg="POST /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/stop?t=10" 
time="2015-11-05T17:42:11.502808050Z" level=debug msg="Sending 15 to 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354" 
time="2015-11-05T17:42:11.623493919Z" level=debug msg="Calling POST /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/stop" 
time="2015-11-05T17:42:11.623539602Z" level=info msg="POST /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/stop?t=10" 
time="2015-11-05T17:42:11.623571259Z" level=debug msg="Sending 15 to debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504" 
time="2015-11-05T17:42:11.640829424Z" level=debug msg="Calling POST /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/stop" 
time="2015-11-05T17:42:11.640868073Z" level=info msg="POST /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/stop?t=10" 
time="2015-11-05T17:42:11.640897616Z" level=debug msg="Sending 15 to 7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a" 
time="2015-11-05T17:42:11.644563700Z" level=debug msg="Calling POST /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/stop" 
time="2015-11-05T17:42:11.644596200Z" level=info msg="POST /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/stop?t=10" 
time="2015-11-05T17:42:11.644624324Z" level=debug msg="Sending 15 to c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c" 
time="2015-11-05T17:42:11.644894232Z" level=debug msg="Calling POST /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/stop" 
time="2015-11-05T17:42:11.644909918Z" level=info msg="POST /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/stop?t=10" 
time="2015-11-05T17:42:11.644926964Z" level=debug msg="Sending 15 to 4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453" 
time="2015-11-05T17:42:11.756075303Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 6379 -j DNAT --to-destination 172.17.0.3:6379 ! -i docker0]" 
time="2015-11-05T17:42:11.757910513Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.3 --dport 6379 -j ACCEPT]" 
time="2015-11-05T17:42:11.760964337Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.3 -d 172.17.0.3 --dport 6379 -j MASQUERADE]" 
time="2015-11-05T17:42:11.770069836Z" level=debug msg="Releasing addresses for endpoint apex_db_1's interface on network bridge" 
time="2015-11-05T17:42:11.770119738Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.4)" 
time="2015-11-05T17:42:11.791303731Z" level=debug msg="Releasing addresses for endpoint apex_redis_1's interface on network bridge" 
time="2015-11-05T17:42:11.791353981Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.3)" 
time="2015-11-05T17:42:12.512106396Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.5:80 ! -i docker0]" 
time="2015-11-05T17:42:12.514183023Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.5 --dport 80 -j ACCEPT]" 
time="2015-11-05T17:42:12.518421050Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.5 -d 172.17.0.5 --dport 80 -j MASQUERADE]" 
time="2015-11-05T17:42:12.540298672Z" level=debug msg="Releasing addresses for endpoint apex_graphite_1's interface on network bridge" 
time="2015-11-05T17:42:12.540350556Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.5)" 
time="2015-11-05T17:42:21.503313476Z" level=info msg="Container 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 failed to exit within 10 seconds of SIGTERM - using the force" 
time="2015-11-05T17:42:21.503363934Z" level=debug msg="Sending 9 to 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354" 
time="2015-11-05T17:42:21.553005219Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 35729 -j DNAT --to-destination 172.17.0.7:35729 ! -i docker0]" 
time="2015-11-05T17:42:21.554900947Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.7 --dport 35729 -j ACCEPT]" 
time="2015-11-05T17:42:21.556531407Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.7 -d 172.17.0.7 --dport 35729 -j MASQUERADE]" 
time="2015-11-05T17:42:21.559319868Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 5858 -j DNAT --to-destination 172.17.0.7:5858 ! -i docker0]" 
time="2015-11-05T17:42:21.561110108Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.7 --dport 5858 -j ACCEPT]" 
time="2015-11-05T17:42:21.562878608Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.7 -d 172.17.0.7 --dport 5858 -j MASQUERADE]" 
time="2015-11-05T17:42:21.590257041Z" level=debug msg="Releasing addresses for endpoint apex_node_1's interface on network bridge" 
time="2015-11-05T17:42:21.590312647Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.7)" 
time="2015-11-05T17:42:21.644878541Z" level=info msg="Container c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c failed to exit within 10 seconds of SIGTERM - using the force" 
time="2015-11-05T17:42:21.644926278Z" level=debug msg="Sending 9 to c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c" 
time="2015-11-05T17:42:21.702968113Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 5432 -j DNAT --to-destination 172.17.0.6:5432 ! -i docker0]" 
time="2015-11-05T17:42:21.705453160Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.6 --dport 5432 -j ACCEPT]" 
time="2015-11-05T17:42:21.707751027Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.6 -d 172.17.0.6 --dport 5432 -j MASQUERADE]" 
time="2015-11-05T17:42:21.730595437Z" level=debug msg="Releasing addresses for endpoint apex_pgbnc_1's interface on network bridge" 
time="2015-11-05T17:42:21.730673265Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.6)" 
time="2015-11-05T17:42:32.877422798Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.877472831Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dredis%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.880479189Z" level=debug msg="Calling GET /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/json" 
time="2015-11-05T17:42:32.880516542Z" level=info msg="GET /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/json" 
time="2015-11-05T17:42:32.883041533Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.883083192Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Ddb%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.885711993Z" level=debug msg="Calling GET /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/json" 
time="2015-11-05T17:42:32.885750061Z" level=info msg="GET /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/json" 
time="2015-11-05T17:42:32.888211658Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.888249891Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dgraphite%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.891212992Z" level=debug msg="Calling GET /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/json" 
time="2015-11-05T17:42:32.891256111Z" level=info msg="GET /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/json" 
time="2015-11-05T17:42:32.893985614Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.894023827Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dpgbnc%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.896636777Z" level=debug msg="Calling GET /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/json" 
time="2015-11-05T17:42:32.896674759Z" level=info msg="GET /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/json" 
time="2015-11-05T17:42:32.899162954Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.899254464Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dnode%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.901965025Z" level=debug msg="Calling GET /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/json" 
time="2015-11-05T17:42:32.902004165Z" level=info msg="GET /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/json" 
time="2015-11-05T17:42:32.904851468Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.904890351Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dnginx%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.907626740Z" level=debug msg="Calling GET /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/json" 
time="2015-11-05T17:42:32.907662931Z" level=info msg="GET /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/json" 
time="2015-11-05T17:42:32.910195323Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.910233098Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dredis%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.913071466Z" level=debug msg="Calling GET /v1.19/images/redis/json" 
time="2015-11-05T17:42:32.913109982Z" level=info msg="GET /v1.19/images/redis/json" 
time="2015-11-05T17:42:32.916845928Z" level=debug msg="Calling GET /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/json" 
time="2015-11-05T17:42:32.916884708Z" level=info msg="GET /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/json" 
time="2015-11-05T17:42:32.919552831Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.919597703Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Ddb%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.922304744Z" level=debug msg="Calling GET /v1.19/images/apex_db/json" 
time="2015-11-05T17:42:32.922456606Z" level=info msg="GET /v1.19/images/apex_db/json" 
time="2015-11-05T17:42:32.926989540Z" level=debug msg="Calling GET /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/json" 
time="2015-11-05T17:42:32.927028500Z" level=info msg="GET /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/json" 
time="2015-11-05T17:42:32.929505353Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.929542381Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dgraphite%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.932303048Z" level=debug msg="Calling GET /v1.19/images/hopsoft/graphite-statsd/json" 
time="2015-11-05T17:42:32.932339183Z" level=info msg="GET /v1.19/images/hopsoft%2Fgraphite-statsd/json" 
time="2015-11-05T17:42:32.938884185Z" level=debug msg="Calling GET /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/json" 
time="2015-11-05T17:42:32.938925243Z" level=info msg="GET /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/json" 
time="2015-11-05T17:42:32.941541567Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.941578037Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dpgbnc%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.944189299Z" level=debug msg="Calling GET /v1.19/images/starefossen/pgbouncer/json" 
time="2015-11-05T17:42:32.944227469Z" level=info msg="GET /v1.19/images/starefossen%2Fpgbouncer/json" 
time="2015-11-05T17:42:32.947565471Z" level=debug msg="Calling GET /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/json" 
time="2015-11-05T17:42:32.947603821Z" level=info msg="GET /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/json" 
time="2015-11-05T17:42:32.950108585Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.950154604Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dnode%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.952917919Z" level=debug msg="Calling GET /v1.19/images/apex_node/json" 
time="2015-11-05T17:42:32.952957586Z" level=info msg="GET /v1.19/images/apex_node/json" 
time="2015-11-05T17:42:32.957234812Z" level=debug msg="Calling GET /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/json" 
time="2015-11-05T17:42:32.957302959Z" level=info msg="GET /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/json" 
time="2015-11-05T17:42:32.959984233Z" level=debug msg="Calling GET /v1.19/containers/json" 
time="2015-11-05T17:42:32.960026657Z" level=info msg="GET /v1.19/containers/json?all=1&limit=-1&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dapex%22%2C+%22com.docker.compose.service%3Dnginx%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&size=0" 
time="2015-11-05T17:42:32.962701829Z" level=debug msg="Calling GET /v1.19/images/apex_nginx/json" 
time="2015-11-05T17:42:32.962740288Z" level=info msg="GET /v1.19/images/apex_nginx/json" 
time="2015-11-05T17:42:32.966375522Z" level=debug msg="Calling GET /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/json" 
time="2015-11-05T17:42:32.966415178Z" level=info msg="GET /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/json" 
time="2015-11-05T17:42:32.969305010Z" level=debug msg="Calling POST /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/start" 
time="2015-11-05T17:42:32.969347278Z" level=info msg="POST /v1.19/containers/debeb5dfce94c9772701a4e3649a9b7410f119d013c5c37e7c5a75709f3b3504/start" 
time="2015-11-05T17:42:32.970227992Z" level=debug msg="Assigning addresses for endpoint apex_redis_1's interface on network bridge" 
time="2015-11-05T17:42:32.970251270Z" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])" 
time="2015-11-05T17:42:32.972428389Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 6379 -j DNAT --to-destination 172.17.0.3:6379 ! -i docker0]" 
time="2015-11-05T17:42:32.974832189Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.3 --dport 6379 -j ACCEPT]" 
time="2015-11-05T17:42:32.977134887Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.3 -d 172.17.0.3 --dport 6379 -j MASQUERADE]" 
time="2015-11-05T17:42:33.012905692Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias apex_redis_1 with ip 172.17.0.3" 
time="2015-11-05T17:42:33.012936331Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias redis with ip 172.17.0.3" 
time="2015-11-05T17:42:33.012947119Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias redis_1 with ip 172.17.0.3" 
time="2015-11-05T17:42:33.071912432Z" level=debug msg="Calling POST /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/start" 
time="2015-11-05T17:42:33.071941193Z" level=info msg="POST /v1.19/containers/4bde5694ff9e637aebe3d119f256420d129122b3710f91087dc0a5e877dcf453/start" 
time="2015-11-05T17:42:33.072908881Z" level=debug msg="Assigning addresses for endpoint apex_db_1's interface on network bridge" 
time="2015-11-05T17:42:33.072939850Z" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])" 
time="2015-11-05T17:42:33.076471065Z" level=debug msg="Update /etc/hosts of c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c for alias apex_db_1 with ip 172.17.0.4" 
time="2015-11-05T17:42:33.076498779Z" level=debug msg="Update /etc/hosts of c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c for alias db with ip 172.17.0.4" 
time="2015-11-05T17:42:33.076508552Z" level=debug msg="Update /etc/hosts of c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c for alias db_1 with ip 172.17.0.4" 
time="2015-11-05T17:42:33.141110281Z" level=debug msg="Calling POST /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/start" 
time="2015-11-05T17:42:33.141149309Z" level=info msg="POST /v1.19/containers/7f98fb87d25fb31abd5c48769ac24c6d24bcd148d60967343a45df859be4697a/start" 
time="2015-11-05T17:42:33.142508404Z" level=debug msg="Assigning addresses for endpoint apex_graphite_1's interface on network bridge" 
time="2015-11-05T17:42:33.142534721Z" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])" 
time="2015-11-05T17:42:33.144721134Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.5:80 ! -i docker0]" 
time="2015-11-05T17:42:33.149642045Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.5 --dport 80 -j ACCEPT]" 
time="2015-11-05T17:42:33.157205075Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.5 -d 172.17.0.5 --dport 80 -j MASQUERADE]" 
time="2015-11-05T17:42:33.210105598Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias apex_graphite_1 with ip 172.17.0.5" 
time="2015-11-05T17:42:33.210136051Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias graphite with ip 172.17.0.5" 
time="2015-11-05T17:42:33.210146138Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias graphite_1 with ip 172.17.0.5" 
time="2015-11-05T17:42:33.252061727Z" level=debug msg="Calling POST /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/start" 
time="2015-11-05T17:42:33.252095166Z" level=info msg="POST /v1.19/containers/c807cb3d3bbd06546fcf4e10412d3d0576668542fff6bb72290fe28ca43b590c/start" 
time="2015-11-05T17:42:33.253064566Z" level=debug msg="Assigning addresses for endpoint apex_pgbnc_1's interface on network bridge" 
time="2015-11-05T17:42:33.253086325Z" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])" 
time="2015-11-05T17:42:33.254814596Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5432 -j DNAT --to-destination 172.17.0.6:5432 ! -i docker0]" 
time="2015-11-05T17:42:33.261007533Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.6 --dport 5432 -j ACCEPT]" 
time="2015-11-05T17:42:33.268677725Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.6 -d 172.17.0.6 --dport 5432 -j MASQUERADE]" 
time="2015-11-05T17:42:33.319961477Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias apex_pgbnc_1 with ip 172.17.0.6" 
time="2015-11-05T17:42:33.319990230Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias pgbnc with ip 172.17.0.6" 
time="2015-11-05T17:42:33.320001330Z" level=debug msg="Update /etc/hosts of 069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354 for alias pgbnc_1 with ip 172.17.0.6" 
time="2015-11-05T17:42:33.399468181Z" level=debug msg="Calling POST /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/start" 
time="2015-11-05T17:42:33.399504026Z" level=info msg="POST /v1.19/containers/069ad24ee3eaa3783eff743db30f5871b570c2bb378b8f1ad5dbecbda90fc354/start" 
time="2015-11-05T17:42:33.400654408Z" level=debug msg="Assigning addresses for endpoint apex_node_1's interface on network bridge" 
time="2015-11-05T17:42:33.400678829Z" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])" 
time="2015-11-05T17:42:33.402750918Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 35729 -j DNAT --to-destination 172.17.0.7:35729 ! -i docker0]" 
time="2015-11-05T17:42:33.408416724Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.7 --dport 35729 -j ACCEPT]" 
time="2015-11-05T17:42:33.414692258Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.7 -d 172.17.0.7 --dport 35729 -j MASQUERADE]" 
time="2015-11-05T17:42:33.471305452Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 5858 -j DNAT --to-destination 172.17.0.7:5858 ! -i docker0]" 
time="2015-11-05T17:42:33.476563994Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.7 --dport 5858 -j ACCEPT]" 
time="2015-11-05T17:42:33.490405339Z" level=debug msg="/usr/local/sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.7 -d 172.17.0.7 --dport 5858 -j MASQUERADE]" 
time="2015-11-05T17:42:33.543634210Z" level=debug msg="Update /etc/hosts of bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e for alias apex_node_1 with ip 172.17.0.7" 
time="2015-11-05T17:42:33.543663543Z" level=debug msg="Update /etc/hosts of bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e for alias node with ip 172.17.0.7" 
time="2015-11-05T17:42:33.543673663Z" level=debug msg="Update /etc/hosts of bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e for alias node_1 with ip 172.17.0.7" 
time="2015-11-05T17:42:33.620466135Z" level=debug msg="Calling POST /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/start" 
time="2015-11-05T17:42:33.620507391Z" level=info msg="POST /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/start" 
time="2015-11-05T17:42:33.621944106Z" level=error msg="failed to umount /mnt/sda1/var/lib/docker/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/shm: no such file or directory" 
time="2015-11-05T17:42:33.621982563Z" level=error msg="failed to umount /mnt/sda1/var/lib/docker/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/mqueue: no such file or directory" 
time="2015-11-05T17:42:33.622010480Z" level=error msg="bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e: Failed to umount ipc filesystems: failed to cleanup ipc mounts:\nno such file or directory\nno such file or directory" 
time="2015-11-05T17:42:33.636910322Z" level=error msg="Handler for POST /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/start returned error: Cannot start container bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e: container already connected to network bridge" 
time="2015-11-05T17:42:33.636953978Z" level=error msg="HTTP Error" err="Cannot start container bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e: container already connected to network bridge" statusCode=500 

If any more information is required, please tell. I can put some time in trying to create a minimal example, or starting compose from another folder to create all new containers. The current compose file would be useless as you don't have all my dockerfiles and related files.

@GordonTheTurtle
Copy link

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:
uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

@cpuguy83 cpuguy83 added this to the 1.9.1 milestone Nov 5, 2015
@cpuguy83
Copy link
Member

cpuguy83 commented Nov 5, 2015

ping @mavenugo @mrjana

@jkaplon
Copy link

jkaplon commented Nov 5, 2015

Similar issue for me upgrading to 1.9 on Ubuntu 14.04.
rm-ing the container and running a new one did not resolve it.
Got same error message with new container id.

Rebooting host OS, and then running a new container solved it for me.

@patope
Copy link

patope commented Nov 5, 2015

I got same problem. I downgraded back to 1.8.3 and problem went away. Later i realised that compose was still in version 1.4.0. i'll try to upgrade compose 1.5.0 and try again later.

@levinotik
Copy link

Same issue on Mac OS 10.11.1 and Docker version 1.9.0, build 76d6bc9

@joskuijpers
Copy link
Author

FYI:
Compose version is 1.5.0, Machine version is 0.5.0 (04cfa58)

Glad to see I am not the only one with this problem.

@dnephin
Copy link
Member

dnephin commented Nov 5, 2015

Possibly a duplicate or at least related to #17621

@joskuijpers
Copy link
Author

@dnephin Except my container is not connected to any network. I checked my other two network (none, host) container lists, both empty. Or am I not understanding libnetwork?

@dnephin
Copy link
Member

dnephin commented Nov 5, 2015

Are you able to inspect the container, either by container_name or id? The output of a docker inspect would be great for debugging this as well.

@joskuijpers
Copy link
Author

Output of docker inspect:

[
{
    "Id": "bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e",
    "Created": "2015-11-05T17:15:20.823588376Z",
    "Path": "nginx",
    "Args": [
        "-g",
        "daemon off;"
    ],
    "State": {
        "Status": "created",
        "Running": false,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 0,
        "ExitCode": 128,
        "Error": "container already connected to network bridge",
        "StartedAt": "0001-01-01T00:00:00Z",
        "FinishedAt": "0001-01-01T00:00:00Z"
    },
    "Image": "d47c20721d34399151b3e09f69d54b5dd11ae5e727e03fc7503d50251209d2fa",
    "ResolvConfPath": "",
    "HostnamePath": "",
    "HostsPath": "",
    "LogPath": "",
    "Name": "/apex_nginx_1",
    "RestartCount": 0,
    "Driver": "aufs",
    "ExecDriver": "native-0.2",
    "MountLabel": "",
    "ProcessLabel": "",
    "AppArmorProfile": "",
    "ExecIDs": null,
    "HostConfig": {
        "Binds": [
            "/mnt/sda1/var/lib/docker/volumes/78730f76e875b150516ad6d1c2e5cfa3a1c44ab79171d319d7968cb0888a833f/_data:/var/cache/nginx:rw"
        ],
        "ContainerIDFile": "",
        "LxcConf": null,
        "Memory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "KernelMemory": 0,
        "CpuShares": 0,
        "CpuPeriod": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "CpuQuota": 0,
        "BlkioWeight": 0,
        "OomKillDisable": false,
        "MemorySwappiness": null,
        "Privileged": false,
        "PortBindings": {
            "443/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "443"
                }
            ],
            "80/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "80"
                }
            ]
        },
        "Links": [
            "/apex_node_1:/apex_nginx_1/apex_node_1",
            "/apex_node_1:/apex_nginx_1/node",
            "/apex_node_1:/apex_nginx_1/node_1"
        ],
        "PublishAllPorts": false,
        "Dns": null,
        "DnsOptions": null,
        "DnsSearch": null,
        "ExtraHosts": [],
        "VolumesFrom": [],
        "Devices": null,
        "NetworkMode": "default",
        "IpcMode": "",
        "PidMode": "",
        "UTSMode": "",
        "CapAdd": null,
        "CapDrop": null,
        "GroupAdd": null,
        "RestartPolicy": {
            "Name": "always",
            "MaximumRetryCount": 0
        },
        "SecurityOpt": null,
        "ReadonlyRootfs": false,
        "Ulimits": null,
        "LogConfig": {
            "Type": "json-file",
            "Config": {}
        },
        "CgroupParent": "",
        "ConsoleSize": [
            0,
            0
        ],
        "VolumeDriver": ""
    },
    "GraphDriver": {
        "Name": "aufs",
        "Data": null
    },
    "Mounts": [
        {
            "Source": "/mnt/sda1/var/lib/docker/volumes/78730f76e875b150516ad6d1c2e5cfa3a1c44ab79171d319d7968cb0888a833f/_data",
            "Destination": "/var/cache/nginx",
            "Mode": "rw",
            "RW": true
        }
    ],
    "Config": {
        "Hostname": "bc0b19c08997",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "443/tcp": {},
            "80/tcp": {}
        },
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "affinity:container==4628015264a1fcfc51b8c23c10289e8aac7dfbdd4aaae9913254dbd5a683248d",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "NGINX_VERSION=1.9.5-1~jessie"
        ],
        "Cmd": [
            "nginx",
            "-g",
            "daemon off;"
        ],
        "Image": "apex_nginx",
        "Volumes": {
            "/var/cache/nginx": {}
        },
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": {
            "com.docker.compose.config-hash": "28f994ac25cb702cc0280377b84e28826be46fa0b5e7c88d8435bc9e1c6633d9",
            "com.docker.compose.container-number": "1",
            "com.docker.compose.oneoff": "False",
            "com.docker.compose.project": "apex",
            "com.docker.compose.service": "nginx",
            "com.docker.compose.version": "1.5.0"
        }
    },
    "NetworkSettings": {
        "Bridge": "",
        "SandboxID": "",
        "HairpinMode": false,
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "Ports": null,
        "SandboxKey": "",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null,
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "MacAddress": "",
        "Networks": {
            "bridge": {
                "EndpointID": "",
                "Gateway": "",
                "IPAddress": "",
                "IPPrefixLen": 0,
                "IPv6Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "MacAddress": ""
            }
        }
    }
}
]

@dnephin
Copy link
Member

dnephin commented Nov 5, 2015

If you rm the container and run up again, do you get the same error? Does it reproduce every time or is it maybe a race condition that happens occasionally ?

@tupy
Copy link

tupy commented Nov 5, 2015

+1
Yeah I got the same error running rm and up and occurs every time.

@jonaskello
Copy link

+1
Same here, consistent, cannot be resolved with m.

@dnephin
Copy link
Member

dnephin commented Nov 5, 2015

If you run docker-compose with a custom project name, by setting COMPOSE_PROJECT_NAME=somethingelse do you get an error on the same container? I think the container joins the network by name, so by changing the project name, you'll change the first part of the name, which should be a workaround for now.

@mrjana
Copy link
Contributor

mrjana commented Nov 5, 2015

@joskuijpers Can you please provide the complete docker log? Did this container exist from before? I see a lot of GETs for the container.

time="2015-11-05T17:42:32.907626740Z" level=debug msg="Calling GET /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/json" 
time="2015-11-05T17:42:32.907662931Z" level=info msg="GET /v1.19/containers/bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e/json" 

@dave-tucker
Copy link
Contributor

I can't reproduce.

I've tried with a compose file with 6 services

web:
   image: nginx

apache:
   image: httpd

redis:
   image: redis

mysql:
   image: mysql

postgres:
   image: postgres

mongo:
    image: mongo

I've done multiple combinations of docker-compose up -d, docker-compose stop, docker-compose rm to no avail.

I also created a 1.8.3 machine, started and stopped my containers with compose and upgraded using Docker Machine to 1.9. Then I performed the same steps above and was still unable to reproduce.

It would be helpful to understand how you upgraded:

  • Docker Toolbox?
  • docker-machine upgrade
  • Other...

If you are using machine, it might be worthwhile creating a fresh one to see if you can reproduce:

docker-machine create -d virtualbox composetest
eval $(docker-machine env composetest)
docker-compose up -d

@tupy
Copy link

tupy commented Nov 6, 2015

docker-machine upgrade solved!! 👏 👏 👏

@jak
Copy link

jak commented Nov 6, 2015

I've encountered what appears to be same issue after upgrading Docker on Debian 8.0 via apt-get.

@takumatakuma
Copy link

docker-compose --project-name project up -d solved this problem in my case.

@lhz
Copy link

lhz commented Nov 6, 2015

Fixed this problem by first removing the troublesome container by name and then by id:

docker rm <containter-name>
docker rm <container-id>

@joskuijpers
Copy link
Author

I upgraded using the toolbox. I just downloaded the new 1.9 toolbox and ran it. It told me it would upgrade to 1.9.
I tried removing the container using rm, no difference.

I did compose stop, then composte --project-name xxx up -d:

Creating xxx_nginx_1
ERROR: Cannot start container 12175e65b7fae4512a1e771f141033649ba51b2f01682c09b34ad1857c656f1d: failed to create endpoint xxx_nginx_1 on network bridge: Bind for 0.0.0.0:443 failed: port is already allocated

So it seems it does indeed exist. docker ps -a contains all my containers. (old project, new project). Old project is exited, new project is running, except nginx, which is just created. Only containers in my network are the actually running ones.
So no, doesn't work for me.

Yeah, so when creating that composetest machine, I got asked for a password, but then I got an error. Now my console is locked in password-input mode... lets try again.

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
default   *        virtualbox   Running   tcp://192.168.99.100:2376   
$ docker-machine create -d virtualbox composetest
Running pre-create checks...
Creating machine...
WARNING >>> Error attempting heartbeat call to plugin server: read tcp 127.0.0.1:62497->127.0.0.1:62496: read: connection reset by peer
Error creating machine: Error in driver during machine creation: read tcp 127.0.0.1:62497->127.0.0.1:62496: read: connection reset by peer 
$ docker-machine ls
WARNING >>> Error attempting heartbeat call to plugin server: read tcp 127.0.0.1:62527->127.0.0.1:62526: read: connection reset by peer
error getting URL for host composetest: read tcp 127.0.0.1:62527->127.0.0.1:62526: read: connection reset by peer
WARNING >>> Error attempting call to get driver name: connection is shut down
WARNING >>> Error attempting heartbeat call to plugin server: read tcp 127.0.0.1:62531->127.0.0.1:62530: read: connection reset by peer
error getting URL for host default: read tcp 127.0.0.1:62531->127.0.0.1:62530: read: connection reset by peer
WARNING >>> Error attempting call to get driver name: connection is shut down
NAME          ACTIVE   DRIVER   STATE     URL   SWARM
composetest   -                 Running         
default       -                 Running         

Now I get asked for a password (randomly in my console), I have no clue what password... 😭

@joskuijpers
Copy link
Author

@dave-tucker It might help to add some links between te containers?

I stripped my compose file, and ran it with a fresh project name

nginx:
  restart: always
  image: nginx
  ports:
    - "80:80"
    - "443:443"
  links:
    - "node:node"

node:
  image: node
  links:
    - redis
    - pgbnc
    - graphite
  expose:
    - "8080"
  ports:
    - "35729:35729"
    - "5858:5858"

pgbnc:
  image: starefossen/pgbouncer
  links:
    - db
  ports:
    - "5432:5432"

db:
 image: postgres
 environment:
   POSTGRES_PASSWORD: XXXX
 expose:
   - "5432"

redis:
  image: redis
  ports:
    - "6379:6379"

graphite:
  image: hopsoft/graphite-statsd
  ports:
    - "8080:80"
  expose:
    - "2003:2003"
    - "8125:8125/udp"

I tested this one (so I kept all the ports. You might want to remove some or many).

ERROR: Cannot start container 1518ed44ca25424785f416287eb0eb7d38799b80f51d5711a9e30d060cb2fd72: failed to create endpoint xxx_nginx_1 on network bridge: Bind for 0.0.0.0:443 failed: port is already allocated

Same as above. And same story, I don't see any container in my network that may cause this.

I wanted to restart my VBox using docker-machine, but after running docker-machine ls, I got stuck in the password input again (the application already closed, as in, my console input line is visible).

@tompson
Copy link

tompson commented Nov 6, 2015

docker-machine upgrade did the trick for me

@joskuijpers
Copy link
Author

So I tried the docker-machine upgrade, I am crying.

$ docker-machine ls
Password:
Password:
Password:
error getting URL for host composetest: Something went wrong running an SSH command!
command : ip addr show dev eth1
err     : exit status 255
output  : 

NAME          ACTIVE   DRIVER       STATE     URL                         SWARM
composetest   -        virtualbox   Running                               
default       *        virtualbox   Running   tcp://192.168.99.100:2376   
$ docker-machine upgrade default
Stopping machine to do the upgrade...
WARNING >>> Error attempting heartbeat call to plugin server: read tcp 127.0.0.1:63127->127.0.0.1:63126: read: connection reset by peer
read tcp 127.0.0.1:63127->127.0.0.1:63126: read: connection reset by peer
$ docker-machine upgrade default
Error: machine must be running to upgrade.
$ docker-machine ls
Password:
Password:
Password:
error getting URL for host composetest: Something went wrong running an SSH command!
command : ip addr show dev eth1
err     : exit status 255
output  : 

NAME          ACTIVE   DRIVER       STATE     URL   SWARM
composetest   -        virtualbox   Running         
default       -        virtualbox   Stopped         
$ docker-machine start default
Could not load host "default": Error attempting to invoke binary for plugin: dial tcp 127.0.0.1:63161: getsockopt: connection refused

What is going on? Did the Docker Toolbox just screw up my whole setup? Is machine damaged on my machine?

@dave-tucker
Copy link
Contributor

@joskuijpers looks like there is something wrong with your machine install

I'm running this version:

docker-machine version 0.5.0 (04cfa58)

You might want to try with debug enabled docker-machine -D so we can see whats' going on.

You could always re-install with the one liner from here

Will re-try with your compose file and see if I can reproduce

@ghost
Copy link

ghost commented Nov 6, 2015

same issue here.

$ uname -a
Linux 3.19.0-32-generic #37-Ubuntu SMP Wed Oct 21 10:23:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ docker version
Client:
Version:      1.9.0
API version:  1.21
Go version:   go1.4.3
Git commit:   76d6bc9
Built:        Tue Nov  3 19:20:09 UTC 2015
OS/Arch:      linux/amd64

Server:
Version:      1.9.0
API version:  1.21
Go version:   go1.4.3
Git commit:   76d6bc9
Built:        Tue Nov  3 19:20:09 UTC 2015
OS/Arch:      linux/amd64

$ docker-compose up
...
...
Successfully built 8e03ab39a3c6
Cannot start container fde7ad7f7c165743d43e522fa7d4280b986d19e0e998e9768c40bc06ad924b57: container already connected to network bridge

Any suggestion for who is not using docker-machine?

@icecrime icecrime added priority/P1 Important: P1 issues are a top priority and a must-have for the next release. and removed area/networking labels Nov 6, 2015
@krmcbride
Copy link

I encountered the same thing updating a toolbox 1.8.3 install to 1.9. I first tried wiggling it a little by modifying the compose config for the failing container, changing its name, links, etc, but nothing. A docker-machine restart default cleared it up, and I haven't been able to reproduce it since.

For what its worth, before this I hit docker/machine#2175 after the update running the quickstart terminal, iirc, and went ahead with regenerate-certs. That was before discovering this already connected to network error. I find it a little odd that my subsequent restart, which would have been the second reboot of the VM, cleared this up -- makes me wonder if there's some one-time breakage that occurs upon first compose up -d (or underlying engine routine) that gets resolved by a reboot...

@bings
Copy link

bings commented Nov 8, 2015

I've seen this also on CentOS sporadically, maybe related, to #17653?

@joskuijpers
Copy link
Author

After a restart of my mac, the problems with docker-machine are resolved (I had to generate new certs for my composetest, like docker/machine#2175). Running compose on the new VBox works, no connection errors.

I stopped compose test, started my original machine, and it created the nginx container just fine now.

Everything I have done is written down in this issue. I am sorry I can't be of more help.

@mavenugo
Copy link
Contributor

This issue seems similar to #17760 which is a dupe of #17558.
#17558 is in docker master and will be available in 1.9.1.
Can someone who is seeing this problem consistently try docker master and confirm ?

@mavenugo
Copy link
Contributor

Resolved by #17558.
Closing this issue. Feel free to reopen it if this is seen in master.

@milosonator
Copy link

For anyone who's still having this issue for me the resolution was (on Ubuntu 15.10, docker 1.9.0, compose 1.5.1):

sudo service docker stop
sudo service docker start

and then it worked again.

@bruth
Copy link

bruth commented Nov 17, 2015

@milosonator temporary fix worked for me as well.

@omarabid
Copy link

Had same issue as well. docker-machine upgrade fixed it.

@angeloh
Copy link

angeloh commented Dec 16, 2015

@milosonator I tried your sudo service docker restart and it works for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/P1 Important: P1 issues are a top priority and a must-have for the next release.
Projects
None yet
Development

No branches or pull requests