for-win icon indicating copy to clipboard operation
for-win copied to clipboard

After update to version 2.2.0 can't bind to specific IP Address

Open amari-at4 opened this issue 6 years ago • 8 comments

For development we're using docker-compose and to avoid problems with port mapping binding with another local services on our Windows workstations we are using additional addresses in order to do the port mapping

Expected behavior

Up the docker-compose configuration without problem

Actual behavior

Receive the error

`docker-compose up -d
Creating network "areadeluxe_net" with driver "bridge"
Creating areadeluxe-db ...
Creating areadeluxe-db ... error
WARNING: Host is already in use by another container

ERROR: for areadeluxe-db Cannot start service mysql: driver failed programming external connectivity on endpoint areadeluxe-db (14e5a020229490d4ce7c3ea8d5da2daa62b35ad08a3724e6 e61e71cbbb00dbcc): Error starting userland proxy: listen tcp 192.168.38.200:3306: bind: cannot assign requested address
Creating areadeluxe-frontal ... error

ERROR: for areadeluxe-frontal Cannot start service apache: driver failed programming external connectivity on endpoint areadeluxe-frontal (926b5c72dbb1158a75412bac99c0f18f9f342 4495d2c64386f17cc8e172cd0df): Error starting userland proxy: listen tcp 192.168.38.200:80: bind: cannot assign requested address

ERROR: for apache Cannot start service apache: driver failed programming external connectivity on endpoint areadeluxe-frontal (926b5c72dbb1158a75412bac99c0f18f9f3424495d2c64386 f17cc8e172cd0df): Error starting userland proxy: listen tcp 192.168.38.200:80: bind: cannot assign requested address

ERROR: for mysql Cannot start service mysql: driver failed programming external connectivity on endpoint areadeluxe-db (14e5a020229490d4ce7c3ea8d5da2daa62b35ad08a3724e6e61e71cb bb00dbcc): Error starting userland proxy: listen tcp 192.168.38.200:3306: bind: cannot assign requested address
ERROR: Encountered errors while bringing up the project.`

Before executing the command docker-compose up -d if I execute the command

docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

There is no container at all

Here is my docker-compose.yml docker-compose.zip

This docker-compose works well before the update. Indeed if change my the port binding to 0.0.0.0 the docker-compose starts without problem.

Information

Please, help us understand the problem. For instance:

  • Is it reproducible? Yes
  • Is the problem new? Yes
  • Did the problem appear with an update? After the update to 2.2.0
  • Windows Version: Windows 10 (build 1903)
  • Docker Desktop Version: 2.2.0.0 (42247)
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No

My uploaded diagnostics are: 14EF862D-25B1-4D96-91D5-953719964324/20200122122515

amari-at4 avatar Jan 22 '20 17:01 amari-at4

+1

simpler repro

docker run -p <local_ip>:3000:80 nginx

Loopback works, local IP does not.

ceecko avatar Jan 23 '20 20:01 ceecko

I've just downgraded my docker engine version to 2.1.0.5 and it's this docker-compose works again. Something change between 2.1.0.5 and 2.2.0.0 that fails to bind to local IP.

amari-at4 avatar Jan 24 '20 07:01 amari-at4

We have an Edge release coming out this week that will fix this.

stephen-turner avatar Mar 30 '20 13:03 stephen-turner

Confirming, works 🎉

marekmartins avatar Apr 02 '20 15:04 marekmartins

This is now released in Edge 2.2.3.0, so I'm going to close this ticket.

stephen-turner avatar Apr 02 '20 18:04 stephen-turner

I am on Windows 10: image

And running Docker Desktop: image

I still can not start docksal. I get this error: docker: Error response from daemon: Ports are not available: listen tcp 192.168.64.100:443: bind: The requested address is not valid in its context.

kenrbnsn avatar Apr 17 '20 12:04 kenrbnsn

@kenrbnsn If you're on 2.2.3.0, that must be a different bug. Please open a new ticket, and include a diagnostics id. Thank you.

stephen-turner avatar Apr 17 '20 12:04 stephen-turner

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Jul 13 '20 03:07 docker-robott