Unable to run a container which is reachable on ports 80 or 443
See original GitHub issueRancher Desktop Version
0.7.1
Rancher Desktop K8s Version
1.22.5
What operating system are you using?
Windows
Operating System / Build Version
Windows 10 Enterprise 21H2
What CPU architecture are you using?
x64
Windows User Only
No response
Actual Behavior
When I start Rancher-Desktop for the first time after the start of my PC, I cannot use the standard ports 80 or 443 as a mapped port for a container.
The first time start seems to be important because the problem vanished after I switched from dockerd to containerd and back (and exited and startet Rancher-Desktop again). I wrote a detailed description in the additional information part.
Steps to Reproduce
Start Rancher-Desktop with the dockerd container runtime enabled. Run the command
docker run -it --rm -p 80:80 nginx
Result
The container is not started and the error response is:
docker: Error response from daemon: driver failed programming external connectivity on endpoint priceless_agnesi (f96c48b8190b4874131ae68ba2bde839958f91b1e4c0eb905da7851033cbd383): Error starting userland proxy: listen tcp4 0.0.0.0:6443: bind: address already in use.
Expected Behavior
The container should run and be accessible via port 80 (or 443).
Additional Information
I snooped around a bit and tcpview showed a wslhost.exe process that listens on port 80. That lead to a process rancher-desktop-guestagent in the rancher-desktop WSL VM that had both ports (80 and 443) open.
As we had some dificulties reaching a started nginx with containerd/nerdctl, I switched to containrd to see If the same problem was there too. but it wasn’t. So I switched back to dockerd and lo and behold: the rancher-desktop-guestagent was started again and was running but did not use ports 80 and 443. Now the described docker command ran without any issues.
Then I completely exited and started Rancher-Desktop again and still no ports 80 and 443 used by the rancher-desktop-guestagent process.
I know this is not the best reproducible item, but maybe you can look into the rancher-desktop-guestagent process to see why it would open the standard ports and whether that is really necessary (seemingly they are not really used).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:14 (3 by maintainers)
At least, :80 could serve, instead of a 404, some kind of explanation about what is “suddently” (after RD install) serving :80. As mentioned by others, my first unsuccesful test was a simple nginx test, on :80 obviously… and this simple test failed until I realized that :80 was now taken by RD although the main entry page shows nothing interesting by default.
Yes, this works now! (Tried in a Windows installation)