Closed fnoop closed 4 years ago
This only seems to happen on raspberry. reflectors are all turned off, other maverick installs on the same network work fine without conflicts. Only a single (wifi) interface is active on the rpi. ipv6 is disabled for avahi.
Think this is a local issue with a conflicting record, not a wider problem.
Ah no, @SamuelDudley this is caused by the new zeroconf in visiond. If you stop visiond, avahi gets a hostname conflict when starting up, stop visiond and it goes away.
Sigh. Do you think setting this to True could help? https://github.com/jstasiak/python-zeroconf/blob/master/zeroconf/__init__.py#L2204
The odd thing is -api doesn't seem to cause the problem, just visiond.
Hmm perhaps keeping the thread alive in visiond is the problem..? It’s really the only difference.
Perhaps keeping self.zeroconf() alive by keeping the class instance alive is enough?
If it's not kept alive in -api, how does -api respond to the mdns requests?
That is a good question! The self.zerconf() object is kept alive by the module instance in -api but there is no seperate thread. Pretty sure self.zeroconf() makes its own threads and starts them so as long as the containing object is alive it will respond to mdns requests.
Edit: it really shouldn't matter we have that thread alive in visiond... This sounds like a morning problem for me :)
Are the logs posted from the system journal? Should my pi have the same problem to reproduce? I'll check tomorrow morning.
Oh no, this is happening with -api instances as well. For some reason sometimes it conflicts with avahi and forces it to make up a different hostname. Stopping all -api instances allows avahi to startup as expected. Related: https://github.com/goodrobots/visiond/issues/21
Removing the ServiceInfo.server property seems to fix this problem: https://github.com/goodrobots/maverick-api/commit/80181708cf3129ebd1d09a5b0db42ce969651911
Fixed in visiond as well: https://github.com/goodrobots/visiond/commit/6ddf8b526eb99c3a4b5e86910c41653a0f8393d7
Just need to fix warning caused by -discovery: https://github.com/goodrobots/maverick-discovery/issues/3
Think we're good with avahi now.