I’m running into similar issues outlined in this thread. Creating a new post per @hannah’s recommendation.
The core issue is that after upgrade, I ghost doctor shows everything as fine. I can start ghost and the service runs, but it appears that it is stuck in a boot loop. It runs into errors and restarts.
Thank you for any help!
UPDATE:
I discovered that the site works properly when I ghost run
directly, but when it is running via ghost start
it doesn’t work.
System Info
Self hosted on digital ocean.
Ubuntu 18.04.3 LTS
Ghost-CLI version: 1.16.3
Ghost version: 4.2.0 (at /var/www/ghost) (upgraded from version 3)
output from which node
:
/home/ghost-mgr/.nvm/versions/node/v14.16.1/bin/node
output from node --version
:
node --version
v14.16.1
/home/ghost-mgr/.nvm/versions/node/v14.16.1/bin/node --version
v14.16.1
Systemd file
[Unit]
Description=Ghost systemd service for blog: 138-68-255-206
Documentation=https://docs.ghost.org
[Service]
Type=simple
WorkingDirectory=/var/www/ghost
User=999
Environment="NODE_ENV=production"
ExecStart=/home/ghost-mgr/.nvm/versions/node/v14.16.1/bin/node /usr/bin/ghost run
Restart=always
[Install]
WantedBy=multi-user.target
Journalctl output
Apr 11 21:05:20 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Failed with result 'exit-code'.
Apr 11 21:05:20 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Service hold-off time over, scheduling restart.
Apr 11 21:05:20 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Scheduled restart job, restart counter is at 7.
Apr 11 21:05:20 pfista-ghost systemd[1]: Stopped Ghost systemd service for blog: 138-68-255-206.
Apr 11 21:05:20 pfista-ghost systemd[1]: Started Ghost systemd service for blog: 138-68-255-206.
Apr 11 21:05:21 pfista-ghost node[13902]: - Inspecting operating system
Apr 11 21:05:23 pfista-ghost node[13902]: [2021-04-11 21:05:23] INFO Ghost is running in production...
Apr 11 21:05:23 pfista-ghost node[13902]: [2021-04-11 21:05:23] INFO Your site is now available on https://blog.pfista.io/
Apr 11 21:05:23 pfista-ghost node[13902]: [2021-04-11 21:05:23] INFO Ctrl+C to shut down
Apr 11 21:05:23 pfista-ghost node[13902]: [2021-04-11 21:05:23] INFO Ghost server started in 1.784s
Apr 11 21:05:24 pfista-ghost node[13902]: [2021-04-11 21:05:24] INFO Database is in a ready state.
Apr 11 21:05:24 pfista-ghost node[13902]: [2021-04-11 21:05:24] INFO Ghost database ready in 2.576s
Apr 11 21:05:28 pfista-ghost node[13902]: [2021-04-11 21:05:28] INFO Ghost booted in 6.728s
Apr 11 21:05:29 pfista-ghost node[13902]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:46
Apr 11 21:05:29 pfista-ghost node[13902]: throw error;
Apr 11 21:05:29 pfista-ghost node[13902]: ^
Apr 11 21:05:29 pfista-ghost node[13902]: { message: undefined }
Apr 11 21:05:29 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Main process exited, code=exited, status=1/FAILURE
Apr 11 21:05:29 pfista-ghost node[13902]: [2021-04-11 21:05:29] WARN Ghost is shutting down
Apr 11 21:05:29 pfista-ghost node[13902]: [2021-04-11 21:05:29] WARN Ghost has shut down
Apr 11 21:05:29 pfista-ghost node[13902]: [2021-04-11 21:05:29] WARN Your site is now offline
Apr 11 21:05:29 pfista-ghost node[13902]: [2021-04-11 21:05:29] WARN Ghost was running for a few seconds
Apr 11 21:05:29 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Failed with result 'exit-code'.
Apr 11 21:05:30 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Service hold-off time over, scheduling restart.
Apr 11 21:05:30 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Scheduled restart job, restart counter is at 8.
Apr 11 21:05:30 pfista-ghost systemd[1]: Stopped Ghost systemd service for blog: 138-68-255-206.
Apr 11 21:05:30 pfista-ghost systemd[1]: Started Ghost systemd service for blog: 138-68-255-206.
Apr 11 21:05:31 pfista-ghost node[13968]: - Inspecting operating system
Apr 11 21:05:32 pfista-ghost node[13968]: [2021-04-11 21:05:32] INFO Ghost is running in production...
Apr 11 21:05:32 pfista-ghost node[13968]: [2021-04-11 21:05:32] INFO Your site is now available on https://blog.pfista.io/
Apr 11 21:05:32 pfista-ghost node[13968]: [2021-04-11 21:05:32] INFO Ctrl+C to shut down
Apr 11 21:05:33 pfista-ghost node[13968]: [2021-04-11 21:05:33] INFO Ghost server started in 1.803s
Apr 11 21:05:33 pfista-ghost node[13968]: [2021-04-11 21:05:33] INFO Database is in a ready state.
Apr 11 21:05:33 pfista-ghost node[13968]: [2021-04-11 21:05:33] INFO Ghost database ready in 2.59s
Apr 11 21:05:38 pfista-ghost node[13968]: [2021-04-11 21:05:38] INFO Ghost booted in 7.162s
Apr 11 21:05:39 pfista-ghost node[13968]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:46
Apr 11 21:05:39 pfista-ghost node[13968]: throw error;
Apr 11 21:05:39 pfista-ghost node[13968]: ^
Apr 11 21:05:39 pfista-ghost node[13968]: { message: undefined }
Apr 11 21:05:39 pfista-ghost systemd[1]: ghost_138-68-255-206.service: Main process exited, code=exited, status=1/FAILURE
Apr 11 21:05:39 pfista-ghost node[13968]: [2021-04-11 21:05:39] WARN Ghost is shutting down
Apr 11 21:05:39 pfista-ghost node[13968]: [2021-04-11 21:05:39] WARN Ghost has shut down
Apr 11 21:05:39 pfista-ghost node[13968]: [2021-04-11 21:05:39] WARN Your site is now offline
Apr 11 21:05:39 pfista-ghost node[13968]: [2021-04-11 21:05:39] WARN Ghost was running for a few seconds
Logs
[2021-04-09 00:24:29] ERROR
MESSAGE: cannot get fulfillment value of a non-fulfilled promise
See http://goo.gl/MqrFmX
"Checking for updates failed, your site will continue to function."
"If you get this error repeatedly, please seek help from https://ghost.org/docs/."
TypeError: cannot get fulfillment value of a non-fulfilled promise
See http://goo.gl/MqrFmX
at PromiseInspection.value (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/synchronous_inspection.js:22:15)
at /var/www/ghost/versions/3.1.1/core/server/update-check.js:113:35
at tryCatcher (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:673:18)
at PropertiesPromiseArray.PromiseArray._resolve (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise_array.js:127:19)
at PropertiesPromiseArray._promiseFulfilled (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/props.js:78:14)
at Promise._settlePromise (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:609:26)
at Promise._settlePromise0 (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
[2021-04-09 00:24:29] ERROR
CODE: ERR_INVALID_ARG_TYPE
MESSAGE: The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type undefined
"Checking for updates failed, your site will continue to function."
"If you get this error repeatedly, please seek help from https://ghost.org/docs/."
TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type undefined
at Function.byteLength (buffer.js:515:11)
at then (/var/www/ghost/versions/3.1.1/core/server/update-check.js:151:59)
at tryCatcher (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/3.1.1/node_modules/bluebird/js/release/async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
[2021-04-09 00:42:47] ERROR
CODE: ERR_SERVER_NOT_RUNNING
MESSAGE: Server is not running.
Error [ERR_SERVER_NOT_RUNNING]: Server is not running.
at Server.close (net.js:1565:12)
at Object.onceWrapper (events.js:286:20)
at Server.emit (events.js:198:13)
at Server.EventEmitter.emit (domain.js:448:20)
at emitCloseNT (net.js:1618:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
[2021-04-09 00:59:31] ERROR
NAME: InternalServerError
CODE: MODULE_NOT_FOUND
MESSAGE: Unable to activate the theme "casper".
level: critical
InternalServerError: Unable to activate the theme "casper".
at new InternalServerError (/var/www/ghost/versions/4.2.0/node_modules/@tryghost/errors/node_modules/ghost-ignition/lib/errors/index.js:90:23)
at activate (/var/www/ghost/versions/4.2.0/core/frontend/services/themes/activate.js:27:23)
at validationSuccess (/var/www/ghost/versions/4.2.0/core/frontend/services/themes/index.js:61:29)
at async initFrontend (/var/www/ghost/versions/4.2.0/core/boot.js:111:5)
at async bootGhost (/var/www/ghost/versions/4.2.0/core/boot.js:284:9)
Error: Cannot find module './create'
Require stack:
- /var/www/ghost/versions/4.2.0/core/frontend/services/themes/engines/index.js
- /var/www/ghost/versions/4.2.0/core/frontend/services/themes/active.js
- /var/www/ghost/versions/4.2.0/core/frontend/services/themes/i18n.js
- /var/www/ghost/versions/4.2.0/core/frontend/services/proxy.js
- /var/www/ghost/versions/4.2.0/core/frontend/services/themes/index.js
- /var/www/ghost/versions/4.2.0/core/frontend/services/url/Resources.js
- /var/www/ghost/versions/4.2.0/core/frontend/services/url/UrlService.js
- /var/www/ghost/versions/4.2.0/core/frontend/services/url/index.js
- /var/www/ghost/versions/4.2.0/core/boot.js
- /var/www/ghost/versions/4.2.0/ghost.js
- /var/www/ghost/versions/4.2.0/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
at Function.Module._load (internal/modules/cjs/loader.js:677:27)
at Module.require (internal/modules/cjs/loader.js:830:19)
at require (internal/modules/cjs/helpers.js:68:18)
at Object.get create [as create] (/var/www/ghost/versions/4.2.0/core/frontend/services/themes/engines/index.js:3:16)
at new ActiveTheme (/var/www/ghost/versions/4.2.0/core/frontend/services/themes/active.js:53:38)
at Object.set (/var/www/ghost/versions/4.2.0/core/frontend/services/themes/active.js:126:30)
at activate (/var/www/ghost/versions/4.2.0/core/frontend/services/themes/activate.js:16:16)
at validationSuccess (/var/www/ghost/versions/4.2.0/core/frontend/services/themes/index.js:61:29)
at async initFrontend (/var/www/ghost/versions/4.2.0/core/boot.js:111:5)
at async bootGhost (/var/www/ghost/versions/4.2.0/core/boot.js:284:9)
[2021-04-09 00:59:31] ERROR
NAME: InternalServerError
CODE: MODULE_NOT_FOUND
MESSAGE: Cannot find module './server/web/parent/app'
Require stack:
- /var/www/ghost/versions/4.2.0/core/boot.js
- /var/www/ghost/versions/4.2.0/ghost.js
- /var/www/ghost/versions/4.2.0/index.js
level: normal
InternalServerError: Cannot find module './server/web/parent/app'
Require stack:
- /var/www/ghost/versions/4.2.0/core/boot.js
- /var/www/ghost/versions/4.2.0/ghost.js
- /var/www/ghost/versions/4.2.0/index.js
at new GhostError (/var/www/ghost/versions/4.2.0/node_modules/@tryghost/errors/lib/errors.js:10:26)
at bootGhost (/var/www/ghost/versions/4.2.0/core/boot.js:312:32)
Error: Cannot find module './server/web/parent/app'
Require stack:
- /var/www/ghost/versions/4.2.0/core/boot.js
- /var/www/ghost/versions/4.2.0/ghost.js
- /var/www/ghost/versions/4.2.0/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
at Function.Module._load (internal/modules/cjs/loader.js:677:27)
at Module.require (internal/modules/cjs/loader.js:830:19)
at require (internal/modules/cjs/helpers.js:68:18)
at initExpressApps (/var/www/ghost/versions/4.2.0/core/boot.js:124:23)
at bootGhost (/var/www/ghost/versions/4.2.0/core/boot.js:285:32)