ghost doctor told me my version of node was out of date. I installed and used
n to update to version 18.x per this page in docs.
After upgrading node, I got the following error:
1) GhostError Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306 Help: Unknown database error
I followed the steps in this guide with no success.
I created a new Linode server following these guides. When I got to
ghost install I had another issue with mysql during setup where it failed to create a new mysql user (see last line) and then would have the same error as above:
? Enter your MySQL hostname: localhost ? Enter your MySQL username: root ? Enter your MySQL password: [hidden] ? Enter your Ghost database name: larkinministries_prod ✔ Configuring Ghost ✔ Setting up instance + sudo chown -R ghost:ghost /var/www/larkinministries/content ✔ Setting up "ghost" system user ? Do you wish to set up "ghost" mysql user? Yes ✖ Setting up "ghost" mysql user
I tried the recommendations from these posts
No success. Then I installed
n on this new server and changed node version from 18.x to 16.x and after this, everything worked and the site is up on the new server. So it seems the issue was caused by the node version even though Ghost documentation says v18.x is supported and actually recommended. All I know is v18 did not work and v16 does.
So then I want to switch the original server to node v16 from v18 since that was the fix I found on the new test server. On the old server, using
n to downgrade node from 18.x to 16.x results in the following
ghost doctor output:
✔ Checking system Node.js version - found v16.20.2 ✔ 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_www-sitename-com Instance is currently running ℹ Validating config [skipped] ✔ 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.1. Your current node version is v16.20.2. ✔ Checking systemd node version - found v18.17.1
system Node.js version - found v16.20.2 but
Warning: Ghost is running with node v18.17.1. Your current node version is v16.20.2.
I tried using n to uninstall all other versions of node, tried updating ghost-cli, and updating ghost itself
How can I get Ghost to run under node version 16.20.2 (installed) and not 18.17.1 (which I uninstalled and which was not working)?
ghost start just hangs indefinitely. Hitting ctrl-c to stop it results in the ghost process running but with a 502 error if you try to access the site. Ghost restart also just hangs indefinitely. (I left it for 15m and it was still trying)
Debug Information: OS: Ubuntu, v20.04.6 LTS Node Version: v16.20.2 Ghost Version: 5.59.3 Ghost-CLI Version: 1.24.2 Environment: production Command: 'ghost start'