Ghost won't start on RPi running Ubuntu server 18x

#1

Followed the ghost installation guide for Ubuntu install (using a RaspberryPi3B+ with the official Ubuntu core image.

Aside from the ghost guide installation, I also expanded the pi volume, to use the whole SDcard, setup a root user for the server, and got NTP updated etc. (all the basic stuff, before installing ghost.)

Everything in the ghost install went smoothly and without error until the final command in ‘ghost install’ sequence (which is: start ghost? y.). It runs through all the checks and then get’s to the ‘Starting Ghost’ bit, and then fail.

subsequent attempts to start ghost give me the below output. Ghost doctor does not reveal any errors.

NB: saw this post - was failing on version of node = v8.15.1 and ghost cli = 1.9.9. I updated to node v10x, but still failing in same way.

**blog@ubuntu** : **/var/www/ghost** $ ghost start
+ sudo systemctl is-active ghost_localhost
✔ 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_localhost
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
+ sudo systemctl start ghost_localhost
+ sudo systemctl stop ghost_localhost
✖ Starting Ghost
A GhostError occurred.
Message: Migration lock was never released or currently a migration is running.
Help: If you are sure no migration is running, check your data and if your database is in a broken state, you could run `knex-migrator rollback`.
Suggestion: journalctl -u ghost_localhost -n 50
Debug Information:
OS: Ubuntu, v18.04
Node Version: v8.15.1
Ghost-CLI Version: 1.9.9
Environment: production
Command: 'ghost start'
Additional log info available in: /home/blog/.ghost/logs/ghost-cli-debug-2019-03-31T01_02_41_086Z.log
Try running ghost doctor to check your system for known issues.

Logs on node 8x:

blog@ubuntu:~$ cat /home/blog/.ghost/logs/ghost-cli-debug-2019-03-31T01_02_41_086Z.log
Debug Information:
    OS: Ubuntu, v18.04
    Node Version: v8.15.1
    Ghost-CLI Version: 1.9.9
    Environment: production
    Command: 'ghost start'
Message: Migration lock was never released or currently a migration is running.
Help: If you are sure no migration is running, check your data and if your database is in a broken state, you could run `knex-migrator rollback`.
Suggestion: journalctl -u ghost_localhost -n 50
Stack: Error: Migration lock was never released or currently a migration is running.
    at Server.server.close (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:38:28)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at Server.emit (events.js:208:7)
    at emitCloseNT (net.js:1664:8)
    at _combinedTickCallback (internal/process/next_tick.js:136:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)

Logs on node 10x

blog@ubuntu:/var/www/ghost$ cat /home/blog/.ghost/logs/ghost-cli-debug-2019-03-31T01_47_43_471Z.log
Debug Information:
    OS: Ubuntu, v18.04
    Node Version: v10.15.3
    Ghost-CLI Version: 1.9.9
    Environment: production
    Command: 'ghost start'
Message: Migration lock was never released or currently a migration is running.
Help: If you are sure no migration is running, check your data and if your database is in a broken state, you could run `knex-migrator rollback`.
Suggestion: journalctl -u ghost_localhost -n 50
Stack: Error: Migration lock was never released or currently a migration is running.
    at Server.server.close (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:38:28)
    at Object.onceWrapper (events.js:277:13)
    at Server.emit (events.js:189:13)
    at emitCloseNT (net.js:1609:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Doctor output:

**blog@ubuntu** : **/var/www/ghost** $ ghost doctor
✔ Checking system Node.js version
✔ 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 operating system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_localhost
? **Sudo Password** *[hidden]*
+ sudo systemctl reset-failed ghost_localhost
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability

‘ghost run’ output

blog@ubuntu:/var/www/ghost$ ghost run
The `ghost run` command is used by the configured Ghost process manager and for debugging. If you're not running this to debug something, you should run `ghost start` instead.
+ sudo node current/index.js
[2019-03-31 01:56:31] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED 
[2019-03-31 01:56:31] WARN Tries: 0 
[2019-03-31 01:56:31] WARN Retrying... 
[2019-03-31 01:56:31] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED 
[2019-03-31 01:56:31] WARN Tries: 1 
[2019-03-31 01:56:31] WARN Retrying... 
[2019-03-31 01:56:31] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED 
[2019-03-31 01:56:31] WARN Tries: 2 
[2019-03-31 01:56:31] WARN Retrying... 
[2019-03-31 01:56:31] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED 
[2019-03-31 01:56:31] ERROR

Migration lock was never released or currently a migration is running.

"If you are sure no migration is running, check your data and if your database is in a broken state, you could run `knex-migrator rollback`."

Error ID:
    500

----------------------------------------

MigrationsAreLockedError: Migration lock was never released or currently a migration is running.
    at MigrationsAreLockedError.KnexMigrateError (/var/www/ghost/versions/2.19.1/node_modules/knex-migrator/lib/errors.js:7:26)
    at new MigrationsAreLockedError (/var/www/ghost/versions/2.19.1/node_modules/knex-migrator/lib/errors.js:38:26)
    at /var/www/ghost/versions/2.19.1/node_modules/knex-migrator/lib/index.js:896:23
    at tryCatcher (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/promise.js:694:18)
    at _drainQueueStep (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/async.js:138:12)
    at _drainQueue (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/2.19.1/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
0 Likes

closed #2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

0 Likes