After update ghost don't start


#1

Hi,

after update ghost-cli and after ghost to the latest versione.
Ghost don’t start when i try ‘ghost start’
I get this error:

Debug Information:
    OS: Ubuntu, v18.04
    Node Version: v8.11.4
    Ghost-CLI Version: 1.9.8
    Environment: production
    Command: 'ghost start'
Message: Could not communicate with Ghost
Suggestion: journalctl -u ghostname-com -n 50
Stack: Error: Could not communicate with Ghost
    at Server.server.close (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:56:20)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at Server.emit (events.js:208:7)
    at emitCloseNT (net.js:1659:8)
    at _combinedTickCallback (internal/process/next_tick.js:135:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

My configuration:
Ghost-CLI version: 1.9.8
Ghost version: 2.10.1
If I try to start ghost with ‘sudo systemctl start ghostname-com’
I get
‘Failed to start ghostname-com.service: Unit ghostname-com.service not found.’

And I can’t go back with the update I get error here too.

Anyone can help?

Thanks Mik


#2

Can you please try again, and if it doesn’t work, run the suggested debug command?

The output from that should contain more details of the error.


#3
user@ghostinstall:/var/www/ghostinstall.com/html/blog$ ghost start                                                                                                                                                                     + sudo systemctl is-active ghost_miklaboratoty-com
✔ 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 ghostname-com
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
+ sudo systemctl start ghostname-com
+ sudo systemctl stop ghostname-com
✖ Starting Ghost
A GhostError occurred.


Message: Could not communicate with Ghost
Suggestion: journalctl -u ghostname-com -n 50

Debug Information:
    OS: Ubuntu, v18.04
    Node Version: v8.15.0
    Ghost-CLI Version: 1.9.8
    Environment: production
    Command: 'ghost start'

Additional log info available in: /home/user/.ghost/logs/ghost-cli-debug-2019-01-11T11_48_43_458Z.log

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

You can always refer to https://docs.ghost.org/docs/troubleshooting#section-cli-errors for troubleshooting.
user@ghostinstall:/var/www/ghostinstall.com/html/blog$ sudo journalctl -u ghostname-com -n 50
-- Logs begin at Tue 2018-11-13 02:53:31 CET, end at Fri 2019-01-11 12:49:16 CET
-- No entries --

#4

Any ideas?


#5

I have the same error and have to revert back to previous version, the error message is:

Message: Cannot read property ‘engine’ of undefined

the journalctl shows:

Jan 15 11:13:12 haper node[19044]: TypeError: Cannot read property 'engine' of undefined
Jan 15 11:13:12 haper node[19044]:     at Resources._initResourceConfig (/var/www/html/blog/blog/versions/2.10.1/core/server/services/url/Resources.js:48:68)
Jan 15 11:13:12 haper node[19044]:     at Resources.fetchResources (/var/www/html/blog/blog/versions/2.10.1/core/server/services/url/Resources.js:55:14)
Jan 15 11:13:12 haper node[19044]:     at emitNone (events.js:106:13)
Jan 15 11:13:12 haper node[19044]:     at EventRegistry.emit (events.js:208:7)
Jan 15 11:13:12 haper node[19044]:     at settings.init.then.then.then (/var/www/html/blog/blog/versions/2.10.1/core/server/index.js:108:31)
Jan 15 11:13:12 haper node[19044]:     at tryCatcher (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/util.js:16:23)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromiseFromHandler (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:512:31)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromise (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:569:18)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromise0 (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:614:10)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromises (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:694:18)
Jan 15 11:13:12 haper node[19044]:     at _drainQueueStep (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:138:12)
Jan 15 11:13:12 haper node[19044]:     at _drainQueue (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:131:9)
Jan 15 11:13:12 haper node[19044]:     at Async._drainQueues (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:147:5)
Jan 15 11:13:12 haper node[19044]:     at Immediate.Async.drainQueues (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:17:14)
Jan 15 11:13:12 haper node[19044]:     at runCallback (timers.js:810:20)
Jan 15 11:13:12 haper node[19044]:     at tryOnImmediate (timers.js:768:5)
Jan 15 11:13:12 haper node[19044]:     at processImmediate [as _immediateCallback] (timers.js:745:5)

#6

Got the same error while installing a fresh instance.

Additional info for our use case:

  • We are not installing Nginx and MySQL because we have them external.

Reverting to 2.9.1 which is our current instance does seem to work.


#7

Update 2.11.0 creates the same error for me so no answer to the above and no solution in the latest update.

I wonder if this is related:

web@haper:/var/www/html/blog/blog$ sudo npm install -g ghost-cli@latest
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/usr/local/bin/ghost -> /usr/local/lib/node_modules/ghost-cli/bin/ghost
+ ghost-cli@1.9.9
updated 1 package in 4.665s 

web@haper:/var/www/html/blog/blog$ ghost -v
Ghost-CLI version: 1.9.8
Ghost version: 2.9.1 (at /var/www/html/blog/blog)

In other words ghost-cli is not updated


#8

I can not answer anymore so I have to update my previous answer, @Hannah thanks for your answer but I gave you all you need in my opinion, I tried to update, tried to install again but with all the attempts I still am stuck at same situation and in my post 4 of jan 15 I showed the logfiles and the message it created, no idea what to add more.


#9

The code on GitHub is submitted every day, and it seems ghost is not stable.


#10

I’ve been following this issue with reports of the same error, however each new comment hasn’t been including error logs or debug info, so I and everyone else reading has no way to see that it’s really all the same issue, how different bits of information are related or gain any insight into what’s happening.

If you’re experiencing an issue with ghost not starting after updating, please contribute to this thread with the full details of your stack, the version you upgraded to and from, as well as the output in full from the error, any suggested commands and the debug log.


#11

me to Facing this same issue


#12
☴ Downloading and updating Ghost to v2.11.1 > Installing dependencies > info This module is OPTIONAL, you can safely ignore this error


#13
$ ghost update
+ sudo systemctl is-active ghost_app-gapps-blog
✔ Checking system Node.js version
✔ 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 memory availability
✔ Checking for available migrations
✔ Checking for latest Ghost version
✖ Downloading and updating Ghost to v2.12.0
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@2.12.0: The engine "cli" appears to be invalid.
warning Error running install script for optional dependency: "/var/www/tmsapp/versions/2.12.0/node_modules/sqlite3: spawn ENOMEM"
error An unexpected error occurred: "/var/www/tmsapp/versions/2.12.0/node_modules/jsonpath: spawn ENOMEM".
warning Error running install script for optional dependency: "/var/www/tmsapp/versions/2.12.0/node_modules/sharp: spawn ENOMEM"
warning Error running install script for optional dependency: "/var/www/tmsapp/versions/2.12.0/node_modules/dtrace-provider: spawn ENOMEM"

yarn install v1.12.3
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info source-map@0.7.3: The engine "node" is incompatible with this module. Expected version ">= 8". Got "6.16.0"
info "source-map@0.7.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info This module is OPTIONAL, you can safely ignore this error
info If you think this is a bug, please open a bug report with the information provided in "/var/www/tmsapp/versions/2.12.0/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info This module is OPTIONAL, you can safely ignore this error
info This module is OPTIONAL, you can safely ignore this error

Exit code: 1


Debug Information:
    OS: Ubuntu, v16.04
    Node Version: v6.16.0
    Ghost-CLI Version: 1.9.9
    Environment: production
    Command: 'ghost update'

Additional log info available in: /home/gapps/.ghost/logs/ghost-cli-debug-2019-01-23T04_26_32_883Z.log

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

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

#14

try running ghost buster (which runs yarn cache clean in the background) - it looks like a module didn’t download properly


#15

thanks its working
In first attemt I am getting this

command ghost update

A GhostError occurred.

Message: connect ECONNREFUSED 127.0.0.1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_app-gapps-blog -n 50

#16

Message: connect ECONNREFUSED 127.0.0.1:3306

Looks like your MySQL database is not running.


#17

@hapee

Hey! Could you please provide more information? e.g. steps to reproduce, what you exactly did to get the error you have shared. Thanks!


#18

Hi @Kate thanks for your answser but I pasted the ouput of jorunalctl in post above but I will repeat it here
Message: Cannot read property ‘engine’ of undefined

I have also tried it with a fresh install, same errors.

Jan 15 11:13:12 haper node[19044]:     at Resources._initResourceConfig (/var/www/html/blog/blog/versions/2.10.1/core/server/services/url/Resources.js:48:68)
Jan 15 11:13:12 haper node[19044]:     at Resources.fetchResources (/var/www/html/blog/blog/versions/2.10.1/core/server/services/url/Resources.js:55:14)
Jan 15 11:13:12 haper node[19044]:     at emitNone (events.js:106:13)
Jan 15 11:13:12 haper node[19044]:     at EventRegistry.emit (events.js:208:7)
Jan 15 11:13:12 haper node[19044]:     at settings.init.then.then.then (/var/www/html/blog/blog/versions/2.10.1/core/server/index.js:108:31)
Jan 15 11:13:12 haper node[19044]:     at tryCatcher (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/util.js:16:23)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromiseFromHandler (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:512:31)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromise (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:569:18)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromise0 (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:614:10)
Jan 15 11:13:12 haper node[19044]:     at Promise._settlePromises (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/promise.js:694:18)
Jan 15 11:13:12 haper node[19044]:     at _drainQueueStep (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:138:12)
Jan 15 11:13:12 haper node[19044]:     at _drainQueue (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:131:9)
Jan 15 11:13:12 haper node[19044]:     at Async._drainQueues (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:147:5)
Jan 15 11:13:12 haper node[19044]:     at Immediate.Async.drainQueues (/var/www/html/blog/blog/versions/2.10.1/node_modules/bluebird/js/release/async.js:17:14)
Jan 15 11:13:12 haper node[19044]:     at runCallback (timers.js:810:20)
Jan 15 11:13:12 haper node[19044]:     at tryOnImmediate (timers.js:768:5)
Jan 15 11:13:12 haper node[19044]:     at processImmediate [as _immediateCallback] (timers.js:745:5)

#19

@hapee Which theme are you using? It looks to me you don’t have an active theme. My assumption is your active theme can’t be found on the server.


#20

As always, you are right, when I switched back to Casper, the update went as expected, sorry for wasting your time.

I was using the https://github.com/leonidasv/air-blog-theme-for-ghost them which I was able to install again after the update.

Thanks for your support.