3

This question is similar to the one here, but that question is 18 months old and I have more specific information.

I am running a node.js development server on my local PC (Windows 7), and it is set to listen on localhost:8080.

Using IE11 or Firefox, I can successfully connect to both http://localhost:8080 and http://127.0.0.1:8080

Using Chrome (version 58), I can successfully connect to http://127.0.0.1:8080, but I can't connect to http://localhost:8080 - it gives me ERR_CONNECTION_RESET.

However, if I configure the node server to a different port, say 8081 or 8888, then Chrome can happily connect using localhost as well. So it is not a name resolution problem, but specific to choice of port number.

So what is special in Chrome about localhost when using port 8080?

Community
  • 1
  • 1
Tony Mountifield
  • 99
  • 1
  • 3
  • 6

3 Answers3

0

Maybe this is an IPv4 / IPv6 issue. If your server only listens on IPv4 and you connect to localhost, it could be that it uses the IPv6 address and gets the connection refused. You could try to start the server on IPv4 and IPv6 to resolve this.

0

I had a similar issue and found the answer here. I was able to successfully start my project on http://127.0.0.1, but not on any specific port. I had no issues before and all of a sudden I couldn't connect my project on any localhost port, but I had no problem if I used Safari or Firefox. Try running your project in incognito and if it works then you have session running from a project you were testing. Hope it answers your problem if you haven't already.

K. Pham
  • 47
  • 1
  • 11
  • A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](https://meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. [Answers that are little more than a link may be deleted.](https://stackoverflow.com/help/deleted-answers) – Tarick Welling Jul 09 '19 at 09:31
-2

I had a similar problem, I tried a bunch of things but the only thing that ended up working was resetting Chrome settings. Hope it helps.

NomenNescio
  • 2,899
  • 8
  • 44
  • 82