I'm trying to run a local node server, but for whatever reason localhost:3000
does not work. The error page states This webpage is not available ERR_CONNECTION_CLOSED
However, 127.0.0.1:3000
does work. I have tried making changes to my hosts file, but to no avail. Does anyone have any idea what's causing the problem?
Chrome version is 46.0.2490.80 m
Go to chrome://flags and set "Built-in Asynchronous DNS" to "Disabled", then restart the browser. This allows all local domains to be accessed. Looks like DNS was just choking up the issue.
1) Open Google Chrome browser. 2) Type chrome://flags/#allow-insecure-localhost in address bar. 3) Click on Enable. 4) Select "Relaunch Now" option displaying at the bottom after making the changes OR Re-open the chrome browser.
What Is the Localhost Refused to Connect Error? The localhost simulates a web server running on your computer. When the “localhost refused to connect” error appears, it is likely due to misconfigured port. Other common reasons include insufficient permissions and the Apache webserver not running properly.
Here are the steps I took to make this work correctly:
127.0.0.1 localhost.
was present, and saved the filechrome://net-internals/#dns
Alternatively, this also works:
localhost
and deleteUnbeknownst to me, my project had an HSTS middleware that set an HSTS cookie
For me (I had HTTP and HTTPs dev server on same port)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With