Tried to update Ghost and everything is broken :(

You still have a bad gateway. Bounce the server to bring everything up, and then check that the service and ghost is running:

systemctl status ghost_jvlobo-com.service
ghost ls
1 Like

I restarted the server, and right after restarting ran those two commands:

Still bad gateway :/

Okay, Ghost appears to be running now, so let’s have a look at Nginx.

Can you share /etc/nginx/sites-available/<site-name>.conf?

1 Like

This is what I have:

And the https one looks basically the same

Okay, as I suspected, Ghost has incremented the port. So, edit the Nginx conf and change the last proxy_pass line to 2369.

Then run …

sudo nginx -t
sudo systemctl reload nginx.service`
1 Like

I see… true.

I changed it on both files:

Reloaded Nginx and nothing. I also restarted the server just in case, but still same error :thinking:
Could there be anywhere else where the port is wrong?

Let’s try sudo systemctl restart nginx.service. It shouldn’t make a difference, but then again …

Then, let’s run ghost doctor to check folder permissions.

1 Like

Now this is blowing my mind :sweat_smile:

ghost doctor says I should have node 10 or 12?
I don’t understand:

And also the OS compatibility, I didn’t see that issue before.

You’re not on the latest version of ghost-cli.

sudo npm install ghost-cli@latest -g
1 Like

Furthermore, output from ls -Flai /var/www/ghost.

1 Like

Ok, now I got the proper version.
Here you can see the commands I ran:

Now, if I run ghost start, it seems like it got stuck on the Starting Ghost part:

It has been there for a while (~5min).
I tried to start it with ghost run and that still works as it did before.

I see the error in the logs:

May 16 16:47:39 blog node[28633]: node:internal/modules/cjs/loader:1143
May 16 16:47:39 blog node[28633]:   throw err;
May 16 16:47:39 blog node[28633]:   ^
May 16 16:47:39 blog node[28633]: Error: Cannot find module '/usr/bin/ghost'
May 16 16:47:39 blog node[28633]:     at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
May 16 16:47:39 blog node[28633]:     at Module._load (node:internal/modules/cjs/loader:981:27)
May 16 16:47:39 blog node[28633]:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
May 16 16:47:39 blog node[28633]:     at node:internal/main/run_main_module:28:49 {
May 16 16:47:39 blog node[28633]:   code: 'MODULE_NOT_FOUND',
May 16 16:47:39 blog node[28633]:   requireStack: []
May 16 16:47:39 blog node[28633]: }
May 16 16:47:39 blog node[28633]: Node.js v18.20.2

If I do which ghost, it seems like it got installed on /usr/local/bin/ghost
I just changed it on system/files/ghost_jvlobo-com.service so it runs with /usr/local/bin/ghost and trying again.

IT WORKS!! finally :clap:t4::clap:t4:
Thanks a lot for all your patience and help!! 10/10 man, thanks a lot :slight_smile:
Now I have to fix my theme and everything should be back to normal

I don’t know which answer I should accept as we have been going back and forward some much :sweat_smile:

1 Like

You are welcome! I’m pleased it’s working for you … you’re lucky, I’m recuperating from surgery and can’t do much else.

Tenha uma boa noite.

2 Likes

Get well!! :slight_smile:

And thanks again, obrigado!

1 Like