Hi guys,

I just upgraded Ghost and got a 502 Bad Gateway error. I’ve checked my error.log and the error seems to be:

connect() failed (111: Connection refused) while connecting to upstream

Any help would be greatly appreciated!

Thanks

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.

×
3 answers

I had this problem too after doing the usual npm install --production and service ghost restart

rm rf node_modules
npm cache clean
npm install --production --unsafe-perm
npm install knex
chown -R ghost:ghost *
npm start --production

At this stage I got an error saying something about not finding SQLite3. So install SQLite3 module npm install sqlite3 --build-from-source

If it didn’t build, make sure all the dependencies are installed

sudo npm install -g node-gyp
sudo apt-get install build-essential
sudo apt-get install python-software-properties python g++ make 
npm install sqlite3 --build-from-source

Finally restart ghost npm start --production

After doing the update did you attempt a service ghost restart and did this command result in any output?

The above reply by @albertlimca fixes the issue in my droplet for Ghost 0.9.0.

Thanks!

Submit an Answer