paukstelis / octoprint_deploy

Bash script for rapid deployment of multiple octoprint instance on a single machine
MIT License
416 stars 40 forks source link

Restart Fails from menu #66

Closed reuter closed 1 year ago

reuter commented 1 year ago

I only have 1 instance installed, but when I try to restart that instance using the Octoprint menu, it fails, and I get the following in the logs

2023-03-02 19:19:23,700 - octoprint.server.api.system - INFO - Performing command for core:reboot: sudo shutdown -r now 2023-03-02 19:19:24,217 - octoprint.server.api.system - WARNING - Command for core:reboot failed with return code 1: ! ! STDOUT: ! ! ! STDERR: ! sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper ! ! sudo: a password is required

paukstelis commented 1 year ago

That command is not to restart the instance, but to restart the host. You can change the command in octoprint to sudo reboot which does the same thing.

reuter commented 1 year ago

Seems like even the restart instance doesn't work either.

2023-03-02 19:41:32,244 - octoprint.server.api.system - INFO - Performing command for core:restart: sudo service octoprint restart 2023-03-02 19:41:32,755 - octoprint.server.api.system - WARNING - Command for core:restart failed with return code 1: ! ! STDOUT: ! ! ! STDERR: ! sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper ! ! sudo: a password is required

paukstelis commented 1 year ago

I have a feeling that you restored some backup over the instance you created with the script, as neither of those commands will be used as part of octoprint_deploy.

reuter commented 1 year ago

that could be. I did a settings import from my rpi server!!

reuter commented 1 year ago

So what should these be then?

image

paukstelis commented 1 year ago

So what should these be then?

image

sudo systemctl restart yourinstancename sudo reboot sudo shutdown now

reuter commented 1 year ago

That did it! Thank you!!