Upgrade to 3.21.1 - blogs not starting

I’ve upgraded about 20 blogs today… and all seemed peachy for a while… but now, ghost start is not returning - it loops at the sudo systemctl start ghost_... prompt and never returns…

syslog says:

node[9194]: Error: Cannot find module '/usr/local/bin/ghost'
node[9194]:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
node[9194]:     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
node[9194]:     at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
node[9194]:     at startup (internal/bootstrap/node.js:283:19)
node[9194]:     at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

and sure enough - there is no such file - which shows that I have /usr/bin/ghost

If I create a link sudo ln -s /usr/bin/ghost /usr/local/bin/ghost then ghost start still fails - with a different error:

node[10454]: + sudo node current/index.js
node[10454]: We trust you have received the usual lecture from the local System
node[10454]: Administrator. It usually boils down to these three things:
node[10454]:     #1) Respect the privacy of others.
node[10454]:     #2) Think before you type.
node[10454]:     #3) With great power comes great responsibility.
node[10454]: sudo: no tty present and no askpass program specified

I’ve tried reverting to 3.21.0 by changing the ‘’‘current’’’ link - but the error persists.

Most appreciative for any help!

I should mention that if I

ghost run

The site starts fine.

Manually running

sudo systemctl start ghost_xxx

and I still have the sudo: no tty present and no askpass program specified error.

So I have tracked down the issue - nothing to do with the upgrade whew!

The two clues are that the systemd unit files were expecting a /usr/local/bin/ghost and that sudo was having kittens…

The issue was caused by a change of ownership and a deluser - the system/files/ghost_… unit files contained an invalid UID and reference to the local binary…

Once these were fixed, I ran a sudo systemctl daemon-reload and blog-bliss was restored.

Ciao bella!

1 Like