"driver failed programming external connectivity on endpoint" (1.7.0-rc1)
I'm pretty sure this was working on docker-compose 1.7.0-rc1 before I installed the latest Docker for Mac beta, which upgraded to docker 1.11.0-rc3. I'm trying to get the socat service to run on port 172.17.0.1:8123, so that it's available to docker builds. My real yml uses an environment variable for the IP address, but it happens even when hardcoded.
ERROR: for socat_httpcache driver failed programming external connectivity on endpoint test_socat_httpcache_1 (5d973ed559d63a5561b715248f797a336915a44960b5e32e622ac8349b16e5d2): Error starting userland proxy: failed to bind port: Unix.Unix_error(Unix.EADDRNOTAVAIL, "bind", "")
version: '2'
services:
httpcache:
restart: always
image: clue/polipo
command: proxyAddress=0.0.0.0 allowedClients=0.0.0.0/0 disableIndexing=false disableServersList=false
mem_limit: 500m
memswap_limit: 500m
volumes:
- /var/cache/polipo
socat_httpcache:
restart: always
hostname: POLIPO1
image: bobrik/socat
mem_limit: 50m
command: TCP-LISTEN:8123,fork,reuseaddr TCP:httpcache:8123
depends_on:
- httpcache
ports:
- "172.17.0.1:8123:8123"
@jamshid
Can you post the o/p of sudo netstat -nlp | grep 8123. Thanks.
My mac says -p requires an argument, so I think this is what you want:
$ sudo netstat -nl -p tcp | grep 8123
(nothing)
$ sudo netstat -nl -p tcp | head # to confirm mac output is what you expect
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.2.4.52918 216.58.194.34.80 ESTABLISHED
tcp4 0 0 192.168.2.4.52917 23.199.236.147.80 ESTABLISHED
tcp4 0 0 192.168.2.4.52916 192.229.163.25.443 ESTABLISHED
tcp4 0 0 192.168.2.4.52915 192.229.163.175.80 ESTABLISHED
...
$ docker ps -a | grep 8123
7baf5b2ec0eb clue/polipo "polipo proxyAddress=" 26 minutes ago Up 12 minutes 8123/tcp test_httpcache_1
3fea15e3d5b4 clue/polipo "polipo proxyAddress=" 33 minutes ago Up 19 minutes 8123/tcp buildenv_httpcache_1
same thing happening to me.
I am getting the same issue when restarting using docker-compose up. In my case it's an nginx proxy service that fails to start. Must be related to the Docker for Mac beta. It started after I installed the beta and hasn't happened after switching back over to Virtualbox.
docker-compose version 1.7.0, build 0d7bf73 Docker version 1.11.0, build 4dc5990
I encouner the same error when I try to start my stack using docker-compose. All the containers start correctly except one (consul). I'm getting this error
ERROR: for consul driver failed programming external connectivity on endpoint devas_consul_1 (6ceba32c51cb70b354f 2f4b68d173ca97a65d6a0bfd308d3137e2a7069abd1b6): Error starting userland proxy: Failed to bind: EADDRNOTAVAIL
I'm sure it has something to do with my docker version beta for mac.
docker-compose -v docker-compose version 1.7.0, build 0d7bf73
I'm using the last docker beta version for mac
` docker version Client: Version: 1.11.1 API version: 1.23 Go version: go1.5.4 Git commit: 5604cbe Built: Wed Apr 27 00:34:20 2016 OS/Arch: darwin/amd64
Server: Version: 1.11.1 API version: 1.23 Go version: go1.5.4 Git commit: 8b63c77 Built: Fri Apr 29 14:13:26 2016 OS/Arch: linux/amd64 `
Following the above message, I get Error starting userland proxy: Failed to bind: EADDRINUSE.
Confused as to where the conflict is where none existed before
How does one "release" the port that is in use so that compose can bring up the container again? First time it happened, I waited for a minute or so and it worked on second attempt. Second time, its been about an hour. Docker compose kill, down, rm --all, etc. and something still has a hold of it.
FYI, tracked in the beta @ https://forums.docker.com/t/port-mappings-are-not-released/10565/11
I figure out what the problem is about, the container (consul) causing the issue has this binding port 172.17.0.1:53:8600/udp. I replaced it with 53:8600/udp and it's working now. I didn't understand yet why the first binding doesn't work. BTW, How can I know the bridge ip address?
Hello, I had the same problem with Docker version 1.11.1 on Mac OSX.
ERROR: for nginx driver failed programming external connectivity on endpoint managercentralapp_nginx_1 (e11d19ee8f486a2e12c9c87802dca7ea5f541f026645f69e338e94732ac1eb56): Error starting userland proxy: Failed to bind: EADDRINUSE
I too am getting this after upgrading to Docker 1.12-rc2, not sure if this is the right place to post this.
Client:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd
Built: Fri Jun 17 20:35:33 2016
OS/Arch: darwin/amd64
Experimental: true
Server:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd-unsupported
Built: Fri Jun 17 21:12:28 2016
OS/Arch: linux/amd64
Experimental: true
Full error:
Error response from daemon: driver failed programming external connectivity on endpoint xxx_xxx_1 (xxx): Bind for 0.0.0.0:2224 failed: port is already allocated
netstat:
tcp6 0 0 :::2224 :::* LISTEN 9083/docker-proxy
I'm seeing this sporadically. Retrying the command after a minute usually "fixes" the problem. This is after moving to Docker for Mac yesterday.
$ docker version
Client:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd
Built: Fri Jun 17 20:35:33 2016
OS/Arch: darwin/amd64
Experimental: true
Server:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: a7119de
Built: Fri Jun 17 22:09:20 2016
OS/Arch: linux/amd64
Experimental: true
I've also been getting the same error as you guys. I believed it was because nginx was binding it ports that were already taken up but I don't think so now. Did anyone find any solutions to this? :)
+1 Same error on mac
I had this happening after a move to Docker for Mac, but after stopping and removing All containers after the move, restarting docker, recreating container etc etc. It was fixed.
I had this again today after an update of Docker for Mac , but repeating the above scenario fixed. I assume the port (and "other" things) I'm assigning to particular containers is not being released until completely cleaned up.
eg:
ERROR: for nginx driver failed programming external connectivity on endpoint dev_nginx (4c340c55f7402c7b265803ea64541ebdf8613f4b43dfa816001d27bdc4f513b3): Error iptables FORWARD: Another app is currently holding the xtables lock; waiting (1s) for it to exit... ERROR: Encountered errors while bringing up the project.
+1 have the same problem on mac
@TuningGuide MacBook Pro (15-inch, Late 2011), 2.2 GHz Intel Core i7, 8GB 1333 MHz DDR3 Running Node 4.4.7 extended to support Ember CLI. Setup is below:
FROM node:4.4.7
# expose ember-cli ports
EXPOSE 4200 35729 49152
# install ember-cli dependencies
RUN npm install -q -g ember-cli
RUN npm install -q -g bower
RUN npm install -q -g phantomjs-prebuilt
# install watchman
# http://ember-cli.com/user-guide/#watchman
RUN \
git clone https://github.com/facebook/watchman.git &&\
cd watchman &&\
git checkout v3.5.0 &&\
./autogen.sh &&\
./configure &&\
make &&\
make install
Ran with mounted volume of the ember-cli files using 'ember serve' as the command.
+1 same problem on the mac with docker for mac
Please stop sending +1, as it spams all subscriber inboxes. Either use the emoticons (smiley on the right of each comment) or at least give your full setup, version numbers and so on. Thx