ngrok not establishing connection with working localhost

Created on 23 Nov 2017  Â·  35Comments  Â·  Source: inconshreveable/ngrok

Hello,
Ive just started using ngrok, I followed a simple tutorial to get started: http://www.ifdattic.com/how-to-create-tunnel-with-ngrok/#http-tunnel
I have followed the steps, I currently have 2 files; server.js
server.js:
'use strict';

const express = require('express');
const bodyParser = require('body-parser');
const app = express();

app.use(bodyParser.urlencoded({extended: false}));

app.get('/', function (request, response) {
response.send('Hello');
});

app.post('/', function (request, response) {
response.send(request.body);
});

app.listen(3000);

console.log('Open: http://127.0.0.1:3000');

and pakages.json:

{
"name": "ngroketest",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "index.js"
},
"author": "Torinberger",
"license": "ISC",
"dependencies": {
"express": "^4.16.2"
}
}
`
as well as node_modules. The localhost for http://localhost:3000 is up and running displaying "Hello" as it should be. However ngrok is not able to tunnel to it with this error:

The connection to http://ffd7ba40.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:3000. The error encountered was: dial tcp: lookup localhost: no such host

I feel as though I have made a stupid mistake, and sorry if I have, any help would be appreciated!
Thanks

Most helpful comment

Did anybody ever find a solution plz !!!!!

All 35 comments

Which command did you use to run ngrok? It should be ngrok http 3000

I'm asking because the website you linked also mentions ngrok tcp 27017, just making sure you aren't mixing up these 2

Im assuming it was due to me being behind a firewall. I will try without the firewall asap.

Okay it was a firewall issue, all fixed!

Please mine shows ngrok.io no found . how do i solve that?

im also new to ngrok too, my issue is that my connection status refused to go online...

its displaying something like.
Session Status reconnecting (dial tcp (my ip: my port:) getsockopt: connection refused)
Version 2.2.8
Region United States (us)
Web Interface http://127.0.0.1:4040

Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00

i tried creating a tcp connection on port 1234

i am having the same issue, has anybody found a solution?
session status keeps on showing dial tcp..

I have it as well...

I'm just getting a 404 with ngrok, but localhost at that port is running. Has anyone experienced this? I installed and tried on a different machine with no problems - but I need MY machine to work :/

@amperand i met the same problem.

I'm getting this periodically on CI

HI All i am facing same issue..
ngrok-3

We are using Zscaler cloud proxy security. when i am disabling the Zscaler it's coming online. But with Zscaler it is not connecting. Please any one help me how to bypass proxy from Zscaler portal.?

im having same problem

I think its becuz of a firewall ..
I will run Wireshark and see whats happening to verify

facing same problem..Anyone found the solution??

facing same problem..Anyone found the solution??

In my case I had more than 1 active session. The solution was to have multiple accounts if I was going to have multiple active sessions

Did anybody ever find a solution to this problem? I think the error is happening because of my company's firewall. The command is working if I am connected to another wifi but the problem with doing that is I need to stay connected to that wifi if I want to share my website with others.

Did anybody ever find a solution plz !!!!!

Facing the same problem any solution !!

I am succesfully running it on termux
Command
./ngrok http/tcp 4444
Then turn your Hotspot on
https://i.ibb.co/r6jpNSs/Screenshot-2019-07-08-13-45-32-479-com-termux.png

i need a solution for this issue please i can't find any fix for it...

can't get online on tcp 4444 from termux

Use apache server

port forwarding with ngrok is not working over the network help me......
when i use http://bb9d14e2.ngrok.io to access apache in another computer
"Tunnel http://bb9d14e2.ngrok.io is not found" what should i suppose to do?

Hi guys well i disactivated all my firwalls, i started my apach server on port 80 and i run the ngrok http 80 command and still having the same error : dial tcp 127.0.0.1:6006: connect: connection refused; the client failed to establish a connection to the local address localhost:6006. am trying to run tensorboard on colab btw

Please I need help! my ngrok is not getting session over wan ,
I open my ngrok with ( ./ngrok tcp 4444)
I also set my payload with the ngrok link and its port number , I set my msfconsole to listen on port 4444 which is the port number I used to fired up my ngrok , also using Lhost of 0.0.0.0 .
After installing my payload on the remote android phone , I open it up but I didn't get a session, I don't know what else to do , please I need help

Please I need help! my ngrok is not getting session over wan ,
I open my ngrok with ( ./ngrok tcp 4444)
I also set my payload with the ngrok link and its port number , I set my msfconsole to listen on port 4444 which is the port number I used to fired up my ngrok , also using Lhost of 0.0.0.0 .
After installing my payload on the remote android phone , I open it up but I didn't get a session, I don't know what else to do , please I need help

i too have the same problem

Please I need help! my ngrok is not getting session over wan ,
I open my ngrok with ( ./ngrok tcp 4444)
I also set my payload with the ngrok link and its port number , I set my msfconsole to listen on port 4444 which is the port number I used to fired up my ngrok , also using Lhost of 0.0.0.0 .
After installing my payload on the remote android phone , I open it up but I didn't get a session, I don't know what else to do , please I need help

i too have the same problem

i downloaded the payload in an android phone and i opened it but no session was created
anyone plz help us

Hi guys
I was facing same issue

First of all, you should be able to access the port number you have set locally. For example, there should be a local server open at 3000. Like nodeJS or php or nginx.
So now it's ngrox's job to make locally opened servers accessible from the outside, but we're not opening them locally, so this is the problem.

Please can anyone here help me with the ngrok custom domail set up... been trying this for months now with no results. Thanks

Please note: I am on a paid business plan

Upgrade your free plan to paid version

Sent from ProtonMail mobile

-------- Original Message --------
On Jul 4, 2020, 5:27 PM, Sammie456 wrote:

Please can anyone here help me with the ngrok custom domail set up... been trying this for months now with no results. Thanks

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

I used paid plan

My problem was that i had VPN running. When i turned the VPN off it worked perfectly.

Hot spotting through my phone fixed the issue for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shubhamk1997 picture shubhamk1997  Â·  5Comments

jabooth picture jabooth  Â·  5Comments

owlstack picture owlstack  Â·  5Comments

wujunze picture wujunze  Â·  9Comments

mindcont picture mindcont  Â·  7Comments