"502 bad gateway" Nginx Error

I installed discourse by following instructions on: http://blog.discourse.org/2014/04/install-discourse-in-under-30-minutes/

It ran absolutely fine for a few months and during this time I also updated the installation a couple of times.

A couple of weeks ago I tried to update it again, but there was some error in the middle of the update but still the site was working fine (to my knowledge).

However, then suddenly the site started giving “502 bad gateway” error. It is running on 1GB VPS on linode.

I have no experience with nginx and rails. Can you please let me know how can I fix this?

The site is: http://www.attractdreamlife.com/

Thanks in advance. (I am willing to share root details of the server in private with an expert who can help me out.)

Anything in the nginx logs? Assuming Discourse is supposed to run on your primary domain, have you tried ssh’ing into the server and running the following?

cd /var/discourse
git pull
sudo ./launcher rebuild
3 Likes

Try rebuilding, which should reset the borked update and update you to latest.

SSH into your server, and run:

cd /var/discourse
sudo ./launcher rebuild app

This should take a few minutes and get you up and running again.

Edit: Ninja’ed by @jomaxro :slight_smile:

3 Likes

Thanks a lot guys for the quick help. It is working now! yay!

3 Likes