Question

ngrok 502 bad getaway

Posted July 4, 2021 55 views
Arch Linux

Hello, after I set up the connection of ngrok, when I check whether it is successful through the curl command, it shows 502 bad getaway, which shows that the tunnel is connected, but the web service is not started. How can I solve it, please give me Detailed steps, thank you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi there,

When running the ngrok command you would need to specify the same port that you’ve used for your backend application. For example, if you are running a Node.js application on port 3000, then you would have to run ngrok http 3000.

You would get a 502 error in case that the ports do not match or in case that your backend application is not running at all.

Can you share the exact ngrok command that you are running and the output that you get when you run the command?

Regards,
Bobby