I am trying to run ngrok and establish a connection on google colab. The code runs fine but I get the following error,
The connection to http://7f319cc47f9f.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
Make sure that a web service is running on localhost:80 and that it is a valid address.
The error encountered was: dial tcp 127.0.0.1:80: connect: connection refused
Now I am fairly new to ngrok and have little knowledge about how the servers work. So if any of you have a solution to this please give me a step by step solution. Also, I heard running the server fixes the problem but I am yet to find out how. I used port 8051
.
You are tunneling to port 80, but nothing is running there. As you mentioned port 8051, I assume that's where you mean to be tunneling. It seems you're using
pyngrok
, so according to the docs you would specify a port other than the default 80 like so: