Service yunomdns is broken

Hello world !

My YunoHost server

Hardware: Private distant server (x86-64)
YunoHost version: 4.3.6.2
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: : GeoIP blacklist for nginx, webmin stopped and ssh allowed to only one unprivileged user. I think thos changes are not related to the present issue.

Description of my issue

I get the following error message since the 10 march 2022, after the security update of the following packages :

  • linux-image-4.19.0.19-amd64 → 4.19.232-1
  • linux-image-amd64 → 4.19+105+deb10u14
  • linux-libc-dev → 4.19.232-1
=================================
Services status check (services)
=================================

[ERROR] Service yunomdns is failed :(
  - You can try to restart the service, and if it doesn't work, have a look at the service logs in the webadmin (from the command line, you can do this with 'yunohost service restart yunomdns' and 'yunohost service log yunomdns').
root@xxx:~# yunohost service restart yunomdns
Success! Service 'yunomdns' restarted
root@xxx:~# yunohost service log yunomdns
journalctl:
  - -- Logs begin at Sat 2022-03-12 01:39:02 CET, end at Sun 2022-03-13 12:46:13 CET. --
  - Mar 13 00:39:54 systemd[1]: Started YunoHost mDNS service.
  - Mar 13 00:39:54 yunomdns[28854]: Traceback (most recent call last):
  - Mar 13 00:39:54 yunomdns[28854]:   File "/usr/bin/yunomdns", line 170, in <module>
  - Mar 13 00:39:54 yunomdns[28854]:     sys.exit(0 if main() else 1)
  - Mar 13 00:39:54 yunomdns[28854]:   File "/usr/bin/yunomdns", line 57, in main
  - Mar 13 00:39:54 yunomdns[28854]:     with open("/etc/yunohost/mdns.yml", "r") as f:
  - Mar 13 00:39:54 yunomdns[28854]: PermissionError: [Errno 13] Permission denied: '/etc/yunohost/mdns.yml'
  - Mar 13 00:39:54 systemd[1]: yunomdns.service: Main process exited, code=exited, status=1/FAILURE
  - Mar 13 00:39:54 systemd[1]: yunomdns.service: Failed with result 'exit-code'.
  - Mar 13 12:46:13 systemd[1]: Started YunoHost mDNS service.
  - Mar 13 12:46:13 yunomdns[22628]: Traceback (most recent call last):
  - Mar 13 12:46:13 yunomdns[22628]:   File "/usr/bin/yunomdns", line 170, in <module>
  - Mar 13 12:46:13 yunomdns[22628]:     sys.exit(0 if main() else 1)
  - Mar 13 12:46:13 yunomdns[22628]:   File "/usr/bin/yunomdns", line 57, in main
  - Mar 13 12:46:13 yunomdns[22628]:     with open("/etc/yunohost/mdns.yml", "r") as f:
  - Mar 13 12:46:13 yunomdns[22628]: PermissionError: [Errno 13] Permission denied: '/etc/yunohost/mdns.yml'
  - Mar 13 12:46:13 systemd[1]: yunomdns.service: Main process exited, code=exited, status=1/FAILURE
  - Mar 13 12:46:13 systemd[1]: yunomdns.service: Failed with result 'exit-code'.

The file seems to be owned by root :

root@xxx:~# ls -l /etc/yunohost/mdns.yml
-rw------- 1 root root 30 Nov  6 11:43 /etc/yunohost/mdns.yml
root@xxx:~# yunohost service status yunomdns
configuration: unknown
description: Allows you to reach your server using 'yunohost.local' in your local network
last_state_change: 2022-03-13 12:46:13
start_on_boot: enabled
status: failed

As my server is distant, I can’t access it using local network. Can i safely disable the service ?

Hi @Kit ,
Did you resolve this problem? I have the same error after the same update, but in my case yunohost is not distant but at home.
Edit: a chmod o+r resolve the problem but i don’t know if it was the permissions before the upgrade.

Could anyone give us the permissions for this file before the upgrade please?

I just shutdowned the service, waiting for the fix (which doesn’t change anything, as the service was already failed).

Edit : If I understand correctly, you allowed all users to read the file. Imho, system file should only be used by the root user.

I delete the file and i force a regen_conf of mdns. the problem is indeed linked to rights:

mv /etc/yunohost/mdns.yml /etc/yunohost/mdns.yml.old
yunohost tools regen-conf mdns --force
ls -la /etc/yunohost/mdns.yml
-rw-r--r-- 1 mdns mdns 30 Mar 14 14:20 /etc/yunohost/mdns.yml

Now, you can restart the yunomdns service and delete /etc/yunohost/mdns.yml.old if all is allright.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.