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

Can't execute shutdown command (Predefined Action [!SHUTDOWN]) #940

Closed
brtlzr opened this issue Aug 26, 2020 · 5 comments
Closed

Can't execute shutdown command (Predefined Action [!SHUTDOWN]) #940

brtlzr opened this issue Aug 26, 2020 · 5 comments
Assignees
Labels
support Something isn't working with the users setup

Comments

@brtlzr
Copy link

brtlzr commented Aug 26, 2020

The Predefined Action [!SHUTDOWN] does not work.
Following error message is shown:

Can't execute shutdown command
Http failure response from http://localhost:5000/api/system/commands/core/shutdown
403 Forbidden

To Reproduce
Edit the config.json file
I've replaced the KILL button with a power-off button with following code:
{ "icon": "power-off", "command": "[!SHUTDOWN]", "color": "#e84118", "confirm": true, "exit": false }
Saved and rebooted my Pi.
Clicking the power button gives the 403-error.

Expected behavior
Clicking the power button sends the shutdown command and the Pi shuts down.

General Information:

  • Raspberry Pi 3 Model B Rev 1.2
  • Octopi image Version 0.17.0
  • OctoDash Version v2.0
  • OctoPrint Version 1.4.2

Additional context
My Pi is powered with a buck converter to my printer's power supply. I want to do a clean shutdown of the Pi before powering off my printer.

@brtlzr brtlzr added the bug Something isn't working label Aug 26, 2020
@UnchartedBull
Copy link
Owner

Please check your OctoPrint ACL and whether you have setup the shutdown scripts correctly as outlined here: https://community.octoprint.org/t/setting-up-octoprint-on-a-raspberry-pi-running-raspbian/2337 (Support restart/shutdown through OctoPrint's system menu)

@UnchartedBull UnchartedBull added support Something isn't working with the users setup and removed bug Something isn't working labels Aug 31, 2020
@brtlzr
Copy link
Author

brtlzr commented Sep 2, 2020

Yes, I can shutdown/reboot the Pi through the Octoprint menu. I must say that all the stuff mentioned in the page you linked has been taken care of in the Octopi image.
One thing I am just thinking of... I made a dedicated user for OctoDash and use that user's API key. Could that be causing the problem?

@dexter323i
Copy link

@brtlzr That dedicated user must be in the Admins group. Operator is not enough for rebooting.

@UnchartedBull
Copy link
Owner

Probably what @dexter323i mentioned, please promote the OctoDash user to admin and try again.

@brtlzr
Copy link
Author

brtlzr commented Sep 15, 2020

I've just added the user to the admins group and that has fixed the issue.
Thanks for the support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Something isn't working with the users setup
Projects
None yet
Development

No branches or pull requests

3 participants