Version 2.2.8
The connection to https://06c1c54b.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:8080.
Make sure that a web service is running on localhost:8080 and that it is a valid address.
The error encountered was: dial tcp: lookup localhost on 127.0.0.1:53: no such host
Solved by using 127.0.0.1 instead of localhost
Works
ngrok http 127.0.0.1:8080 -host-header="127.0.0.1:8080"
Doesn't work
ngrok http localhost:8080 -host-header="localhost:8080"
Make sure this line is included in the hosts file
127.0.0.1 localhost
For MacOS you can find the hosts file here: /etc/hosts
I am using WAMP as my http server. After I installed ngrox I started getting this same error on all my vhosts.
dial tcp4: lookup example.local on 127.0.0.1:53: no such host
My problem was that I had the VPN on.
@jlnarvaez, thanks for the response. I had the same issue and my VPN was on.
@OzanKurt
Problem is : You don't have a localhost named example.local
Solution : add this host name and point it to localhost address
On mac you can do :
Most helpful comment
Solved by using 127.0.0.1 instead of localhost
Works
ngrok http 127.0.0.1:8080 -host-header="127.0.0.1:8080"Doesn't work
ngrok http localhost:8080 -host-header="localhost:8080"