[SOLVED] Yunomdns service failed to start after system update

My YunoHost server

Hardware: local VMWare VM
YunoHost version: 4.0.3 installed / 4.3.3 updated
**I have access to my server : through the webadmin and direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I have run into a bit of trouble after running the update from the admin panel. I think that this was the first update run since the original 4.0.3 version install. The web interface indicates the version now 4.3.3. yunomdns service stopped working after the update. I can still access the admin panel by typing the local IP address but because all the apps are secured through the .local routes they are unavailable to me at the moment (I think).

Here is the log. I have tried restarting the whole VM and restarting the mdns service from services list and got the same result.

I have also tried to find some info on the web, based on the specific rows from the log, but could not find anything related. I understand that it is trying to register something that is already there, so I am hoping that there is a quick solution like, delete that, and it will go through. Unfortunately, I am not very familiar with Linux under the hood, so I am unable to solve it on my own.

Please help
Thank you.

Hello, and welcome!

I suspect the yunomdns script did not get updated, somehow. Can you share its content with the following command in the CLI?

cat /usr/bin/yunomdns | yunopaste

Hello, thank you, and thank you for the replay.

Here is the paste.

Could it be that you added yunohost.local as a domain on your server ? (Like, is it listed in the webadmin in the “Domains” section ?)

Yes, it is in the list on the domains page. Should it not be there?
It is listed as only one and default domain and it page states that it cannot be removed

I guess you should be able to, but we didn’t think of that even though now that you mention it it’s obvious haha :sweat_smile:

So basically the code tries to publish two times yunohost.local (because it’s always added by convenience) and the code miserably crashes complaining that yunohost.local is already published

The code should be easily fixable tho :wink:

You are saying that I found a bug?

I thought that the source of the problem was an error on my part.

How do I fix it now?

I am not too familiar with python, but it should be not too complicated to either unregister if registered and then register again or just simply jump over that statement if the registration already exists.

Solved!

After rereading the last comment I got an idea. So, I created a yuno.local domain. Unfortunately, I was not allowed to delete the old domain with apps still on it. So, I moved all the apps to the new domain, minus Motomo which does not have domain change implemented, and Monica which errored out two times with the same error on trying to change the domain. Then I uninstalled those two and deleted the old domain. After that, every other app is working fin on the new domain.

But, still, it would have been much easier if there was a “try” clause or “ifExists” function at an appropriate place in the code.

Is there a solution or workaround for people using yunohost.local as their only domain?

I had the same issue, only the yunohost.local domain to work on and was using an app (kresus) that does not handle domain change.
I worked around it by editing /usr/bin/yunomdns as root and change line 152 from:

zc.register_service(info, allow_name_change=True, cooperating_responders=True)

to:

try:
    zc.register_service(info, allow_name_change=True, cooperating_responders=True)
except:
    pass

Then I restarted the service with sudo systemctl restart yunomdns and checked that it went well with sudo systemctl status yunomdns.

But I’m not intimate with yunohost (yet) and this is a dirty trick. Please keep that in mind.

Thank you very much for your help.
With the update to Yunohost 4.3.4.1 today yunomdns is running again :slightly_smiling_face:

2 Likes