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

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?

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

Guzzlehttp client connection refused over non standard port

I'm running a few containers using docker-compose.
One of the services I added recently is exposed on port 3000
Any request made to this service using guzzle throws the following error:
cURL error 7: Failed to connect to service-stub port 3000: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
It works if I change the port to 5000, however I have another service using that port hence need to run the new service on a different port.
Anyone know how to get around this issue?

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?

'Invalid hostname' response from http.sys

We have web service running hosted on an OwinHttpListener (http.sys behind the scenes). Whenever we send requests to the app on the IP address, it responds with 'Invalid hostname'.
After much trawling of stack overflow and google, im not really any closer to a solution. The requests are getting through to http.sys, as i can see them in the HTTP error log. I can log onto the server in question and access the service locally (using localhost or 127.0.0.1) and i can use the server name to successfully get through, the only failure condition is using the servers IP address.
Ive tried the following:
Ensure the app is listening on all interfaces (http://+:8080)
Ensure IIS is not trying to use the port (it isnt)
Ensure windows firewall is configured to allow traffic on that port (it is)

Published asp.net website not accessible in other system in same network

I have developed a asp.net website and published in a server.Whereas everything works perfectly in that server if i give browser from that IIS manager, and in server ( published system ) everything works perfect.But i need to access the same published application also in the other systems also ( which are connected in same network ). How is it possible..??
NOTE:
1. Used IIS 7.
When tried to connect from another system from same networ getting error as follows
The socket connection to 172.31.7.243 failed.
ErrorCode: 10060.A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 172.31.7.243:90
If Your are accessing Your application on Hosted Server like this then just replace
localhost with ipaddress of hosted server to access it over the network
[localhost]/MyProjectName
then like this:
[IPaddress_of_HostedServer]/MyProjectName
It is possible that the HTTP traffic on port 80 incoming from the local network is blocked.
You should check if ISA server is installed on your server and if so if HTTP traffic on port 80 is allowed or not. If it's blocked try to allow it for the local network ip range.
Edit: Or port 90 as your error code states, but why are you working on port 90?

Resources