Ghost 503 error after update to v4

As @Hannah said, here is my thread about problems after updating ghost to v4

I checked node version v12.10.0

this is my ghost_opcije-com.service file

[Unit]
Description=Ghost systemd service for blog: opcije-com
Documentation=https://ghost.org/docs/

[Service]
Type=simple
WorkingDirectory=/var/www/ghost
User=999
Environment="NODE_ENV=production"
ExecStart=/usr/bin/node /usr/bin/ghost run
Restart=always

[Install]
WantedBy=multi-user.target

What I tried so far,
tried to force update - doesnt work
tried to rollback - doesn’t work because of database problem while transfering from v4 to v3. (I do not have greate programing skills)
right now I am running ghost with ghost run command

EDIT:
I updated using ghost update command

thank you for any help, for any questions I will try to answear as fast as posible, please note my coding skills are limited so don’t expect any magic from me XD

My solution is there, Upgrade to Ghost v4, but a lot of 503 error - #31 by halfrost

Hi, I saw your post,
can you tell me how did you did these 3 steps…

  1. uninstall nvm
  2. reinstall node & npm
  3. reinstall Ghost-CLI

Thanks a lot, I am glad that you succeed

  1. uninstall nvm
rm -rf $NVM_DIR ~/.npm ~/.bower
unset NVM_DIR;
which node;
rm -rf {path_to_node_version}
  1. reinstall node
$ wget https://nodejs.org/download/release/latest-v12.x/node-v12.21.0-linux-x64.tar.gz
$ sudo tar --strip-components 1 -xzvf node-v* -C /usr/local
  1. reinstall Ghost-CLI
npm install -g ghost-cli@latest
1 Like

Hmmmm, I tried as you have written, but, I still have the same problem :confused:
thanks for trying to help

Hi @mitkomitrovski, it looks like you might have a slightly different problem, but anyway please can you type the following commands exactly and then share the output - a screenshot showing the commands and output would be great:

  • which node
  • node --version
  • /usr/bin/node --version

Can you also share your ghost logs?

They will be located in /var/www/ghost/content/logs

1 Like

No problem at all, here are screenshots of commands,

Screenshot from 2021-03-18 12-39-54

I have two files in ghost, .log is empty and error.log have a lot of text

{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_WORKER_INIT_FAILED","message$
{"name":"Log","hostname":"dionice","pid":7024,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_SERVER_NOT_RUNNING","message$
{"name":"Log","hostname":"dionice","pid":4707,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_SERVER_NOT_RUNNING","message$
{"name":"Log","hostname":"dionice","pid":4971,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_SERVER_NOT_RUNNING","message$
{"name":"Log","hostname":"dionice","pid":6195,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_SERVER_NOT_RUNNING","message$
{"name":"Log","hostname":"dionice","pid":18995,"level":50,"req":{"meta":{"requestId":"7b8f0961-bf0e-44cd-9d82-612c4af47c2d","userId":n$
{"name":"Log","hostname":"dionice","pid":18995,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_SERVER_NOT_RUNNING","messag$
{"name":"Log","hostname":"dionice","pid":19329,"level":50,"req":{"meta":{"requestId":"5eb43dc3-ce85-4dcd-b4f3-bc4d83d228fb","userId":n$
{"name":"Log","hostname":"dionice","pid":20277,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_SERVER_NOT_RUNNING","messag$
{"name":"Log","hostname":"dionice","pid":20410,"level":50,"req":{"meta":{"requestId":"89fcf7cd-b5b7-4fa7-ba0f-0b3868399fbf","userId":n$
{"name":"Log","hostname":"dionice","pid":20678,"level":50,"req":{"meta":{"requestId":"3ec36921-742e-4258-829f-561fb41f576f","userId":n$
{"name":"Log","hostname":"dionice","pid":21402,"level":50,"req":{"meta":{"requestId":"375d1f19-be45-4caf-ac2b-a370e5cdb7c5","userId":n$
{"name":"Log","hostname":"dionice","pid":25007,"level":50,"req":{"meta":{"requestId":"b28b1b4f-333c-4885-b90c-1d9c28a7e1d7","userId":"$
{"name":"Log","hostname":"dionice","pid":25007,"level":50,"req":{"meta":{"requestId":"04d5b4ed-0f70-40c7-a960-b244abf31203","userId":"$
{"name":"Log","hostname":"dionice","pid":6458,"level":50,"err":{"domain":"https://opcije.com","code":"ERR_SERVER_NOT_RUNNING","message$
{"name":"Log","hostname":"dionice","pid":17190,"level":50,"err":{"id":"f66352a0-87ca-11eb-a09d-e7131daa6ec8","domain":"https://opcije.$
{"name":"Log","hostname":"dionice","pid":20572,"level":50,"req":{"meta":{"requestId":"2f936ac9-88b3-463e-8798-97bff40d16b5","userId":n$
{"name":"Log","hostname":"dionice","pid":32166,"level":50,"err":{"id":"070cf790-87db-11eb-8be6-fbb058d812f0","domain":"https://opcije.$

Hi @mitkomitrovski,

The commands have shown us the answer. You have node installed twice:

/usr/bin/local/node → v12.21.0
/usr/bin/node → v14.5.0

I have no way to tell why this happened without knowing the history of how node has been installed and used on the server. However the problem is that when you updated node prior to updating Ghost, you have ended up only updating one node install and now Ghost is getting different node versions.

To solve this, you need to either uninstall one version or get them both to be the same.

I deleted, both versions installed again and now I cannot start ghost, it is looping when pressed command ghost start. Ghost run is working good.

root@dionice:~# which node
/usr/local/bin/node
root@dionice:~# node --version
v12.21.0
root@dionice:~# /usr/bin/node --version
-bash: /usr/bin/node: No such file or directory

Basically I fixed it by installing node to /usr/bin/node and not to local

thank you @Hannah for help :smiley: