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

Editing moonraker.conf with multi instance install tries to restart moonraker.service #177

Closed
ssendev opened this issue Mar 5, 2022 · 6 comments

Comments

@ssendev
Copy link

ssendev commented Mar 5, 2022

Linux Distribution

Debian Buster (Raspberry PI)

What happened

2022-03-05 19:14:14,728 [app.py:log_request()] - 201 POST /server/files/upload (192.168.44.46) [_TRUSTED_USER_] 13.61ms
2022-03-05 19:14:14,768 [base_events.py:default_exception_handler()] - Task exception was never retrieved
future: <Task finished name='Task-9330' coro=<Machine.do_service_action() done, defined at /home/pi/moonraker/moonraker/components/machine.py:159> exception=DBusError('Unit moonraker.service not found.')>
Traceback (most recent call last):
  File "/home/pi/moonraker/moonraker/components/machine.py", line 163, in do_service_action
    await self.sys_provider.do_service_action(action, service_name)
  File "/home/pi/moonraker/moonraker/components/machine.py", line 596, in do_service_action
    await mgr.call_restart_unit(                        # type: ignore
  File "/home/pi/moonraker-env/lib/python3.9/site-packages/dbus_next/aio/proxy_object.py", line 92, in method_fn
    BaseProxyInterface._check_method_return(msg, intr_method.out_signature)
  File "/home/pi/moonraker-env/lib/python3.9/site-packages/dbus_next/proxy_object.py", line 62, in _check_method_return
    raise DBusError._from_message(msg)
dbus_next.errors.DBusError: Unit moonraker.service not found.

What did you expect to happen

moonraker-1.service to restart

How to reproduce

Edit moonraker.conf on a multi instance installation and then hit "Save & Restart" in mainsail

Additional information

No response

@ssendev ssendev added the Type: Bug Something isn't working as expected label Mar 5, 2022
@dw-0 dw-0 removed the Type: Bug Something isn't working as expected label Mar 5, 2022
@dw-0
Copy link
Owner

dw-0 commented Mar 5, 2022

This is not a bug, this is "sadly" the way we have to deal with it currently. You have to restart the Moonraker services on your own via Mainsail's top right power menu.

@dw-0 dw-0 added the not kiauh label Mar 5, 2022
@ssendev
Copy link
Author

ssendev commented Mar 5, 2022

But changing printer.cfg restarts the correct klipper instance how does that work? and couldn't the same technique be used for moonraker?

If it's not solvable in kiauh where could it be solved?

@dw-0
Copy link
Owner

dw-0 commented Mar 5, 2022

But changing printer.cfg restarts the correct klipper instance how does that work?

Oh it does?
In that case, i have to check what is going on in Mainsail, and if it is something that has to be changed in Mainsail then.

@dw-0
Copy link
Owner

dw-0 commented Mar 5, 2022

Alright, i talked with @meteyou and we will integrate something in Mainsail to make this possible in a future update.
I'll keep you updated!

@dw-0
Copy link
Owner

dw-0 commented Mar 5, 2022

The feature will be included in the next Mainsail release: mainsail-crew/mainsail#700
It will be possible to specify which Moonraker instance can restart which Moonraker service, which will cover the requested case.

@dw-0 dw-0 closed this as completed Mar 5, 2022
@ssendev
Copy link
Author

ssendev commented Mar 6, 2022

Nice. Thanks for the quick response and fix.

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

No branches or pull requests

2 participants