ngrok icon indicating copy to clipboard operation
ngrok copied to clipboard

Failed to complete tunnel connection

Open tejasjadhav opened this issue 7 years ago • 27 comments

I have a Django server running inside a Docker instance exposed on port 8000. I can access the server from my mobile phone (connected on the same network) too. I ran ngrok http 8000. However, ngrok doesn't seem to work and throws the following error though I could access http://localhost:8000/,

9e04064f ngrok io

Not only Django, even when I ran a simple Python server (outside Docker) running on port 8080, ngrok still gave the same error.

Version

ngrok: 2.2.8 OS: Arch Linux (updated)

tejasjadhav avatar Feb 21 '18 10:02 tejasjadhav

I'm having this same issue on my Arch system.

siddhartpai avatar Feb 28 '18 19:02 siddhartpai

Weirdly today ngrok worked fine all morning, and now it's back on the same error. I'm using the same version 2.2.8 . Also my ngrok window looks like this :

https://i.imgur.com/aNsIwet.png

siddhartpai avatar Mar 01 '18 19:03 siddhartpai

start your local server For example mine is WampSever yours can be Xampp, Lamp, Mamp. Local server itself starts automatically http 80 port.

sanchitverma168 avatar Mar 08 '18 06:03 sanchitverma168

I am having the same problem with port 80 anybody having solutions

raazulhaq avatar Aug 13 '18 19:08 raazulhaq

Actually when i run beef with the ngrok port i get the same error at port 80

raazulhaq avatar Aug 13 '18 19:08 raazulhaq

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

sanchitverma168 avatar Aug 13 '18 19:08 sanchitverma168

My server is running i think.My ngork http 80 is showing bad gateway

raazulhaq avatar Aug 13 '18 20:08 raazulhaq

Do i have to use apache to start the server..sorry im a beginner

raazulhaq avatar Aug 13 '18 22:08 raazulhaq

yes that what i was saying you have to start the Apache and i think location of the ngrok application also matters so put it there where all your projects are located of their respected server

sanchitverma168 avatar Aug 14 '18 01:08 sanchitverma168

yes that what i was saying you have to start the Apache and i think location of the ngrok application also matters so put it there where all your projects are located of their respected server

sanchitverma168 avatar Aug 14 '18 01:08 sanchitverma168

Plzzz tell me if i have to use beef do i have to put port80 and port 3000???how do I do that???

raazulhaq avatar Aug 14 '18 07:08 raazulhaq

Worked for me after change region (EU) with laragon

MIBHI avatar Oct 31 '18 10:10 MIBHI

I think this is because of u stopped ur local server. first u start ur local server (xampp,wampp,or npm start) second open ngrok.exe and type(ngrok http (ur server port))

yeyintnaung135 avatar Aug 23 '19 08:08 yeyintnaung135

im a begginer, can someone tell me how to start a server?

GODUGOLLAKARTHIK avatar Jan 04 '20 06:01 GODUGOLLAKARTHIK

I was running a simple NodeJS server on 3000, and I ran across this issue for two cases.

  1. My server was stopped.
  2. I was not using the correct "ngrok http 3000" command.

swateek avatar Mar 03 '20 16:03 swateek

I had the same issue. It was fixed by starting my local server using npm run dev and then running ngrok command ngrok http 3000 (in my case)

ghost avatar Apr 27 '20 16:04 ghost

How to start a server can anyone tell me!!

Akshay-Arjun avatar Aug 01 '20 12:08 Akshay-Arjun

@PlanetHackers-YT starting your local server is easy, depending on your environment. Are you working with nodeJS?

IkkyOdufade avatar Sep 15 '20 19:09 IkkyOdufade

I have faced the same issue and i have to start xampp server but it gives me a same error so what I need to do?

snspankti avatar Oct 15 '20 07:10 snspankti

I have faced the same issue and i have to start xampp server but it gives me a same error so what I need to do?

start your local server whatever You are using. For example WAMP,LAMP MAMP OR XAMPP

  1. Start your Apache server.
  2. Restart ngrok .

sanchitverma168 avatar Oct 16 '20 04:10 sanchitverma168

ok thank you.

On Fri, 16 Oct 2020 at 10:29, Sanchit Verma [email protected] wrote:

I have faced the same issue and i have to start xampp server but it gives me a same error so what I need to do?

start your local server whatever You are using. For example WAMP,LAMP MAMP OR XAMPP

  1. Start your Apache server.
  2. Restart ngrok .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/inconshreveable/ngrok/issues/478#issuecomment-709778193, or unsubscribe https://github.com/notifications/unsubscribe-auth/APSRJ4H6XKQSOOUHJSY7JYTSK7HMHANCNFSM4ERVOIBQ .

snspankti avatar Oct 16 '20 08:10 snspankti

https://stackoverflow.com/a/65080606/12568833

soumya997 avatar Nov 30 '20 20:11 soumya997

This worked for me: -the reason is that your PC is not a server yet -in Debian7 / Ubuntu14 just enter this command: ==> sudo /etc/init.d/apache2 start OR ==>sudo /etc/init.d/apache2 restart Then restart your ngrok

TH3V1P3R avatar Feb 03 '21 09:02 TH3V1P3R

Hi guys,

I'm facing this same issue, tried most of the methods it didnt work. Using ngrok for streamlit on google colab

"The error encountered was: dial tcp [::1]:80: connectex: No connection could be made because the target machine actively refused it.

Tolulade-A avatar Apr 13 '21 19:04 Tolulade-A

If someone is still having the issue with the "no such host" message, try adding the following line to /etc/hosts :

127.0.0.1  localhost

Fixed it for me

acauquil avatar May 27 '21 12:05 acauquil

first, you must setup your apache service...
$ service apache2 status ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: disable> Active: inactive (dead) Docs: https://httpd.apache.org/docs/2.4/

$service apache2 enable 3 ⨯ Usage: apache2 {start|stop|graceful-stop|restart|reload|force-reload}

$service apache2 status 3 ⨯ ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: disable> Active: inactive (dead) Docs: https://httpd.apache.org/docs/2.4/

$service apache2 start
service apache2 status ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: disable> Active: active (running) since Thu 2021-05-27 12:44:50 BST; 3s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 6101 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) Main PID: 6115 (apache2) Tasks: 6 (limit: 4532) Memory: 17.8M CPU: 109ms CGroup: /system.slice/apache2.service ├─6115 /usr/sbin/apache2 -k start ├─6120 /usr/sbin/apache2 -k start ├─6121 /usr/sbin/apache2 -k start ├─6122 /usr/sbin/apache2 -k start ├─6123 /usr/sbin/apache2 -k start └─6124 /usr/sbin/apache2 -k start

May 27 12:44:49 openall systemd[1]: Starting The Apache HTTP Server... May 27 12:44:50 openall systemd[1]: Started The Apache HTTP Server.

bennylangston avatar May 27 '21 12:05 bennylangston

@TH3V1P3R Thank you so much,,,,,,, It works properly

shahriya3 avatar Apr 12 '22 14:04 shahriya3

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.

russorat avatar May 24 '24 18:05 russorat