Updated to 2.31.0 (from 1.x) - 502 server errors - Ghost crashing, I believe

Hi All,

Since updating to 2.31.0 from (I think) 1.26, the admin UI is giving 502 errors when I try to browse posts, pages or upload images (e.g. a publication cover image).

  • What’s your URL? This is the easiest way for others to debug your issue

https://bytes.fyi - but currently set to Private, as no images are loading properly.

  • What version of Ghost are you using?

v2.31.0

  • What configuration?

Linux (Raspbian/Debian), Raspberry Pi 2 - it’s been working fine for many years with v1.x (and experimenting with 2.x under a test domain).
Nginx reverse proxy for TLS with LetsEncrypt (hand-built though, as my original Ghost was v0.x and ghost-cli wasn’t a thing back then…)

  • What browser?

Chrome

  • What errors or information do you see in the console?

Running ghost log, it looks as if ghost is restarting when I’m shown a 502 error in the GUI:

[2019-09-11 09:15:50] INFO "GET /ghost/api/canary/admin/settings/?type=blog%2Ctheme%2Cprivate%2Cmembers" 200 232ms
[2019-09-11 09:15:50] INFO "GET /ghost/api/canary/admin/notifications/" 200 266ms
[2019-09-11 09:15:50] WARN Cookie ghost-members-ssr not found
[2019-09-11 09:15:50] INFO "POST /private/?r=%2F" 302 91ms
[2019-09-11 09:15:50] WARN Cookie ghost-members-ssr not found
[2019-09-11 09:15:51] INFO "GET /public/ghost-sdk.min.js?v=1e9f66929a" 200 26ms
[2019-09-11 09:16:14] INFO Ghost is running in production...
[2019-09-11 09:16:14] INFO Your site is now available on https://bytes.fyi/
[2019-09-11 09:16:14] INFO Ctrl+C to shut down
[2019-09-11 09:16:14] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 09:16:14] WARN Tries: 0
[2019-09-11 09:16:14] WARN Retrying...
[2019-09-11 09:16:14] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 09:16:14] WARN Tries: 1
[2019-09-11 09:16:14] WARN Retrying...
[2019-09-11 09:16:14] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 09:16:14] WARN Tries: 2
[2019-09-11 09:16:14] WARN Retrying...
[2019-09-11 09:16:15] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 09:16:15] INFO Ghost boot 14.882s
  • What steps could someone else take to reproduce the issue you’re having?

Doing practically anything in the ghost admin UI.

It seems that my ‘private’ setting was not saved, as the site is now available - albeit the images trigger 502 errors when attempting to load them.

Simply attempting to load the site at https://bytes.fyi seems to trigger ghost to restart. :frowning:

Which ghost-cli version you are using?

Ghost-CLI version: 1.11.0
Ghost version: 2.31.0 (at /var/www/ghost)

Out of curiosity, I tried using ghost stop then ghost run, and then refreshed the page for my blog a couple of times, to trigger the problem. This is the output:

pi@pi4:/var/www/ghost $ ghost run
The `ghost run` command is used by the configured Ghost process manager and for debugging. If you're not running this to debug something, you should run `ghost start` instead.
+ sudo node current/index.js
[2019-09-11 10:47:37] INFO Ghost is running in production...
[2019-09-11 10:47:37] INFO Your site is now available on https://bytes.fyi/
[2019-09-11 10:47:37] INFO Ctrl+C to shut down
[2019-09-11 10:47:37] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 10:47:37] WARN Tries: 0
[2019-09-11 10:47:37] WARN Retrying...
[2019-09-11 10:47:37] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 10:47:37] WARN Tries: 1
[2019-09-11 10:47:37] WARN Retrying...
[2019-09-11 10:47:37] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 10:47:37] WARN Tries: 2
[2019-09-11 10:47:37] WARN Retrying...
[2019-09-11 10:47:37] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-09-11 10:47:37] INFO Ghost boot 14.962s
[2019-09-11 10:47:38] WARN Cookie ghost-members-ssr not found
[2019-09-11 10:47:40] INFO "GET /favicon.ico" 200 23ms
[2019-09-11 10:47:40] INFO "GET /" 200 2513ms
[2019-09-11 10:47:40] WARN Cookie ghost-members-ssr not found
[2019-09-11 10:47:40] INFO "GET /assets/built/screen.css?v=ffa1e10f60" 200 36ms
[2019-09-11 10:47:40] INFO "GET /public/ghost-sdk.min.js?v=ffa1e10f60" 200 49ms
[2019-09-11 10:47:40] WARN Cookie ghost-members-ssr not found
[2019-09-11 10:47:40] WARN Cookie ghost-members-ssr not found
[2019-09-11 10:47:40] INFO "GET /assets/built/jquery.fitvids.js?v=ffa1e10f60" 200 35ms
[2019-09-11 10:47:40] INFO "GET /assets/built/infinitescroll.js?v=ffa1e10f60" 200 25ms
[2019-09-11 10:47:40] WARN Cookie ghost-members-ssr not found
[2019-09-11 10:47:40] INFO "GET /assets/built/prism.js?v=ffa1e10f60" 200 21ms
[2019-09-11 10:47:41] INFO "GET /favicon.ico" 200 5ms
[2019-09-11 10:47:43] WARN Cookie ghost-members-ssr not found
[2019-09-11 10:47:44] INFO "GET /" 200 467ms

Something went wrong installing the "sharp" module

/lib/arm-linux-gnueabihf/libz.so.1: version `ZLIB_1.2.9' not found (required by /var/www/ghost/versions/2.31.0/node_modules/sharp/build/Release/../../vendor/lib/libpng16.so.16)

- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues

I think I’ve managed to fix this, by updating from nodejs 8.x to nodejs 10.x, then running ghost update --force in the /var/www/ghost folder.