Ngrok "client failed to establish a connection to the local address" Error - ngrok

Encountered ngrok error:
client failed to establish a connection to the local address.
I'm running a local server in another terminal on the same port (8081). I've also used postman to confirm the server is running properly on my local machine.
What else would be causing this error?
I have an early 2015 Macbook Pro 13 inch running Sierra.

While I was working on a Rails app I wanted to run it on ngrok but I got below error
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.

If localhost is missing from your /etc/hosts; ngrok may fail to resolve it.
Try to explicitly point to 127.0.0.1 instead of localhost:
ngrok http 127.0.0.1:8080

Related

Can't make request from localhost:xxxx to localhost:yyyy

I have an Xamp server running on MacOs 10.14.6.
I activated port forwarding on it like that :
localhost:8080 -> 80 (Over SSH)
localhost:8443 -> 443 (Over SSH)
I can navigate to my website on localhost:8443 with no issue.
I have another server running Symfony 5.4 available at localhost:8000. I can navigate to this website with no issue too.
But from the 'Xamp hosted' website, I'm not able to make a request to the 'Symfony hosted' server. I have a "Connection Refused error".
I tried to request both 127.0.0.1:8000 and localhost:8000 : same behavior.
I tried to set the Symfony server to listen to a different port too : same behavior.
It only works when I make a request to the real local ip address (like 192.168.1.34:8000). The problem is that this IP is not stable so I'd like to make the localhost work properly.
What could be the cause of this error ?
What can I do to use localhost hostname for my requests ?
you can disable the task manager section for applications running on the same port which may when you want to request a connection on the server you will use it will get a similar rejection. I think it's more or less like that

Ngrok errors '502 bad gateway' - How to point web server to point 5000

I'm new to Web App so I'm sorry if this is a simple question.
I enter: ngrok http 5000
Then when I go to the correct https address I get the message below.
The connection to https://e71eb98330fe.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address 127.0.0.1:5000.
Make sure that a web service is running on 127.0.0.1:5000 and that it is a valid address.
The error encountered was: dial tcp 127.0.0.1:5000: connect: connection refused
According to this answer:
I need to set up a web server and point it to local host 5000.
But my error is slightly different and even when I try going to: localhost:5000
It doesn't work.
Is the problem just that I need to point a web server to 5000? How do I do that?

ngrok not connecting to local server

So, I am running ngrok (current version) on my Mac OSx. But I am getting the following error:
Failed to complete tunnel connection
The connection to http://35504712.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:3746.
Make sure that a web service is running on localhost:3746 and that it is a valid address.
The error encountered was: dial tcp xx.xx.xx.xx:3746: getsockopt: connection refused
I know my server is running properly, as I can actually click the link to my localserver in the error message and get a response from my server.
Any ideas on how to diagnose?
Have you made sure you're running ngrok inside your project directory, also can you still access localhost:3746?
Also what command are you using to start hosting the ngrok sever?

Meteor ddp-client.js socksjs ERR_CONNECTION_REFUSED on local

The problem
I'm having an issue where when I start my local dev server with meteor, about 3/5 times the client's socksjs connection via ddp-client.js isn't able to connect and gets an ERR_CONNECTION_REFUSED error. All other connections work fine (websocket, JS, css, etc).
I'm seeing this in the console
The socks is attempting to connect to 192.168.1.14, which is my correct internal ip.
What I've tried
setting the port manually with meteor --port 3000
waiting for Meteor.status().status === 'connected' on the client before making any calls
If you'd like to recreate the problem yourself you can pull down the package I'm working on, ProseMeteor at commit 51c0a304338228102edc75427f72e689a7aafb8a and try running the app yourself by running the bash run_demo script, you should see the problem when you visit http://localhost:3000.
I appreciate any help!

GitLab not working w/ Nginx

I am trying to get GitLab setup with my current installation of Nginx but I keep getting an Error 502. I have included my configuration files, and not sure what I am doing wrong. But I followed the "Using a non-bundled web-server" steps on https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md
/etc/nginx/conf.d/gitlab-omnibus-nginx.conf
http://pastebin.com/bQ8eCiNh
/etc/gitlab/gitlab.rb
http://pastebin.com/Lw5tjwXy
HTTP 502 means "The server was acting as a gateway or proxy and received an invalid response from the upstream server." So there are two possibilities here.
Your Gitlab server is not actually working or is returning an invalid response. After starting the Gitlab server, use sudo netstat -plnt and make sure it is running on a port and note the port. Then connect directly to this port in your browser (or from the CLI on the server if necessary) and confirm that Gitlab is working fine without a proxy in front of it. If Gitlab is running on a socket and not a port, there are also tools to test HTTP servers through socket connections that you can use.
Nginx is not configured correctly to connect to Gitlab. In this case, check your Nginx error log to see if there is any more detail besides the "502" error.

Resources