question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run a container which is reachable on ports 80 or 443

See original GitHub issue

Rancher 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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
chevdorcommented, Jan 31, 2022

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.

1reaction
jhollmannkcommented, Mar 9, 2022

Yes, this works now! (Tried in a Windows installation)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Port 80 and Port 443 not accessible when published via ` ...
You cannot access the containers form the host using their IP's. You need to map the exposed ports on the host.
Read more >
Run docker engine with 443 port already occupied
"Additionally, your host needs to have TCP ports 80 and 443 available for the Docker Trusted Registry container port mapping."
Read more >
Running container with port 80 and 443? : r/synology
All of my containers are able to start without issue, and are reachable via different IP addresses as soon as I change the...
Read more >
Enable ports 80 (HTTP) and 443 (HTTPS)
Enable ports 80 (HTTP) and 443 (HTTPS). By default, PaperCut NG/MF listens to ports 9191 and 9192 for HTTP and HTTPS communication respectively....
Read more >
Can't access port 80 (nginx) exposed through Docker ...
I would like to use a Docker container on my Raspberry PI (machine A) to act as a VPN proxy for a specific...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found