YunoHost tries to restart non-existing service for deleted app

Hi, every time there is a certificate renew I can see in the logs that YunoHost tries to restart a service that doesn’t exist for an app that I removed and as I understand :

024-04-16 06:27:07,970 DEBUG    yunohost.hook (unknown function) - [2217296.1] ++ basename ./50-mumbleserver
2024-04-16 06:27:07,973 DEBUG    yunohost.hook (unknown function) - [2217296.1] + app=50-mumbleserver
2024-04-16 06:27:07,973 DEBUG    yunohost.hook (unknown function) - [2217296.1] + app=mumbleserver
2024-04-16 06:27:07,974 DEBUG    yunohost.hook (unknown function) - [2217296.1] + systemctl restart mumbleserver
2024-04-16 06:27:07,997 WARNING  yunohost.hook (unknown function) - [2217296.1] Failed to restart mumbleserver.service: Unit mumbleserver.service not found.
2024-04-16 06:27:09,000 ERROR    yunohost.hook (unknown function) - [2217296.1] Could not run script: /etc/yunohost/hooks.d/post_cert_update/50-mumbleserver
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 298, in hook_callback
    hook_return = hook_exec(
  File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 416, in hook_exec
    raise YunohostError("hook_exec_failed", path=path)
yunohost.utils.error.YunohostError: Could not run script: /etc/yunohost/hooks.d/post_cert_update/50-mumbleserver

Any ideas on how to fix that?

Sorry, two questions, because you removed the support template:

  • Can you specify the YunoHost version?
  • Can you share the logs of the removal of mumbleserver?

It looks like the hook for mumbleserver was not removed upon its removal. You can fix this with sudo rm /etc/yunohost/hooks.d/post_cert_update/50-mumbleserver

I emphasize on the need for the logs, to check if that’s a bug on the app, the YunoHost core, or an oversight.

1 Like

Hi, sorry for removing the template, YunoHost version is 11.2.11.2 (stable), I have this issue for several months now, how can I find the logs of the removal of mumbleserver?

You should be able to find it in the webadmin, in Tools > Logs.

If it is too old for that, try in the command line: sudo ls /var/log/yunohost/categories/operation/*remove-mumbleserver*
Then share it with sudo yunohost share <path to the file you found>.log

retiolus@home:~ $ sudo ls /var/log/yunohost/categories/operation/*remove-mumbleserver*
ls: cannot access '/var/log/yunohost/categories/operation/*remove-mumbleserver*': No such file or directory

actually:

retiolus@home:~ $ sudo ls /var/log/yunohost/categories/operation/*remove*
ls: cannot access '/var/log/yunohost/categories/operation/*remove*': No such file or directory
retiolus@home:~ $ sudo ls /var/log/yunohost/categories/operation/*mumble*
ls: cannot access '/var/log/yunohost/categories/operation/*mumble*': No such file or directory

OK thanks anyways. :sweat_smile: I will try to replicate the issue.

Let me now if the rm command solved your issue.
By the way your title mentions renewing a certificate for a removed domain, but you only talk about the service thing.

Isn’t this about a certificate?

/etc/yunohost/hooks.d/post_cert_update/50-mumbleserver

And deleted the file, will see in next diagnosis :slight_smile:

1 Like

Oooh right. It means the 50-mumbleserver script will be run each time a certificate is renewed. :slight_smile: