Ghost 3 failing to start after upgrade?

Howdy,

I wanted to upgrade from v2 → v3 and everything went smoothly apart from that ghost-cli appears to be frozen when starting the instance of the website.

  • tomaytotomato.com
  • Ghost-CLI version: 1.13.1
  • Ghost version: 3.13.3 (at /var/www/site)
  • Node v12.16.2
  • Ubuntu 18.04

Log

  • sudo systemctl is-active ghost_tomaytotomato-com
  • sudo systemctl reset-failed ghost_tomaytotomato-com
    [16:50:57] Ensuring user is not logged in as ghost user [started]
    [16:50:57] Ensuring user is not logged in as ghost user [completed]
    [16:50:57] Checking if logged in user is directory owner [started]
    [16:50:57] Checking if logged in user is directory owner [completed]
    [16:50:57] Checking current folder permissions [started]
    [16:50:57] Checking current folder permissions [completed]
    [16:50:57] Validating config [started]
  • sudo systemctl is-active ghost_tomaytotomato-com
    [16:50:57] Validating config [completed]
    [16:50:57] Checking folder permissions [started]
    [16:50:59] Checking folder permissions [completed]
    [16:50:59] Checking file permissions [started]
    [16:51:00] Checking file permissions [completed]
    [16:51:00] Checking content folder ownership [started]
    [16:51:01] Checking content folder ownership [completed]
    [16:51:01] Checking memory availability [started]
    [16:51:01] Checking memory availability [completed]
    [16:51:01] Checking binary dependencies [started]
    [16:51:01] Checking binary dependencies [completed]
  • sudo systemctl start ghost_tomaytotomato-com
    ☱ Starting Ghost: tomaytotomato-com

I’ve restarted my VPS box and cleared caches, there was a warning about template incompatibilities but I removed it and still the same issue.

Any ideas?

Can you run ghost run to see if there are any issues? To stop, hit ctrl+c

It is working with ghost run

However there is a complaint about connecting to the bootstrap server on port 8000 and a SLOW_GET_HELPER

I tried lsof -i :8080 but could not find any process bound to that port.

[2020-04-15 20:12:07] INFO Ghost is running in production…
[2020-04-15 20:12:07] INFO Your site is now available on http://tomaytotomato.com/
[2020-04-15 20:12:07] INFO Ctrl+C to shut down
[2020-04-15 20:12:07] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2020-04-15 20:12:07] WARN Tries: 0
[2020-04-15 20:12:07] WARN Retrying…
[2020-04-15 20:12:07] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2020-04-15 20:12:07] WARN Tries: 1
[2020-04-15 20:12:07] WARN Retrying…
[2020-04-15 20:12:07] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2020-04-15 20:12:07] WARN Tries: 2
[2020-04-15 20:12:07] WARN Retrying…
[2020-04-15 20:12:07] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2020-04-15 20:12:07] INFO Ghost boot 7.912s
[2020-04-15 20:12:50] INFO “GET /data/admin/allowurl.txt” 301 24ms
(node:7728) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
[2020-04-15 20:12:51] WARN {{#get}} helper took 448ms to complete

{{#get}} helper took 448ms to complete

Error ID:
7bd00700-7f55-11ea-8cc6-cdfab361dc45

Error Code:
SLOW_GET_HELPER

Details:
api: v2.postsPublic.browse
apiOptions:
limit: 3
returnedRows: 3

Don’t worry about that, you see that because the CLI isn’t starting ghost.

Can you try running ghost setup systemd and then start ghost?

I’m seeing similar behaviour. Running ghost setup systemd just said it’s already configured. Starting manually I get the an almost identical log to @tomaytotomato, but when I start the service via systemctl, running ghost log doesn’t show any activity. Will keep digging!

Tried the ghost setup systemd no luck.

Tried to stop, reset-failed and remove the service then do ghost start

sudo systemctl status ghost_tomaytotomato-com
sudo systemctl stop ghost_tomaytotomato-com
sudo systemctl disable ghost_tomaytotomato-com
sudo systemctl reset-failed ghost_tomaytotomato-com

This is what systemd logs

Apr 16 07:20:51 .net systemd[1]: ghost_tomaytotomato-com.service: Service hold-off time over, scheduling restart.
Apr 16 07:20:51 .net systemd[1]: ghost_tomaytotomato-com.service: Scheduled restart job, restart counter is at 15
Apr 16 07:20:51 .net systemd[1]: Stopped Ghost systemd service for blog: tomaytotomato-com.
Apr 16 07:20:51 .net systemd[1]: ghost_tomaytotomato-com.service: Start request repeated too quickly.
Apr 16 07:20:51 .net systemd[1]: ghost_tomaytotomato-com.service: Failed with result ‘start-limit-hit’.
Apr 16 07:20:51 .net systemd[1]: Failed to start Ghost systemd service for blog: tomaytotomato-com.

nginx, mysql services have started ok and there is no information from ghost logs, so I think its an issue with the environment and ghost-cli.

On inspection of the system journal, ghost is outputting this error:

SyntaxError: Unexpected token {
Apr 16 11:08:07 node[785]: at createScript (vm.js:80:10)
Apr 16 11:08:07 node[785]: at Object.runInThisContext (vm.js:139:10)
Apr 16 11:08:07 node[785]: at Module._compile (module.js:617:28)
Apr 16 11:08:07 node[785]: at Object.Module._extensions…js (module.js:664:10)
Apr 16 11:08:07 node[785]: at Module.load (module.js:566:32)
Apr 16 11:08:07 node[785]: at tryModuleLoad (module.js:506:12)
Apr 16 11:08:07 node[785]: at Function.Module._load (module.js:498:3)
Apr 16 11:08:07 node[785]: at Module.require (module.js:597:17)
Apr 16 11:08:07 node[785]: at require (internal/module.js:11:18)
Apr 16 11:08:07 node[785]: at Object. (/var/www/site/versions/3.13.3/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
Apr 16 11:08:08 systemd[1]: ghost_tomaytotomato-com.service: Service hold-off time over, scheduling restart.
Apr 16 11:08:08 systemd[1]: ghost_tomaytotomato-com.service: Scheduled restart job, restart counter is at 4.
Apr 16 11:08:08 systemd[1]: Stopped Ghost systemd service for blog: tomaytotomato-com.
Apr 16 11:08:08 systemd[1]: Started Ghost systemd service for blog: tomaytotomato-com.
Apr 16 11:08:09 node[810]: - Inspecting operating system
Apr 16 11:08:09 node[810]: /var/www/site/versions/3.13.3/node_modules/fs-extra/lib/mkdirs/make-dir.js:86
Apr 16 11:08:09 node[810]: } catch {
Apr 16 11:08:09 node[810]: ^

Could this be a node compatibility issue?

Yep, that suggests that the node version ghost is using is v8 which is no longer supported

My node version is - v12.16.2

Not v8, so I don’t think that can be it

Just came here to say I also am having the exact same issue. Tried the various suggestions here with same results.

Take a look at this thread:

Guessing this is my problem. Node is the right version but nodejs is not:

sudo nodejs -v
v8.17.0

Great, manually removing the node version using aptitude and then installing directly from nodesource fixed the issue.

Thanks

1 Like