ngrok
ngrok copied to clipboard
dial tcp: lookup localhost on 127.0.0.1:53: no such host
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 :
- open the terminal
- sudo vi /etc/hosts
- enter password
- add this line : 127.0.0.1 example.local (replace the example) Done
guys use localtunnel instead it solved my problem
Work for me: ngrok http 127.0.0.1:5000 --host-header="127.0.0.1:5000"
with two --
Thank you for opening this issue! As of April 2016, the ngrok service has permanently moved to https://ngrok.com/. To join the community and file bug reports or feature enhancements for the ngrok agent, please go to https://github.com/ngrok/ngrok.
This repository is no longer actively maintained and will be archived soon to reduce confusion with the latest ngrok versions. We thank you for the continued support of ngrok and look forward to seeing you over at ngrok.com and the ngrok Community Repo.