Ghost unusable after update

Heyo, I tried updating ghost but now I won’t even start anymore. I use the Digital Ocean droplet and self-host ghost on there.
I spend the whole day trying to get it running again and am a bit exhausted now, I just want to get my blog posts saved and I can’t do that when it won’t even start.

I got several different errors throughout the day but now I am stuck after trying to downgrade to just be able to save my texts.
When I do “ghost start” I get this error:

✔ Checking system Node.js version - found v14.17.0
✔ 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_bryanhogan-me
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking systemd unit file
Warning: Ghost is running with node v18.17.0.
Your current node version is v14.17.0.
✔ Checking systemd node version - found v18.17.0
+ sudo systemctl start ghost_bryanhogan-me
+ sudo systemctl stop ghost_bryanhogan-me
✖ Starting Ghost: bryanhogan-me
A GhostError occurred.

Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_bryanhogan-me -n 50

Debug Information:
    OS: Ubuntu, v20.04.5 LTS
    Node Version: v14.17.0
    Ghost Version: 4.48.9
    Ghost-CLI Version: 1.24.2
    Environment: production
    Command: 'ghost start'

Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2023-08-06T08_54_39_515Z.log

Try running ghost doctor to check your system for known issues.

Running “ghost doctor” gives me this:

✔ Checking system Node.js version - found v14.17.0
✔ 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 system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_bryanhogan-me
+ sudo systemctl reset-failed ghost_bryanhogan-me
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
Warning: Ghost is running with node v18.17.0.
Your current node version is v14.17.0.
✔ Checking systemd node version - found v18.17.0

I tried downgrading my ghost version and then my node version to get it running but it seems impossible to change the systemd node version?

Running “sudo journalctl -u ghost_bryanhogan-me -n 50” gives me this:

ghost-mgr@bryan-hogan-ghost:/var/www/ghost$ sudo journalctl -u ghost_bryanhogan-me -n 50
-- Logs begin at Tue 2023-02-28 07:33:37 UTC, end at Sun 2023-08-06 09:03:10 UTC. --
Aug 06 08:49:42 bryan-hogan-ghost node[10967]:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Aug 06 08:49:42 bryan-hogan-ghost node[10967]:     at node:internal/main/run_main_module:23:47 {
Aug 06 08:49:42 bryan-hogan-ghost node[10967]:   code: 'MODULE_NOT_FOUND',
Aug 06 08:49:42 bryan-hogan-ghost node[10967]:   requireStack: []
Aug 06 08:49:42 bryan-hogan-ghost node[10967]: }
Aug 06 08:49:42 bryan-hogan-ghost node[10967]: Node.js v18.17.0
Aug 06 08:49:42 bryan-hogan-ghost systemd[1]: ghost_bryanhogan-me.service: Succeeded.
Aug 06 08:49:42 bryan-hogan-ghost systemd[1]: ghost_bryanhogan-me.service: Scheduled restart job, restart counter is at 3.
Aug 06 08:49:42 bryan-hogan-ghost systemd[1]: Stopped Ghost systemd service for blog: bryanhogan-me.
Aug 06 08:49:42 bryan-hogan-ghost systemd[1]: Started Ghost systemd service for blog: bryanhogan-me.
Aug 06 08:49:43 bryan-hogan-ghost node[11003]: Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
Aug 06 08:49:43 bryan-hogan-ghost node[11003]: https://careers.ghost.org
Aug 06 08:49:43 bryan-hogan-ghost node[11003]: - Inspecting operating system
Aug 06 08:49:43 bryan-hogan-ghost node[11003]: node:internal/modules/cjs/loader:1080
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:   throw err;
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:   ^
Aug 06 08:49:43 bryan-hogan-ghost node[11003]: Error: Cannot find module '/var/www/ghost/current/index.js'
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:     at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:     at Module._load (node:internal/modules/cjs/loader:922:27)
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:     at node:internal/main/run_main_module:23:47 {
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:   code: 'MODULE_NOT_FOUND',
Aug 06 08:49:43 bryan-hogan-ghost node[11003]:   requireStack: []
Aug 06 08:49:43 bryan-hogan-ghost node[11003]: }
Aug 06 08:49:43 bryan-hogan-ghost node[11003]: Node.js v18.17.0
Aug 06 08:49:43 bryan-hogan-ghost systemd[1]: ghost_bryanhogan-me.service: Succeeded.
Aug 06 08:49:43 bryan-hogan-ghost systemd[1]: ghost_bryanhogan-me.service: Scheduled restart job, restart counter is at 4.
Aug 06 08:49:43 bryan-hogan-ghost systemd[1]: Stopped Ghost systemd service for blog: bryanhogan-me.
Aug 06 08:49:43 bryan-hogan-ghost systemd[1]: Started Ghost systemd service for blog: bryanhogan-me.
Aug 06 08:49:44 bryan-hogan-ghost node[11039]: Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
Aug 06 08:49:44 bryan-hogan-ghost node[11039]: https://careers.ghost.org
Aug 06 08:49:44 bryan-hogan-ghost node[11039]: - Inspecting operating system
Aug 06 08:49:44 bryan-hogan-ghost node[11039]: node:internal/modules/cjs/loader:1080
Aug 06 08:49:44 bryan-hogan-ghost node[11039]:   throw err;
Aug 06 08:49:44 bryan-hogan-ghost node[11039]:   ^
Aug 06 08:49:44 bryan-hogan-ghost node[11039]: Error: Cannot find module '/var/www/ghost/current/index.js'
Aug 06 08:49:44 bryan-hogan-ghost node[11039]:     at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
Aug 06 08:49:44 bryan-hogan-ghost node[11039]:     at Module._load (node:internal/modules/cjs/loader:922:27)
Aug 06 08:49:44 bryan-hogan-ghost node[11039]:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
lines 1-40

