1

After having installed Rancher desktop on my Windows 10 laptop, I cannot reach services listening on localhost through Chrome. Rancher desktop is configured to support Moby/dockerd.

The error reported by Chrome is:

This site can’t be reached
The connection was reset.
Try:

Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_RESET

Replacing localhost with 127.0.0.1 they are reachable, instead.

Ping resolves localhost to 127.0.0.1 correctly:

PS C:\> ping localhost

Pinging xxxxxxxxxx [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
PS C:\>

I noticed that the hosts file (C:\Windows\System32\drivers\etc\hosts) contains the following entry:

# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

I tried to add

127.0.0.1 localhost

to the hosts file, unsuccessfully.

I tried to run the following:

netsh winsock reset
netsh int ip reset
ipconfig /release
ip/config /renew
ipconfig /flushdns

and to restart the pc, but it didn't work, either.

I also tried solutions to similar problems, like:

Any suggestion to solve the problem?

Starnuto di topo
  • 3,215
  • 5
  • 32
  • 66

0 Answers0