Docker Community Forums

Share and learn in the Docker community.

Docker: Error response from daemon

docker

(Mtncouger) #1

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


(Martin Terp) #2

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?


(Mtncouger) #3

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 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 failed: port is already allocated.

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

thanks for your help


(Martin Terp) #4

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

and post the results


(Rik) #5

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


(Mtncouger) #6

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

Thanks

Ron


(Martin Terp) #7

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 )


(Mtncouger) #8

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 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 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