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

Closed
opened 2022-03-05 20:31:28 +01:00 by ssendev · 6 comments
ssendev commented 2022-03-05 20:31:28 +01:00 (Migrated from github.com)

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

### 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_
dw-0 commented 2022-03-05 20:34:49 +01:00 (Migrated from github.com)

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.

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.
ssendev commented 2022-03-05 21:16:40 +01:00 (Migrated from github.com)

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?

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 commented 2022-03-05 21:24:56 +01:00 (Migrated from github.com)

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.

> 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 commented 2022-03-05 22:36:47 +01:00 (Migrated from github.com)

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!

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 commented 2022-03-06 00:53:07 +01:00 (Migrated from github.com)

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

The feature will be included in the next Mainsail release: https://github.com/mainsail-crew/mainsail/pull/700 It will be possible to specify which Moonraker instance can restart which Moonraker service, which will cover the requested case.
ssendev commented 2022-03-06 14:14:52 +01:00 (Migrated from github.com)

Nice. Thanks for the quick response and fix.

Nice. Thanks for the quick response and fix.
Sign in to join this conversation.