Hi,
after updating to ghost 2.36.0 my blog URL just answers with a 502 bad gateway error.
The “normal” update process (I came from version 2.19.1) didn’t work. Regardless of how many times I updates ghost-CLI I got the “You are running an outdated version of Ghost-CLI” message every time I tried the ghost update
command. Plus, at the end of the update process, when it tries to restart Ghost I got Ghost Error occured.
and I reverted back to 2.19.1.
I updated and upgraded my Ubuntu 16.04, checked and updated my Node version (it’s 10.16.3) and tried a ghost update --force
which resulted in the current situation with the 502 bad gateway error.
Any hints/tips what I can try? Any more info you need?
btw: ghost doctor
says everything’s fine:
stefan@ubuntu-1gb-fra1-01:/var/www/ghost$ ghost doctor
✔ Checking system Node.js version
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking operating system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_makerweek-io
Instance is currently running
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
stefan@ubuntu-1gb-fra1-01:/var/www/ghost$
P.S.: Tried to ghost update --rollback
but that didn’t work either. It wanted to rollback to the same version, v 2.36.0. Restarting after the rollback failed:
stefan@ubuntu-1gb-fra1-01:/var/www/ghost$ ghost update --rollback
+ sudo systemctl is-active ghost_makerweek-io
? Sudo Password [hidden]
✔ Checking system Node.js version
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking for available migrations
✔ Checking for latest Ghost version
ℹ Downloading and updating Ghost [skipped]
+ sudo systemctl is-active ghost_makerweek-io
+ sudo systemctl stop ghost_makerweek-io
✔ Stopping Ghost
+ sudo /var/www/ghost/current/node_modules/.bin/knex-migrator-rollback --force --v 2.36.0 --mgpath /var/www/ghost/current
✔ Rolling back database migrations
✔ Linking latest Ghost and recording versions
+ sudo systemctl is-active ghost_makerweek-io
☱ Rolling back database migrations✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
+ sudo systemctl is-active ghost_makerweek-io
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
+ sudo systemctl start ghost_makerweek-io
☱ Restarting Ghost+ sudo systemctl stop ghost_makerweek-io
✖ Restarting Ghost
A GhostError occurred.
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_makerweek-io -n 50
Debug Information:
OS: Ubuntu, v16.04
Node Version: v10.16.3
Ghost-CLI Version: 1.11.0
Environment: production
Command: 'ghost update --rollback'
Additional log info available in: /home/stefan/.ghost/logs/ghost-cli-debug-2019-10-13T17_17_46_201Z.log
Try running ghost doctor to check your system for known issues.
The output of ghost doctor
is the same as above in the original post.
The log file contains:
Debug Information:
OS: Ubuntu, v16.04
Node Version: v10.16.3
Ghost-CLI Version: 1.11.0
Environment: production
Command: 'ghost update --rollback'
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_makerweek-io -n 50
Stack: Error: Could not communicate with Ghost
at Server.server.close (/usr/local/lib/node_modules/ghost-cli/lib/utils/port-polling.js:56:20)
at Object.onceWrapper (events.js:286:20)
at Server.emit (events.js:198:13)
at emitCloseNT (net.js:1618:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
The suggested journalctl
command gives this:
stefan@ubuntu-1gb-fra1-01:/var/www/ghost$ journalctl -u ghost_makerweek-io -n 50
Hint: You are currently not seeing messages from other users and the system.
Users in the 'systemd-journal' group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.
stefan@ubuntu-1gb-fra1-01:/var/www/ghost$
Really? No one any idea? Would like to bring my blog back online … but when even the rollback fails …
Guess that was the last attempt with ghost. Going back to Wordpress.
I do have a backup, though. Maybe I should create a brand new instance / new installation und restore the content?
I know this is old, but I just had a similar issue when trying to update. It said that I needed a new version of node so I updated it using N and then ran ghost update which got me the Bad Gateway 502 error. Ghost doctor showed no issues.
ghost run worked, but ghost start didn’t.
Turns out I had to update node using a repository.
I followed these instructions to update node:
Then I ran ghost update again and all is working fine.
I think it would be helpful if the ghost-cli would remind us not to use n or nvm when giving the node out-of-date error since these are generally the easiest way to update node.
My understanding is that it has something to do with the location that n and nvm install node.