Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost CLI does not seem to realize that my ghost instance is running #461

Closed
1 of 2 tasks
virtmann opened this issue Aug 22, 2017 · 14 comments
Closed
1 of 2 tasks

Ghost CLI does not seem to realize that my ghost instance is running #461

virtmann opened this issue Aug 22, 2017 · 14 comments

Comments

@virtmann
Copy link

virtmann commented Aug 22, 2017

This issue is a

  • Bug Report
  • Feature Request

Summary

Ghost CLI does not seem to realize that my ghost instance is running. Running "ghost status" shows the instance as stopped when it is indeed running.

Steps to Reproduce (for a bug report)

When running "ghost restart" I get an error that the Ghost instance is not currently running. I can confirm that the ghost instance is running and working correctly. If I try to run "ghost start" I get an error that the port is already in use (because ghost is running).

I am running Ghost 1.7.0 with Ghost-CLI 1.1.1. I can confirm that Ghost 1.7.0 did work with Ghost-CLI 1.0.3

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

Debug Information:
Node Version: v6.11.2
Ghost-CLI Version: 1.1.1
Environment: production
Command: 'ghost restart'
An error occurred.
Message: 'Ghost instance is not currently running.'

Stack: Error: Ghost instance is not currently running.
at RestartCommand.run (/usr/lib/node_modules/ghost-cli/lib/commands/restart.js:9:35)
at Function._run (/usr/lib/node_modules/ghost-cli/lib/command.js:198:48)
at Object.handler (/usr/lib/node_modules/ghost-cli/lib/command.js:117:22)
at Object.self.runCommand (/usr/lib/node_modules/ghost-cli/node_modules/yargs/lib/command.js:233:22)
at Object.Yargs.self._parseArgs (/usr/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:990:30)
at Object.Yargs.self.parse (/usr/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:532:23)
at Object.run (/usr/lib/node_modules/ghost-cli/lib/bootstrap.js:165:14)
at Object. (/usr/lib/node_modules/ghost-cli/bin/ghost:14:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)

Technical details (will be automatically output by Ghost-CLI if an error occurs):

  • OS: Ubuntu 16.04.3
  • Node Version: 6.11.2
  • Ghost-CLI Version: 1.1.1
  • Environment: production
  • Command: 'ghost restart'
@TomChantler
Copy link
Contributor

This is related to issue #431

@acburdine
Copy link
Member

@virtmann @TomChantler is correct in that it is likely a duplicate of #431 -> was there a server reboot at some point before running restart?

@virtmann
Copy link
Author

@TomChantler - Most likely, yes. I have moved on and rebuilt the box cleanly with ghost-cli 1.1.1 and ghost 1.7.0. I have not seen any issues yet after the rebuild. I have the old VM still if there is anything you want me to test.

@triestpa
Copy link

triestpa commented Sep 1, 2017

Is there a fix for this yet? Ghost-CLI is broken on my server currently, it always shows that Ghost is stopped, even though Ghost is running. The only way to reboot the process currently is using ps aux | grep ghost and manually killing the process, which then automatically reboots itself.

Migrating to a new server and doing a clean install fixes this, but causes my blog to lose all of it's Disqus comments, not that's not a great option for me currently.

@acburdine
Copy link
Member

@triestpa not yet - I will work on implementing the fix (which is outlined in #463) this weekend.

@gcochard
Copy link

@triestpa A workaround is to add "running": "<environment>" to the .ghost-cli file in the ghost install directory, then it will once again query the process manager.

@hungys
Copy link

hungys commented Oct 27, 2017

Same issue here, and @gcochard 's workaround just works.

@skluthe
Copy link

skluthe commented Nov 7, 2017

Is a variable I should be replacing? I added it to my file and had no luck.

@elaine-jackson
Copy link

@skluthe I had the same issue I quite literally copied and pasted "running": "<environment>" into the file and restart worked fine.

@mheland
Copy link

mheland commented Dec 16, 2017

@gcochard confirmed, after a reboot on DigitalOcean VM the Ghost CLI does not find the running Ghost instance. Your fix works.

@aileen
Copy link
Member

aileen commented Jan 19, 2018

Closing this as it's a duplicate of #463
@kirrg001 Please reopen, if I'm wrong here.

@aileen aileen closed this as completed Jan 19, 2018
@kirrg001
Copy link
Contributor

It's not really a duplicate. #463 is a summary of the referenced issues. This issue is already referenced in #463 (and some more). I think it's fine to close all issues which are referenced in #463 and leave a comment "covered by #463" or similar 👍

@raulmar0
Copy link

Hey there, just for any newbie that bumps to the same issue. I was having this problem but it was just because I was executing ghost-cli commands from another user

@damirissimo
Copy link

damirissimo commented Mar 9, 2023

Hello there,

I'm running into the same issue. The ghost-cli seems like doesn't know about Ghost instance already running.
Performing tasks with user owning the ghost directory and scripts.

    Node Version: v18.14.2
    Ghost Version: 5.36.1
    Ghost-CLI Version: 1.24.0
    Environment: production
    Command: 'ghost backup'

Adding "running": "<environment>" to the .ghost-cli file in the ghost install directory** does not solve the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests