Error response from daemon: ports are not available: exposing port tcp 0.0.0.0:3306 -> 0.0.0.0:0: listen tcp 0.0.0.0:3306: bind: only one usage of each socket address (protocol/network address/port) is normally permitted.

Docker Desktop for Windows

The Docker Desktop for Windows community forum is place where users can meet and discuss Docker Desktop for Windows and related technologies.
If you encounter problems with Docker for Windows, we recommend:

  • reading the documentation
  • searching the GitHub issue tracker

Finally, if your issue has not been addressed elsewhere, running:

  • Settings
    Diagnose & Feedback
    Open Issues.

This forum is not an official product support or issue reporting channel.

I’m getting the following error: docker.exe: Error response from daemon: driver failed programming external connectivity on endpoint webserver [51d30fe16e368770904f7f28e624f78c9835f53c3b11188caf7504932a8c1c7f]: Error starting userland proxy: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

1 Like

Did you get the solution for this issues ?

Yes. I had installed docker on ubuntu while running ubuntu virtually on windows. Hence, I uninstalled that and installed Docker on Windows and established the connectivity. Also, after successful installation on windows, Docker -> Settings -> General -> Expose daemon on tcp://localhost:2375 without TLS. Enable this setting. Also perform all the installation operations using root access.

1 Like

so what your saying is this doesn’t work on windows 10?

For the same error that ends with "

"

Running Docker - Linux Containers on Windown 10 with checkbox selected for “Expose daemon on tcp://localhost:2375 without TLS” did not resolve this error

docker start “xx” throws same error

– Assuming its the Antivirus/Firewall that’s blocking

I had the same error message, for me, I was running IIS locally on the same Windows 10 host, and had to stop that first.

12 Likes

This is because your IIS or some other server is already running on port 80. Try this and it should work.

docker run --detach --publish 81:80 --name webserver nginx

Then in browser try //localhost:81/

23 Likes

Hey tq…it works for me. Actually i also thought the same…bcz when i opened localhost:80…something is opened which i was generated through azure vm…

your guidance solved this issue, thanks!

Smartest suggestion in the whole thread. Worked like a charm!

In my case port 80 was occupied by IIS. What I did - just changed port for Docker instance. Turning off IIS should help either.

Worked for me. Thank you for this explanation.

This works for me! Thanks!

2 Likes

I solved the usue with the comande

netsh http add iplisten ipaddress=::

12 Likes

Thank you, stop the iis resolve the problem.

Hello and thank you so much. You suggestion solved the issue.

Hello bnmd it works for me.
Thank you a lot.

Works perpect, thanks

Worked. Not sure why no listener was running, but it is now.


Thanks.

This solution solved my issue. Thanks

next page →

October 8, 2020

It’s a sunny day and you are starting your docker container when you get this message: “Cannot start container … bind: address already in use” … hmm, now what? Sometimes, when trying to start your docker instance, its possible to be stunted by another process using the same port. However, there are a few options you have in this situation. The ones I have tried and use when needed are listed here:

To quickly move forward with successfully starting your container, you could just kill whatever is using the port. I usually do that but first check what is using the port, and, if it is non-essential at this time, kill it.

  • You’ll see a prompt for your device password. Type it in and press enter. 
  • Replace 8080 with whichever port you want. A list of currently running processes will  be displayed for you [f.1].It will contain information about each process’s PID, which you will need next. Look at the PID of the process [highlighted in red]. You need it to issue a kill command next. 

  • Find the process that is obstructing your desired port, and ensure it is not something you need. If it is an essential process you will do better to use another option listed below. 
  • In console, type this to stop the process[replace “PID” with the process ID you want to kill]. This will stop the process and you can check that the process has stopped by running the command from step “a”: 

Option 2

  • Change to another port by modifying the default port in your docker-compose.yml file. If the process using your desired port is, in fact, essential for your setup, you can always just change the port for your docker instance. In the example below, it was port 8080 that was being used. You can change it to another value like 8086, for example. Just remember to also adjust any other project settings linking to this particular port to the new value you select.

  • Restart the container instance after doing this for changes to take effect.

Option 3

  • This issue can happen when for any reason your host reboots. In this instance, try restarting your apache server. Stopping apache2 service in the host can solve it.

sudo /etc/init.d/apache2 restart 

sudo apachectl -k restart

Option 4

  • If nginx is running globally this could be the reason too. Run:

When in Doubt

Always refer to the official Docker documentation. The Docker team have created additional resources, both free and paid, to supplement their product, and additional community support. Community support is fantastic! It allows developers from all across the world to collaborate and connect.

If you are new to Docker, have a look at their 101 tutorial here, and their learning programs here.

Best of luck, and happy coding!

About Curious Minds
We are a web development firm in New York and Chicago, providing development resources and consulting for websites and mobile apps since 2004.

Video liên quan

Chủ Đề