Please help me in resolving this issue.
Thanks
While I was working on a Rails app I wanted to run it on ngrok but I got same error below:
The connection to http://xxxxxx.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:3000.
It seems like ngrok works fine but my local server is not. Which is true since I forgot to run my rails app first by run $ rails s
. By doing so I was able to get ngrok tunneing works fine.
Make sure your local server run first.
Good luck.
ngrok shows this error when the local server is not running start your server first and also check the server port as well as ngrok port
For example: i am using two servers WAMP && XAMPP WAMP is on port 80 While XAMPP is on port 8012
therefore the command will be
ngrok http 80 for WAMP folder ngrok http 8012 for xampp folder
The solution that worked for me: Try explicitly setting the localhost IP by using the command ngrok http 127.0.0.1:8000 (if you have an external server, you can do :port) instead of ngrok http 8000. If that doesn't work, this article can also help https://weekendprojects.dev/posts/fixed-ngrok-access-to-ngrok.io-has-been-denied/.
I was getting that error even though my local server was running.
ngrok http -host-header=rewrite launch.local:80
It helped when I changed it to
ngrok http -host-header=launch.local 80
First start your local server before you running ngrok.
eg:- I start my local server via apache service apache2 start
your service API,WebPAge, whearever you have on port 7898 is not running
© 2022 - 2025 — McMap. All rights reserved.