Ghost won't start after upgrading to v4.0.1

Hi

I just upgraded from v3.42.2 to v4.0.1 and now ghost won’t start
System: CentOS 7
Node: v14.16.0

$ ghost -v
Ghost-CLI version: 1.16.2
Ghost version: 4.0.1

When I run ghost start everything seems fine, running ghost ls shows my blog as running on correct port. All looks fine. Last message for ghost log is INFO Ghost booted in 2.476s.
As soon as I access my blog in the browser, I see a 500 error message. Checking ghost log shows

[2021-03-16 21:19:40] INFO Ghost booted in 2.476s
[2021-03-16 21:19:41] WARN Ghost is shutting down
[2021-03-16 21:19:41] WARN Ghost has shut down
[2021-03-16 21:19:41] WARN Your site is now offline
[2021-03-16 21:19:41] WARN Ghost was running for a few seconds
[2021-03-16 21:19:41] WARN Ghost is shutting down
[2021-03-16 21:19:41] WARN Ghost has shut down
[2021-03-16 21:19:41] WARN Your site is now offline
[2021-03-16 21:19:41] WARN Ghost was running for a few seconds

nginx error log shows

2021/03/16 21:21:01 [error] 22604#0: *1354743 connect() failed (111: Connection refused) while connecting to upstream, client: 111.222.333.444, server: example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:2368/favicon.ico", host: "example.com", referrer: "https://example.com/"

The weirdest part is when I run ghost run everything is fine and I can access and navigate the site just fine.
Why ghost run works but ghost start fails?

Edit
I’ve noticed that somehow I have two versions of node. I use n control versions.

$ sudo node -v
v6.17.1
$ node -v
v14.16.0

Running sudo ln -sfn /usr/local/bin/node /bin/node made them the same, but didn’t fix my problem.

1 Like

If it helps anyone, I resolved my issue by completely uninstalling my failed installation and installing a fresh version 4.0.1 Fresh install failed to run automatically, but after manually running sudo systemctl start ghost_your-blog-com everything started up just fine.

If I had another chance, I’d try to just execute above command before uninstalling.

Maybe you can see this, we track the problem in there: Upgrade to Ghost v4, but a lot of 503 error