-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Fix issue with systemd "failed" state #761
Comments
Can't we just try to restart the blog with systemd if the status is failed? 🤔 I agree a clear error message would be helpful as well 👍 Other idea. Could we execute |
This is something we have to fix for CLI 1.9, i was running into this error today a couple of times while simulating a broken blog. |
Something like this works nice. If your systemd process is in a "failed" state it means that Ghost has failed to start up and you have received the error already. You should be able to try again. |
@kirrg001 that sounds like a perfect solution - I’ll work on testing that out this weekend |
@acburdine great 👍 :) |
closes TryGhost#761 - calls systemctl reset-failed when service is in failed state & returns false - improve error handling by looking at the stdout rather than the error message
closes #761 - calls systemctl reset-failed when service is in failed state & returns false - improve error handling by looking at the stdout rather than the error message
@acburdine There is another case. If you run |
I'll reopen this issue, because there are more cases. Will try to look into this tomorrow. |
Our bot has automatically marked this issue as stale because there has not been any activity here in some time. The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR. We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂 |
Summary
Right now, Ghost-CLI only has 2 options when it comes to determining the status of a Ghost instance: "running" and "not running". This has become problematic in the past, because systemd (which is used by default in production on Ubuntu) has the concept of a third state: "failed". This state occurs whenever the Ghost instance failed to start for a certain reason (e.g. a bad configuration file). Because of this, we currently throw an error when systemd is in state: "failed".
What I think we should do in the short term is fix the systemd process manager to output a more helpful error message (maybe auto-run
journalctl
to determine why it's in a failed state?) and maybe in the future refactor that particular part of the process manager to be able to handle that 3rd state more cleanly.The text was updated successfully, but these errors were encountered: