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

Error starting userland proxy: listen tcp 0.0.0.0:8080: bind: address already in use #3522

Closed
HarryWeppner opened this issue Feb 12, 2019 · 4 comments

Comments

@HarryWeppner
Copy link

commented Feb 12, 2019

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Container binds to host port 8080.

Actual behavior

docker: Error response from daemon: driver failed programming external connectivity on endpoint nostalgic_shannon (ebbcb999408abe84034b8869720b1c7b1a081f5956239971613ff18604efdd25): Error starting userland proxy: listen tcp 0.0.0.0:8080: bind: address already in use.
ERRO[0000] error waiting for container: context canceled

Information

  • macOS Version: 10.14.3

After upgrading to 2.0.2.0 binding to host port 8080 failed claiming that the address is already in use. I verified that lsof -i tcp:8080 did not show any macOS process listening on that port.

I bisected further and found that disabling Kubernetes made it work again!? Note that at that time no resources were created on K8S.

Diagnostic logs

Docker for Mac: 2.0.2.0

Steps to reproduce the behavior

  1. docker run -p 8080:80 nginxdemos/hello
@djs55

This comment has been minimized.

Copy link
Contributor

commented Feb 13, 2019

Thanks for your report. When Kubernetes is enabled the port 8080 is bound inside the helper VM -- though not on the host -- and this causes a clash with regular port forwarding. We're investigating possible fixes.

djs55 added a commit to djs55/vpnkit that referenced this issue Feb 13, 2019

vpnkit-userspace-proxy: don't bind a local IP in the VM by default
This avoid clashes between ports bound inside the VM and ports bound
outside.

Ref [docker/for-mac#3522]
Ref [docker/compose-on-kubernetes#70]

Signed-off-by: David Scott <dave.scott@docker.com>

djs55 added a commit to djs55/vpnkit that referenced this issue Feb 13, 2019

vpnkit-userland-proxy: don't bind a local IP in the VM by default
This avoid clashes between ports bound inside the VM and ports bound
outside.

Ref [docker/for-mac#3522]
Ref [docker/compose-on-kubernetes#70]

Signed-off-by: David Scott <dave.scott@docker.com>
@HarryWeppner

This comment has been minimized.

Copy link
Author

commented Feb 20, 2019

@djs55 is there any other info needed - it sounds like you've identified a feasible approach!?

@djs55

This comment has been minimized.

Copy link
Contributor

commented Feb 22, 2019

Sorry for the delay getting back to you. The upstream issue is believed fixed and there is a workaround in the latest development builds if you'd like to try them: Mac and Win

Otherwise the fix should be in the next edge and stable releases.

Thanks again for your report!

@NFarrington NFarrington referenced this issue Apr 3, 2019

Closed

Cannot push image to local registry #3611

2 of 2 tasks complete
@docker-desktop-robot

This comment has been minimized.

Copy link
Collaborator

commented May 23, 2019

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.