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 update tries to restart Ghost #481

Closed
1 of 2 tasks
ePirat opened this issue Sep 20, 2017 · 7 comments · Fixed by #550
Closed
1 of 2 tasks

ghost update tries to restart Ghost #481

ePirat opened this issue Sep 20, 2017 · 7 comments · Fixed by #550

Comments

@ePirat
Copy link

ePirat commented Sep 20, 2017

This issue is a

  • Bug Report
  • Feature Request

Summary

Currently there seems no way to use ghost update without it trying to restart ghost.
In my setup this can't work as ghost cli does not correctly work with systemd on debian (neither do I want it to mess around with it anyway, but manage it all myself)

Therefore an option like for ghost install, which has (--no-start), would be really useful for ghost update too.

@acburdine
Copy link
Member

My initial response is to say build a ghost-cli extension so that ghost start/ghost stop can integrate with whatever process manager you're using.

However, this isn't a bad idea - I'll work on implementing it and getting it into the next version 😄

@mertcangokgoz
Copy link

Hello

i use systemd based ghost service but every update command error this and this section needs to be automated

Message: Port '2368' is in use.
Configuration Key(s): server.port
Current Value(s): 2368

why it is not automatic this systemctl restart ghost_site.service

full log

root@local:/var/www/ghost# ghost update
✔ Checking for latest Ghost version
✔ Downloading and updating Ghost to v1.9.1
ℹ Stopping Ghost [skipped]
✔ Linking latest Ghost and recording versions
Running sudo command: -E -u ghost /usr/lib/node_modules/ghost-cli/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/ghost/current
[2017-09-26 17:45:56] INFO Finished database migration!
✔ Running database migrations
✖ Validating config
✖ Restarting Ghost
A ConfigError occurred.

Error detected in the production configuration.

Message: Port '2368' is in use.
Configuration Key(s): server.port
Current Value(s): 2368

Help: Run `ghost config <key> <new value>` for each key to fix the issue.


Debug Information:
    Node Version: v6.11.3
    Ghost-CLI Version: 1.1.1
    Environment: production
    Command: 'ghost update'

Please refer to https://docs.ghost.org/v1/docs/troubleshooting#section-cli-errors for troubleshooting.
root@local:/var/www/ghost# systemctl restart ghost_mertcangokgoz-com.service

@avinzheng
Copy link

I meet the same problem on CentOS 7 with Ghost-CLI v1.2.0

[root@web ghost]# ghost -v
Ghost-CLI version: 1.2.0
Ghost Version (at /home/www/ghost): 1.16.0
[root@web ghost]# ghost update
Process manager 'systemd' will not run on this system, defaulting to 'local'
✔ Checking for latest Ghost version
✔ Downloading and updating Ghost to v1.17.0
ℹ Stopping Ghost [skipped]
✔ Linking latest Ghost and recording versions
Running sudo command: /usr/local/share/.config/yarn/global/node_modules/ghost-cli/node_modules/.bin/knex-migrator-migrate --init --mgpath /home/www/ghost/current
✔ Running database migrations
✖ Validating config
✖ Restarting Ghost
A ConfigError occurred.

Error detected in the production configuration.

Message: Port '2368' is in use.
Configuration Key(s): server.port
Current Value(s): 2368

Help: Run `ghost config <key> <new value>` for each key to fix the issue.


Debug Information:
    Node Version: v6.11.5
    Ghost-CLI Version: 1.2.0
    Environment: production
    Command: 'ghost update'

Please refer to https://docs.ghost.org/v1/docs/troubleshooting#section-cli-errors for troubleshooting.
[root@web ghost]# ghost stop
A SystemError occurred.

Message: No running Ghost instance found here.

Debug Information:
    Node Version: v6.11.5
    Ghost-CLI Version: 1.2.0
    Environment: production
    Command: 'ghost stop'

Please refer to https://docs.ghost.org/v1/docs/troubleshooting#section-cli-errors for troubleshooting.

@abhinavdasin
Copy link

Atlast Ghost-Cli is updated and ssl issues are fixed at promptly, wishes to the team who put this effort to bring best experiences to ghost users.

acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Nov 20, 2017
closes TryGhost#481
- add a --no-restart option to the update command that skips the restart task
acburdine added a commit that referenced this issue Nov 20, 2017
closes #481
- add a --no-restart option to the update command that skips the restart task
@acburdine
Copy link
Member

Added a --no-restart option to ghost update that will be released with the next version 👍

@ePirat
Copy link
Author

ePirat commented Apr 17, 2018

Thanks!

@ePirat
Copy link
Author

ePirat commented Apr 18, 2018

So I've just tried that and it does not really behave as I would expect… I get:

Running sudo command: systemctl is-active ghost_foo

It should not do that, IMHO, when I supply no-restart, as I want to handle all of that myself, ghost-cli should not try to talk to what it thinks is the service manager that I use, but instead let me take care of starting/stopping ghost.

I get ghost-cli tries to automate all the things but it would be great if I could manage the whole service stuff myself, please. (I do not want to write my own ghost-cli extension to make it integrate with the way I manage my services)

Update: Nevermind! My config still had the line stating I am using systemd, after removing it, it does not try to use systemctl anymore! Thanks!

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

Successfully merging a pull request may close this issue.

5 participants