Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How do I troubleshoot a 502 error with nginx / node?
I have an ubuntu server that I use for development. It was working perfectly fine until I got an email from DO saying “We’ve had to reboot your Droplet as a result of an issue with the physical node that hosts your Droplet.” and then that they were performing an emergency droplet migration.
Since then I can’t access my site. Before it would start up when rebooting just fine, but now I get a 502 every time. MongoDB should start on startup, and node gets run with PM2. I can see the output from node and it starts just fine like it normally would, but when making a request, it returns 502 and doesn’t seem to reach node at all.
I don’t know a lot about servers, and had to pay someone to setup nginx and the certificates for me, but none of that configuration should have changed since it was working. I in fact hadn’t even made any code changes since before the droplet failure.
Any advice would be appreciated.
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.×