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.

'localhost' does not work

See original GitHub issue

Rancher Desktop Version

1.0.0

Rancher Desktop K8s Version

1.21.9

What operating system are you using?

Windows

Operating System / Build Version

Windows 10 Enterprise 19044.1466

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

No response

Actual Behavior

I want to connect localhost in i.e., Azure Data Studio/Sql Server Management Studio, but I get an error.

Steps to Reproduce

  1. Install Rancher Desktop
  2. Run docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
  3. Install Azure Data Studio/Sql Server Management Studio
  4. Open 3. and connect using localhost and credentials from 2.

Result

Timeout

Expected Behavior

Database will connect fast.

Additional Information

I did the same with Docker Desktop I get following listening ports, image With Rancher Desktop I get following listening ports, image I believe port mapping is not done properly. You can argue that spinning up a simple nginxdemos container do work in the browser. Every browser based lookup works but not outside a browser.

Workaround: Disabling IPv6 on all net adapters works, but it takes some time to connect as it was doing a round trip of lookups and falls back on 127.0.0.1. If I use 127.0.0.1 directly it connects very fast.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:9

github_iconTop GitHub Comments

2reactions
wiruzmancommented, Mar 15, 2022

I created a dotnet project that can detect ports created by docker with RD in WSL and bind ANY ip. localhost will work after the bind.

https://github.com/wiruzman/wsl-port-forwarder

1reaction
wertone-ghcommented, Mar 6, 2022

Any updates regarding fix for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Localhost Refused to Connect - How to Fix the Error
Localhost is a loopback address used for testing and developing on a local machine. When a user pings localhost, the request remains on...
Read more >
Localhost is not working - Stack Overflow
Another possibility for localhost not working is a corrupted HOSTS file. Try deleting it and recreating it with an editor that is not ......
Read more >
How to Fix 'Localhost Refused to Connect' Error on Windows?
First off, the most common way to resolve this error is by changing the port of the apache web server if you are...
Read more >
Chrome Saying Localhost Refused to Connect, How to Fix the ...
How to Fix Localhost Refused to Connect Chrome? · Fix 1: Change Firewall Settings · Fix 2: Access Localhost by Using 127.0.0.1 ·...
Read more >
Why is localhost not working? - Quora
Go to Your XAMPP Control panel. · Click on apache > config > Apache (httpd.conf) · Search for Listen 80 and replace with...
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