Hello all,
My Ghost instance appears to be completely broken, and I would be extremely grateful if anyone could help me with this issue.
Below is my path of encountering errors, any suggested troubleshooting steps I took, and all of the log information. I have since updated the CLI (I didnβt notice the alert at first), but the errors remain the same.
Thank you for any time and consideration!
Best,
Joseph
Site: josephjwilk.com
Running from a DigitalOcean Ghost droplet
Debug Information (from command inline):
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.36.3
Ghost-CLI Version: 1.17.3
Environment: production
Command: βghost update --no-mem-checkβ
While in the middle of updating Ghost from terminal, I encountered an internet outage. I then attempted to update again once reconnected and got the following error.
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run `npm install -g ghost-cli@latest` to upgrade.
+ sudo systemctl is-active ghost_josephjwilk-com
β Checking system Node.js version - found v14.19.0
β Ensuring user is not logged in as ghost user
β Checking if logged in user is directory owner
β Checking current folder permissions
β Checking folder permissions
β Checking file permissions
β Checking content folder ownership
β Checking free space
β Checking for available migrations
β Checking for latest Ghost version
# 4.38.0
* β¨ Added "Created", "Paid start date", and "Next billing date" date-based filters to members list screen (TryGhost/Admin#2290) - Kevin Ansfield
* β¨ Added >, <, >=, and <= operators to match helper (#14215) - Simon Backx
* π¨ Updated Casper to v4.7.3 - Daniel Lockyer
* π¨ Updated Member page layout (TryGhost/Admin#2271) - Sanne de Vries
* π Removed empty benefits before saving (TryGhost/Admin#2284) - Simon Backx
* π Fixed sending non-integer prices to tiers api (TryGhost/Admin#2288) - Rishabh Garg
* π Fixed members table showing dates in UTC rather than site timezone - Kevin Ansfield
* π Fixed incorrect {{access}} property when using get/next-post/prev-post helpers (#14256) - Simon Backx
* π Fixed missing index page from pages sitemaps - Naz
---
View the changelogs for full details:
* Ghost - https://github.com/tryghost/ghost/compare/v4.37.0...v4.38.0
* Admin - https://github.com/tryghost/admin/compare/v4.37.0...v4.38.0
β Fetched release notes
Version already installed.
βΉ Downloading and updating Ghost [skipped]
+ sudo systemctl stop ghost_josephjwilk-com
β Stopping Ghost
β Linking latest Ghost and recording versions
+ sudo systemctl start ghost_josephjwilk-com
+ sudo systemctl stop ghost_josephjwilk-com
β Restarting Ghost
A GhostError occurred.
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_josephjwilk-com -n 50
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost update --no-mem-check'
Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2022-03-06T15_04_37_089Z.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.
When I went to the log, this is what I found:
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost update --no-mem-check'
Message: The database migration in Ghost encountered an error.
Help: https://ghost.org/docs/faq/
Suggestion: ghost update --rollback
--------------- stderr ---------------
sudo: /var/www/ghost/current/node_modules/.bin/knex-migrator-rollback: command not found
It then asked me if I wanted to revert Ghost to a prior version, which I chose yes, only to get the following error:
? **Unable to upgrade Ghost from v4.36.3 to v4.38.0. Would you like to revert back**
**to v4.36.3?** Yes
+ sudo systemctl is-active ghost_josephjwilk-com
+ sudo systemctl reset-failed ghost_josephjwilk-com
β Checking system Node.js version - found v14.19.0
β Ensuring user is not logged in as ghost user
β Checking if logged in user is directory owner
β Checking current folder permissions
β Checking folder permissions
β Checking file permissions
β Checking content folder ownership
β Checking free space
β Checking for available migrations
β Checking for latest Ghost version
# 4.36.3
* π Fixed saving of custom integrations - Kevin Ansfield
* π Fixed "Enable email open-rate" toggle - Kevin Ansfield
---
View the changelogs for full details:
* Ghost - https://github.com/tryghost/ghost/compare/v4.36.2...v4.36.3
* Admin - https://github.com/tryghost/admin/compare/v4.36.2...v4.36.3
β Fetched release notes
βΉ Downloading and updating Ghost [skipped]
+ sudo /var/www/ghost/current/node_modules/.bin/knex-migrator-rollback --force --v 4.36.3 --mgpath /var/www/ghost/current
β Rolling back database migrations
A ProcessError occurred.
Message: The database migration in Ghost encountered an error.
Help: https://ghost.org/docs/faq/
Suggestion: ghost update --rollback
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost update --no-mem-check'
Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2022-03-06T15_22_51_374Z.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.
When I looked at that log, I got the following message:
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost update --no-mem-check'
Message: The database migration in Ghost encountered an error.
Help: https://ghost.org/docs/faq/
Suggestion: ghost update --rollback
--------------- stderr ---------------
sudo: /var/www/ghost/current/node_modules/.bin/knex-migrator-rollback: command not found
This was the output from ghost doctor:
ghost-mgr@josephjwilk:/var/www/ghost$ ghost doctor
β Checking system Node.js version - found v14.19.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_josephjwilk-com
β 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
β Checking systemd node version - found v14.19.0
When I ran the suggested ghost update --rollback command, the following happened:
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run `npm install -g ghost-cli@latest` to upgrade.
+ sudo systemctl is-active ghost_josephjwilk-com
β Checking system Node.js version - found v14.19.0
β Ensuring user is not logged in as ghost user
β Checking if logged in user is directory owner
β Checking current folder permissions
β Checking folder permissions
β Checking file permissions
β Checking content folder ownership
β Checking free space
β Checking for available migrations
β Checking for latest Ghost version
# 4.36.3
* π Fixed saving of custom integrations - Kevin Ansfield
* π Fixed "Enable email open-rate" toggle - Kevin Ansfield
---
View the changelogs for full details:
* Ghost - https://github.com/tryghost/ghost/compare/v4.36.2...v4.36.3
* Admin - https://github.com/tryghost/admin/compare/v4.36.2...v4.36.3
β Fetched release notes
βΉ Downloading and updating Ghost [skipped]
+ sudo /var/www/ghost/current/node_modules/.bin/knex-migrator-rollback --force --v 4.36.3 --mgpath /var/www/ghost/current
β Rolling back database migrations
A ProcessError occurred.
Message: The database migration in Ghost encountered an error.
Help: https://ghost.org/docs/faq/
Suggestion: ghost update --rollback
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost update --no-mem-check --rollback'
Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2022-03-06T15_26_31_372Z.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.
Again, the log had essentially the same message as the prior ones:
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost update --no-mem-check --rollback'
Message: The database migration in Ghost encountered an error.
Help: https://ghost.org/docs/faq/
Suggestion: ghost update --rollback
--------------- stderr ---------------
sudo: /var/www/ghost/current/node_modules/.bin/knex-migrator-rollback: command not found
This is the result of running ghost status:
+ sudo systemctl is-active ghost_josephjwilk-com
+ sudo systemctl reset-failed ghost_josephjwilk-com
βββββββββββββββββββ¬βββββββββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββ¬βββββββ¬ββββββββββββββββββ
β Name β Location β Version β Status β URL β Port β Process Manager β
βββββββββββββββββββΌβββββββββββββββββΌββββββββββΌββββββββββΌββββββΌβββββββΌββββββββββββββββββ€
β josephjwilk-com β /var/www/ghost β 4.38.0 β stopped β n/a β n/a β n/a β
βββββββββββββββββββ΄βββββββββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββ΄βββββββ΄ββββββββββββββββββ
When attempting to start Ghost, I get the following errors:
+ sudo systemctl is-active ghost_josephjwilk-com
+ sudo systemctl reset-failed ghost_josephjwilk-com
β Checking system Node.js version - found v14.19.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_josephjwilk-com
β 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 v14.19.0
+ sudo systemctl start ghost_josephjwilk-com
+ sudo systemctl stop ghost_josephjwilk-com
β Starting Ghost: josephjwilk-com
A GhostError occurred.
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_josephjwilk-com -n 50
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost start'
Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2022-03-06T16_03_24_141Z.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.
That log reads as follows:
Debug Information:
OS: Ubuntu, v20.04.4 LTS
Node Version: v14.19.0
Ghost Version: 4.38.0
Ghost-CLI Version: 1.17.3
Environment: production
Command: 'ghost start'
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_josephjwilk-com -n 50
Stack: Error: Could not communicate with Ghost
at Server.<anonymous> (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:91:20)
at Object.onceWrapper (events.js:519:28)
at Server.emit (events.js:400:28)
at emitCloseNT (net.js:1677:8)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
When I run the journalctl -u ghost_josephjwilk-com -n 50 command, I get the following output:
Mar 06 15:58:26 josephjwilk systemd[1]: Stopped Ghost systemd service for blog: josephjwilk-com.
Mar 06 15:58:26 josephjwilk systemd[1]: Started Ghost systemd service for blog: josephjwilk-com.
Mar 06 15:58:27 josephjwilk node[25469]: - Inspecting operating system
Mar 06 15:58:27 josephjwilk node[25469]: internal/modules/cjs/loader.js:905
Mar 06 15:58:27 josephjwilk node[25469]: throw err;
Mar 06 15:58:27 josephjwilk node[25469]: ^
Mar 06 15:58:27 josephjwilk node[25469]: Error: Cannot find module 'luxon'
Mar 06 15:58:27 josephjwilk node[25469]: Require stack:
Mar 06 15:58:27 josephjwilk node[25469]: - /var/www/ghost/versions/4.38.0/core/server/overrides.js
Mar 06 15:58:27 josephjwilk node[25469]: - /var/www/ghost/versions/4.38.0/core/boot.js
Mar 06 15:58:27 josephjwilk node[25469]: - /var/www/ghost/versions/4.38.0/ghost.js
Mar 06 15:58:27 josephjwilk node[25469]: - /var/www/ghost/versions/4.38.0/index.js
Mar 06 15:58:27 josephjwilk node[25469]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
Mar 06 15:58:27 josephjwilk node[25469]: at Function.Module._load (internal/modules/cjs/loader.js:746:27)
Mar 06 15:58:27 josephjwilk node[25469]: at Module.require (internal/modules/cjs/loader.js:974:19)
Mar 06 15:58:27 josephjwilk node[25469]: at require (internal/modules/cjs/helpers.js:101:18)
Mar 06 15:58:27 josephjwilk node[25469]: at Object.<anonymous> (/var/www/ghost/versions/4.38.0/core/server/overrides.js:8:15)
Mar 06 15:58:27 josephjwilk node[25469]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
Mar 06 15:58:27 josephjwilk node[25469]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
Mar 06 15:58:27 josephjwilk node[25469]: at Module.load (internal/modules/cjs/loader.js:950:32)
Mar 06 15:58:27 josephjwilk node[25469]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Mar 06 15:58:27 josephjwilk node[25469]: at Module.require (internal/modules/cjs/loader.js:974:19) {
Mar 06 15:58:27 josephjwilk node[25469]: code: 'MODULE_NOT_FOUND',
Mar 06 15:58:27 josephjwilk node[25469]: requireStack: [
Mar 06 15:58:27 josephjwilk node[25469]: '/var/www/ghost/versions/4.38.0/core/server/overrides.js',
Mar 06 15:58:27 josephjwilk node[25469]: '/var/www/ghost/versions/4.38.0/core/boot.js',
Mar 06 15:58:27 josephjwilk node[25469]: '/var/www/ghost/versions/4.38.0/ghost.js',
Mar 06 15:58:27 josephjwilk node[25469]: '/var/www/ghost/versions/4.38.0/index.js'
Mar 06 15:58:27 josephjwilk node[25469]: ]
Mar 06 15:58:27 josephjwilk node[25469]: }
Mar 06 15:58:27 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Succeeded.
Mar 06 15:58:27 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Scheduled restart job, restart counter is at 3.
Mar 06 15:58:27 josephjwilk systemd[1]: Stopped Ghost systemd service for blog: josephjwilk-com.
Mar 06 15:58:27 josephjwilk systemd[1]: Started Ghost systemd service for blog: josephjwilk-com.
Mar 06 15:58:28 josephjwilk node[25505]: - Inspecting operating system
Mar 06 15:58:28 josephjwilk node[25505]: internal/modules/cjs/loader.js:905
Mar 06 15:58:28 josephjwilk node[25505]: throw err;
Mar 06 15:58:28 josephjwilk node[25505]: ^
Mar 06 15:58:28 josephjwilk node[25505]: Error: Cannot find module 'luxon'
Mar 06 15:58:28 josephjwilk node[25505]: Require stack:
Mar 06 15:58:28 josephjwilk node[25505]: - /var/www/ghost/versions/4.38.0/core/server/overrides.js
Mar 06 15:58:28 josephjwilk node[25505]: - /var/www/ghost/versions/4.38.0/core/boot.js
Mar 06 15:58:28 josephjwilk node[25505]: - /var/www/ghost/versions/4.38.0/ghost.js
Mar 06 15:58:28 josephjwilk node[25505]: - /var/www/ghost/versions/4.38.0/index.js
Mar 06 15:58:28 josephjwilk node[25505]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
Mar 06 15:58:28 josephjwilk node[25505]: at Function.Module._load (internal/modules/cjs/loader.js:746:27)
Mar 06 15:58:28 josephjwilk node[25505]: at Module.require (internal/modules/cjs/loader.js:974:19)
Mar 06 15:58:28 josephjwilk node[25505]: at require (internal/modules/cjs/helpers.js:101:18)
Mar 06 15:58:28 josephjwilk node[25505]: at Object.<anonymous> (/var/www/ghost/versions/4.38.0/core/server/overrides.js:8:15)
Mar 06 15:58:28 josephjwilk node[25505]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
Mar 06 15:58:28 josephjwilk node[25505]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
Mar 06 15:58:28 josephjwilk node[25505]: at Module.load (internal/modules/cjs/loader.js:950:32)
Mar 06 15:58:28 josephjwilk node[25505]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Mar 06 15:58:28 josephjwilk node[25505]: at Module.require (internal/modules/cjs/loader.js:974:19) {
Mar 06 15:58:28 josephjwilk node[25505]: code: 'MODULE_NOT_FOUND',
Mar 06 15:58:28 josephjwilk node[25505]: requireStack: [
Mar 06 15:58:28 josephjwilk node[25505]: '/var/www/ghost/versions/4.38.0/core/server/overrides.js',
Mar 06 15:58:28 josephjwilk node[25505]: '/var/www/ghost/versions/4.38.0/core/boot.js',
Mar 06 15:58:28 josephjwilk node[25505]: '/var/www/ghost/versions/4.38.0/ghost.js',
Mar 06 15:58:28 josephjwilk node[25505]: '/var/www/ghost/versions/4.38.0/index.js'
Mar 06 15:58:28 josephjwilk node[25505]: ]
Mar 06 15:58:28 josephjwilk node[25505]: }
Mar 06 15:58:28 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Succeeded.
Mar 06 15:58:28 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Scheduled restart job, restart counter is at 4.
Mar 06 15:58:28 josephjwilk systemd[1]: Stopped Ghost systemd service for blog: josephjwilk-com.
Mar 06 15:58:28 josephjwilk systemd[1]: Started Ghost systemd service for blog: josephjwilk-com.
Mar 06 15:58:29 josephjwilk node[25541]: - Inspecting operating system
Mar 06 15:58:29 josephjwilk node[25541]: internal/modules/cjs/loader.js:905
Mar 06 15:58:29 josephjwilk node[25541]: throw err;
Mar 06 15:58:29 josephjwilk node[25541]: ^
Mar 06 15:58:29 josephjwilk node[25541]: Error: Cannot find module 'luxon'
Mar 06 15:58:29 josephjwilk node[25541]: Require stack:
Mar 06 15:58:29 josephjwilk node[25541]: - /var/www/ghost/versions/4.38.0/core/server/overrides.js
Mar 06 15:58:29 josephjwilk node[25541]: - /var/www/ghost/versions/4.38.0/core/boot.js
Mar 06 15:58:29 josephjwilk node[25541]: - /var/www/ghost/versions/4.38.0/ghost.js
Mar 06 15:58:29 josephjwilk node[25541]: - /var/www/ghost/versions/4.38.0/index.js
Mar 06 15:58:29 josephjwilk node[25541]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
Mar 06 15:58:29 josephjwilk node[25541]: at Function.Module._load (internal/modules/cjs/loader.js:746:27)
Mar 06 15:58:29 josephjwilk node[25541]: at Module.require (internal/modules/cjs/loader.js:974:19)
Mar 06 15:58:29 josephjwilk node[25541]: at require (internal/modules/cjs/helpers.js:101:18)
Mar 06 15:58:29 josephjwilk node[25541]: at Object.<anonymous> (/var/www/ghost/versions/4.38.0/core/server/overrides.js:8:15)
Mar 06 15:58:29 josephjwilk node[25541]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
Mar 06 15:58:29 josephjwilk node[25541]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
Mar 06 15:58:29 josephjwilk node[25541]: at Module.load (internal/modules/cjs/loader.js:950:32)
Mar 06 15:58:29 josephjwilk node[25541]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Mar 06 15:58:29 josephjwilk node[25541]: at Module.require (internal/modules/cjs/loader.js:974:19) {
Mar 06 15:58:29 josephjwilk node[25541]: code: 'MODULE_NOT_FOUND',
Mar 06 15:58:29 josephjwilk node[25541]: requireStack: [
Mar 06 15:58:29 josephjwilk node[25541]: '/var/www/ghost/versions/4.38.0/core/server/overrides.js',
Mar 06 15:58:29 josephjwilk node[25541]: '/var/www/ghost/versions/4.38.0/core/boot.js',
Mar 06 15:58:29 josephjwilk node[25541]: '/var/www/ghost/versions/4.38.0/ghost.js',
Mar 06 15:58:29 josephjwilk node[25541]: '/var/www/ghost/versions/4.38.0/index.js'
Mar 06 15:58:29 josephjwilk node[25541]: ]
Mar 06 15:58:29 josephjwilk node[25541]: }
Mar 06 15:58:29 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Succeeded.
Mar 06 15:58:29 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Scheduled restart job, restart counter is at 5.
Mar 06 15:58:29 josephjwilk systemd[1]: Stopped Ghost systemd service for blog: josephjwilk-com.
Mar 06 15:58:29 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Start request repeated too quickly.
Mar 06 15:58:29 josephjwilk systemd[1]: ghost_josephjwilk-com.service: Failed with result 'start-limit-hit'.
Mar 06 15:58:29 josephjwilk systemd[1]: Failed to start Ghost systemd service for blog: josephjwilk-com.