Can't stop or restart Ghost via the cli

Howdy folks, I recently needed to restart my laptop and forgot to stop the Ghost instance I was running. Once rebooted, the node process dialogue was no longer running, so I ran “ghost ls” in my terminal and it showed that the Ghost instance is still running. Restarting or trying to stop the process results in the error below. Anyone have any ideas? I’m pushing to get my new site done and can’t continue working on my site without stripping out all the Ghost related stuff.

  • What’s your URL? Local
  • What version of Ghost are you using? 3.1.0
  • What configuration? Dev / Local

Here is what I have in the logs:

Debug Information:
OS: Microsoft Windows 10 Home, v10.0.18362
Node Version: v10.16.3
Ghost Version: 3.1.0
Ghost-CLI Version: 1.13.1
Environment: development
Command: ‘ghost stop -all’
Message: An unexpected error occurred while stopping Ghost.
Stack: Error: An unexpected error occurred while stopping Ghost.
at fkill.catch (C:\Users\chris\AppData\Roaming\npm\node_modules\ghost-cli\lib\utils\local-process.js:108:39)
at process._tickCallback (internal/process/next_tick.js:68:7)

Original Error Message:
Message:
Error: Killing process 9520 failed: Command failed with exit code 255: taskkill /f /t /pid 9520
at Array.map ()
at fkill (C:/Users/chris/AppData/Roaming/npm/node_modules/ghost-cli/node_modules/fkill/index.js:113:9)
Stack: AggregateError:
Error: Killing process 9520 failed: Command failed with exit code 255: taskkill /f /t /pid 9520
at Array.map ()
at fkill (C:/Users/chris/AppData/Roaming/npm/node_modules/ghost-cli/node_modules/fkill/index.js:113:9)
at fkill (C:\Users\chris\AppData\Roaming\npm\node_modules\ghost-cli\node_modules\fkill\index.js:113:9)
at process._tickCallback (internal/process/next_tick.js:68:7)

Managed to resolve the issue. For anyone interested, I was curious to see which process 9520 was referring to and noticed that there were 3 instances of the Node.js process running. I stopped the processes, restarted my laptop and all is good now :slight_smile:

2 Likes