I tried having everything up to date now, it is a database error maybe?

ghost-mgr@bryan-hogan-ghost:/var/www/ghost$ ghost start

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org


+ sudo systemctl is-active ghost_bryanhogan-me
+ sudo systemctl reset-failed ghost_bryanhogan-me
✔ Checking system Node.js version - found v18.17.0
✔ 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_bryanhogan-me
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.17.0
+ sudo systemctl start ghost_bryanhogan-me
+ sudo systemctl stop ghost_bryanhogan-me
✖ Starting Ghost: bryanhogan-me
A GhostError occurred.

Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_bryanhogan-me -n 50

Debug Information:
    OS: Ubuntu, v20.04.5 LTS
    Node Version: v18.17.0
    Ghost Version: 5.58.0
    Ghost-CLI Version: 1.24.2
    Environment: production
    Command: 'ghost start'

Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2023-08-06T11_16_11_996Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.

Running “sudo journalctl -u ghost_bryanhogan-me -n 50” gives me this:

-- Logs begin at Tue 2023-02-28 07:33:37 UTC, end at Sun 2023-08-06 11:18:08 UTC. --
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] INFO Your site is now available on https://bryanhogan.me/
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] INFO Ctrl+C to shut down
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] INFO Ghost server started in 1.268s
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] INFO Bootstrap client was closed.
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] ERROR connect ECONNREFUSED ::1:3306
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: 
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: connect ECONNREFUSED ::1:3306
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: "Unknown database error"
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: Error ID:
Aug 06 11:16:10 bryan-hogan-ghost node[18603]:     500
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: Error Code: 
Aug 06 11:16:10 bryan-hogan-ghost node[18603]:     ECONNREFUSED
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: ----------------------------------------
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: Error: connect ECONNREFUSED ::1:3306
Aug 06 11:16:10 bryan-hogan-ghost node[18603]:     at /var/www/ghost/versions/5.58.0/node_modules/knex-migrator/lib/database.js:57:19
Aug 06 11:16:10 bryan-hogan-ghost node[18603]:     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: 
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] WARN Ghost is shutting down
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] WARN Ghost has shut down
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] WARN Your site is now offline
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] WARN Ghost was running for a few seconds
Aug 06 11:16:10 bryan-hogan-ghost node[18603]: [2023-08-06 11:16:10] INFO Bootstrap client was closed.
Aug 06 11:16:10 bryan-hogan-ghost systemd[1]: Stopping Ghost systemd service for blog: bryanhogan-me...
Aug 06 11:16:11 bryan-hogan-ghost node[18565]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:46
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:         throw error;
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:         ^
Aug 06 11:16:11 bryan-hogan-ghost node[18565]: {
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:   message: {
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     statusCode: 500,
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     errorType: 'DatabaseError',
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     level: 'critical',
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     message: 'Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306',
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     id: 500,
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     help: 'Unknown database error',
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     name: 'DatabaseError',
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     code: 'ECONNREFUSED',
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     property: null,
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     redirect: null,
Aug 06 11:16:11 bryan-hogan-ghost node[18565]:     hideStack: false,

Are you sure MySQL is running and accepting connections?

No I am not, how do I check that?

Running “sudo service mysql start” tells me nothing, atleast there is no response in the console.

Running “mysql” gives me this:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I don’t know what this means and don’t really have knowledge on databases such as mysql.

For additional debugging, here’s the Ghost database troubleshooting page: Resolving a misconfigured MySQL database with Ghost - Ghost Developers

Root is unlikely to be your database user. You can see what database user Ghost is using by inspecting your config.<production?>.json file. So please try running ‘mysql’ again, as the correct user, and let’s see what it says.

Yea I got the commands I used form that page, otherwise it wasn’t really useful to me.
I think I logged into the mysql database but I can’t use any of the commands from that webpage and don’t really know what to do there.

Using “status;” I get this:

mysql  Ver 8.0.33-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))

Connection id:          16
Current database:       ghost_production
Current user:           ghost-505@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         8.0.33-0ubuntu0.20.04.2 (Ubuntu)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    utf8mb4
Conn.  characterset:    utf8mb4
UNIX socket:            /var/run/mysqld/mysqld.sock
Binary data as:         Hexadecimal
Uptime:                 5 hours 15 min 27 sec

Threads: 2  Questions: 81  Slow queries: 0  Opens: 199  Flush tables: 3  Open tables: 118  Queries per second avg: 0.004