To resolve this issue from the title [ Error starting userland proxy ] we must dot the following things from this article. Usually use dockers from Linux" , but this time I had to fight them under Windows 10". After a few minutes I found out again that everything was easier under Linux, because I was facing problems all the time with correct and stable operation of Docker" for Windows". But to the point, what was the problem?
Table of Contents
Introduction
Windows Fast Startup
Windows Fast Startup is a feature in Microsoft Windows" that allows the operating system to boot up faster by saving a snapshot of the system state to a file on the hard drive when the system is shut down.
When Fast Startup is enabled, the system state is saved to a file called the “hibernation file” (hiberfil.sys). This file contains a copy of the system memory, as well as the system’s current device drivers and system files.
When the system is restarted, the operating system reads the hibernation file and uses it to restore the system to the state it was in when it was shut down. This allows the system to start up much faster than it would if it had to load all the device drivers and system files from scratch.
Note that Fast Startup may not be available on all systems, and it may not be compatible with certain hardware or software configurations.
Error Starting Userland Proxy
The “Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use” error typically occurs when another process is already using the TCP port that you are trying to bind to.
This error can occur when you are trying to start a service or application that listens on a specific port, and that port is already in use by another process.
To resolve this issue, you will need to find the process that is using the port and either stop it or configure your service or application to use a different port.
Problem
We run the container and we get the error:
Starting docker_jenkins_1 ... error Starting docker_nexus_1 ... ERROR: for docker_jenkins_1 Cannot start service jenkins: driver failed programming external connectivity on endpoint docker_jenkins_1 (f275652123e7c423e6cb482efc6bf88775b1b971c971b3f4e2f30010a3a4debf): Error starting userland proxy: listeStarting docker_nexus_1 ... error ERROR: for docker_nexus_1 Cannot start service nexus: driver failed programming external connectivity on endpoint docker_nexus_1 (bf3bfd7a65e23a2f0625d8389689359dc7990599a6fac0bd13aed0cf00619f32): Error starting userland proxy: listen tcp 0.0.0.0:8081: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted. ERROR: for jenkins Cannot start service jenkins: driver failed programming external connectivity on endpoint docker_jenkins_1 (f275652123e7c423e6cb482efc6bf88775b1b971c971b3f4e2f30010a3a4debf): Error starting userland proxy: listen tcp 0.0.0.0:50000: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted. ERROR: for nexus Cannot start service nexus: driver failed programming external connectivity on endpoint docker_nexus_1 (bf3bfd7a65e23a2f0625d8389689359dc7990599a6fac0bd13aed0cf00619f32): Error starting userland proxy: listen tcp 0.0.0.0:8081: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted. ERROR: Encountered errors while bringing up the project.
The problem is with the Fast Startup feature, which was introduced in Windows 10. Its purpose is to make Windows" start faster. But nothing happens magically. Behind the buzz word “Fast Startup” there is a kind of hibernation and cache of certain elements of the application. As a result, when the system is restarted, they are not restarted, but use the cache. And this is why, despite restarting or shutting down and restarting the computer, we still get the error that the port is already in the device.,
Possible Solutions
To solve the above problem, just turn off the Fast Startup options. We can do it, for example, in the following two ways:
#1 Solution – Turn Off Fast Startup
- Open" the Start Menu and enter Power Options
- Click in the left side menu: Choose what the power buttons do
![[SOLVED] Docker & Windows 10: Error Starting Userland Proxy - Check Simple Solution In 3 Mins! 2 Docker & Windows 10: Error starting userland proxy [ROZWIĄZANY] error response from daemon: ports are not available: listen tcp 0.0.0.0:3306: bind: only one usage of each socket address (protocol/network address/port) is normally permitted.](https://bigdata-etl.com/wp-content/uploads/2019/10/zasilanie1-1-1024x609.png)
- In the Shutdown options section, CHECK the checkbox: Enable fast startup (recommended)
- Restart the computer. Remember to close all running containers before restarting.
![[SOLVED] Docker & Windows 10: Error Starting Userland Proxy - Check Simple Solution In 3 Mins! 3 Docker & Windows 10: Error starting userland proxy [ROZWIĄZANY] error response from daemon: ports are not available: listen tcp 0.0.0.0:3306: bind: only one usage of each socket address (protocol/network address/port) is normally permitted.](https://bigdata-etl.com/wp-content/uploads/2019/10/zasilanie2-1024x609.png)
#2 Solution – Change Registry
The second way is to change an entry in the system registry.
- Start the Registry Editor or enter regedit in the Start Menu.
- We are looking for an entry below, Open" the file: HiberbootEnabled and change the value:
- 0 – disable Fast Startup
- 1 – turn on Fast Startup
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
#3 Solution – Kill Another Process
Here are a few steps you can try to troubleshoot this issue:
- Use the
lsof
command to find the process that is using the port:
lsof -i :80
This will list all the processes that are using the port 80.
- Find the process ID (PID) of the process using the port, and use the
kill
command to stop it:
lsof -i :80
#4 Solution – Use Different Port
Alternatively you can use different port to not have conflict with other applications.
Good practice
Unfortunately, I noticed that despite disabling Fast Start, I was sometimes getting this error again. I also noticed that this only happened when I hadn’t disabled all running containers before restarting or shutting down my computer, too …
Always turn off all containers after finishing work 🙂
Error starting userland proxy: listen tcp4 0.0 0.0 3306 bind: address already in use, Cannot start service Ports are not available docker, Docker Cannot start service Ports are not available
Could You Please Share This Post?
I appreciate It And Thank YOU! :)
Have A Nice Day!