Try all available addresses when connecting to localhost (127.0.0.1 and ::1)
See original GitHub issueIn node v17 (specifically https://github.com/nodejs/node/pull/39987), we switched the default ordering of dns entries to follow what the OS is providing us vs reordering to put IPv4 addresses always first. This creates quite a few issues for folks as some tools only listen to 127.0.0.1
and not ::1
.
I think we should try multiple addresses when dealing with localhost when establishing a new connection.
Originaklly reported as https://github.com/nodejs/undici/issues/1248.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
What Is 127.0 0.1, Localhost, or a Loopback Address?
127.0.0.1 is special among IP addresses. Typically, an IP address is unique to every computer on both your local network and the internet....
Read more >What is localhost? How to connect to 127.0.0.1 - IONOS
Localhost (127.0.0.1). When you (or your computer) call an IP address, you are usually trying to contact another computer on the internet.
Read more >localhost/127.0.0.1:8080 - Connection refused - Stack Overflow
I am using xampp apache server to serve resources to the application from my machine. But i am getting the above error. I...
Read more >What Is the 127.0.0.1 IP Address? - Lifewire
The IP address 127.0.0.1 is a special-purpose IPv4 address and is called the localhost or loopback address. All computers use this address ......
Read more >The Difference Between 127.0.0.1 and Localhost - Baeldung
So why do we need to establish a connection with the originating device? In some cases, we would want to validate the Internet...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should we enable it by default? Agents should be able to set this option already, under
connect
in options.Yes, we’d need to enable that setting once it lands.