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

/machine/shutdown doesnt shutdown the RPI anymore #398

Closed
kolbenhans opened this issue Mar 15, 2022 · 2 comments
Closed

/machine/shutdown doesnt shutdown the RPI anymore #398

kolbenhans opened this issue Mar 15, 2022 · 2 comments

Comments

@kolbenhans
Copy link

kolbenhans commented Mar 15, 2022

What happened

http POST /machine/shutdown doesnt shutdown the RPI anymore.

instead i receive the following Error:

{ "error": { "code": 405, "message": "Method Not Allowed", "traceback": "Traceback (most recent call last):\n\n File \"/home/pi/moonraker-env/lib/python3.7/site-packages/tornado/web.py\", line 1704, in _execute\n result = await result\n\n File \"/home/pi/moonraker/moonraker/app.py\", line 600, in get\n await self._process_http_request()\n\n File \"/home/pi/moonraker/moonraker/app.py\", line 630, in _process_http_request\n raise tornado.web.HTTPError(405)\n\ntornado.web.HTTPError: HTTP 405: Method Not Allowed\n" } }

I searched a bit and found the issue: #349 from january and tried to run the mentioned sh script:
~/moonraker/scripts/set-policykit-rules.sh

as well as the install script:
~/moonraker/scripts/install-moonraker.sh

i also did a reboot of the RPI but it still doesn't work.

Client

Mainsail

Browser

Chrome

How to reproduce

open http://-mainsail-os-ip-/machine/shutdown in Browser (Chrome, Firefox, Edge)

Additional information

No response

@kolbenhans kolbenhans added the bug Something isn't working label Mar 15, 2022
@Arksine Arksine removed the bug Something isn't working label Mar 15, 2022
@Arksine
Copy link
Owner

Arksine commented Mar 15, 2022

The /machine/shutdown endpoint requires a POST request. When you navigate via the browser it performs a GET http request.

You will need to use Mainsail, or another client, to initiate the shutdown. If there is a failure it will be logged in moonraker.log, which you can download and attach to this issue.

@kolbenhans
Copy link
Author

yeah okay, understand. I did it with a POST Http request by node red so far.
But today i replaced my mqtt query with a ultimate filter node that changed the "0" string coming from iobroker to a boolean false in the payload, this was causing the issue.

Now it's fixed.

Neverless, thanks for the hint and help.

@Arksine Arksine closed this as completed Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants