# Docker: Error response from daemon

**URL:** <https://forums.docker.com/t/docker-error-response-from-daemon/54174>\
**Category:** General\
**Tags:** docker\
**Created:** [July 16, 2018, 3:57pm UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174 "2018-07-16T15:57:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtncouger](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/mtncouger/32/20371_2.png) [@mtncouger](https://forums.docker.com/u/mtncouger)\
**Post date:** [July 16, 2018, 3:57pm UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/1 "2018-07-16T15:57:01Z")

</div>

docker: Error response from daemon: driver failed programming external connectivity on endpoint awesome\_mcclintock (71444f379db927435dfd18c571d7525089e3f53168ce03

Need help in resolving the command “docker container run -d -p 80:80 nginx”

or docker container run --publish 80:80, which gives me the same error from daemon

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [July 17, 2018, 6:40am UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/2 "2018-07-17T06:40:02Z")

</div>

Hi

I belive that there is more info to that error message, can you please provide the full error message?  
Also, what version of docker are you running?

---

<div class="post-metadata">

**Author:** ![mtncouger](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/mtncouger/32/20371_2.png) [@mtncouger](https://forums.docker.com/u/mtncouger)\
**Post date:** [July 19, 2018, 8:34pm UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/3 "2018-07-19T20:34:52Z")

</div>

docker version1805, 0-ce, build f150324.  
rons-iMac:.ssh ronnats$ docker container run -d -p 80:80 nginx

fe961d815eef6ebe461ceaaad91ba66ed7d6683b3f0d1f9a548736972684b8e8

docker: Error response from daemon: driver failed programming external connectivity on endpoint pedantic\_pare (00f58d7e7bce14c780dd6b9d689be8586a3c4230ae71b6598ee88252782c0fb1): Bind for [0.0.0.0:80](http://0.0.0.0:80) failed: port is already allocated.

rons-iMac:.ssh ronnats$ docker container run -d -p 8080:80 nginx

87d0fe32825801d5d653ec20f127dbcd7b4ddf71796d2455a8c2298d7d0b5659

docker: Error response from daemon: driver failed programming external connectivity on endpoint infallible\_pasteur (49107a0e9d83f156d99cfeb76407aa5931421a0fca12e570dd806a632b9d77db): Error starting userland proxy: Bind for [0.0.0.0:8080](http://0.0.0.0:8080) failed: port is already allocated.

ALSO ran it with --publish … with the same result

thanks for your help

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [July 20, 2018, 7:42am UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/4 "2018-07-20T07:42:20Z")

</div>

can you try and run this on your host:  
sudo netstat -tulpn

and post the results

---

<div class="post-metadata">

**Author:** ![sillydockerid](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/sillydockerid/32/20234_2.png) [@sillydockerid](https://forums.docker.com/u/sillydockerid)\
**Post date:** [July 20, 2018, 9:42am UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/5 "2018-07-20T09:42:44Z")

</div>

> [@mtncouger](#):
>
> Bind for [0.0.0.0:80](http://0.0.0.0:80) failed: port is already allocated.

The problem is clearly stated in the error message. You are trying to bind with a port that is already allocated. Use a different port. For example (if port 81 is still free)  
docker container run -d -p 81:80 nginx

---

<div class="post-metadata">

**Author:** ![mtncouger](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/mtncouger/32/20371_2.png) [@mtncouger](https://forums.docker.com/u/mtncouger)\
**Post date:** [July 22, 2018, 6:39pm UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/6 "2018-07-22T18:39:07Z")

</div>

I sent you the wrong message, I know that I need to get the right port.

Thanks

Ron

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [July 23, 2018, 6:39am UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/7 "2018-07-23T06:39:46Z")

</div>

what @sillydockerid ment, is that maybe you are running apache/nginx on the same host, and thats why docker cant use port 80/8080.

So if you try and map to a random port, like 81, or 1337 and test if that works. ( with -p 81:80 )

---

<div class="post-metadata">

**Author:** ![mtncouger](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/mtncouger/32/20371_2.png) [@mtncouger](https://forums.docker.com/u/mtncouger)\
**Post date:** [July 24, 2018, 2:05am UTC](https://forums.docker.com/t/docker-error-response-from-daemon/54174/8 "2018-07-24T02:05:09Z")

</div>

rons-iMac:~ ronnats$ docker container run --publish 8080:80 nginx

docker: Error response from daemon: driver failed programming external connectivity on endpoint boring\_bardeen (b2d5b0c01ea62f051e1ff2960903e7a0f9ae64c939043772865eef46b5600705): Error starting userland proxy: Bind for [0.0.0.0:8080](http://0.0.0.0:8080) failed: port is already allocated.

rons-iMac:~ ronnats$ docker version

Client:

Version: 18.06.0-ce-rc3

API version: 1.38

Go version: go1.10.3

Git commit: cbfa3d9

Built: Thu Jul 12 05:15:46 2018

OS/Arch: darwin/amd64

Experimental: false

Server:

Engine:

Version: 18.06.0-ce-rc3

API version: 1.38 (minimum version 1.12)

Go version: go1.10.3

Git commit: cbfa3d9

Built: Thu Jul 12 05:26:13 2018

OS/Arch: linux/amd64

Experimental: true

rons-iMac:~ ronnats$ docker container run --publish 8081:80 nginx (nothing . hangs)

^[[A^C

rons-iMac:~ ronnats$ docker container run --publish 8088:80 nginx . ditto

rons-iMac:~ ronnats$ docker container run -p 80:80 nginx

docker: Error response from daemon: driver failed programming external connectivity on endpoint practical\_brahmagupta (eec8c6d70f9ba91589dad2c2013476fdb869f55c3edaf0cfe821a5e2ec550ec0): Bind for [0.0.0.0:80](http://0.0.0.0:80) failed: port is already allocated.

ERRO[0000] error waiting for container: context canceled

rons-iMac:~ ronnats$ docker container run --publish 81:80 nginx . ditto

checked docker ps only one shows

rons-iMac:~ ronnats$ docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

ecef09eb5aed nginx “nginx -g 'daemon of…” 8 minutes ago Up 8 minutes 0.0.0.0:80-\>80/tcp wonderful\_sinoussi

r

anything you need let me know

Ron
