Avahi services are not updated

Bug #586229 reported by Takkat
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Expected behaviour:

Avahi-daemon discovers services when they become available in the net. When a service stops it is removed from the list of services and .local devices are no longer resolved by avahi.

What happens instead:

Avahi-daemon discovers new services only after performing a manual restart by typing 'sudo restart avahi-daemon'. Once a discovered service is stopped and thus no longer available on the net it is still resolved with a .local device name to other applications.

How to reproduce:

1. Boot the computer without the external local device (here an Apple AirportExpress) running.
2. Switch on the external local device and wait until ping to this device is possible.
3. Avahi does not resolve the .local name.
4. Type 'sudo restart avahi-daemon' in a terminal.
5. The local device will be recognized and a .local name will be resolved.
6. Switch off the device.
7. The .local name will still be resolved from the non-existent device.
8. When typing 'sudo restart avahi-daemon' again, the device disappears.
9. Switch on the external device, and then it will be discovered automatically as should
10. Switch off the external device and unfortunately it is still there.

Maybe this bug is also related to bug #116984.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: avahi-daemon 0.6.25-1ubuntu6
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
Architecture: amd64
Date: Thu May 27 10:08:32 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcEnviron:
 LANG=de_DE.utf8
 SHELL=/bin/bash
SourcePackage: avahi

Revision history for this message
Takkat (takkat-nebuk) wrote :
Revision history for this message
Anakin Starkiller (sunrider) wrote :

Same thing here...

Revision history for this message
Anakin Starkiller (sunrider) wrote :

This bug should have been marked as confirmed for a long time....
See https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/116984

Revision history for this message
Takkat (takkat-nebuk) wrote :

@anakin: thank you for for your comment. If you are able to confirm this bug, why not mark it as such? I've set up my system to not using Avahi any more (however still installed because of dependencies).

Revision history for this message
Anakin Starkiller (sunrider) wrote :

Takkat > done ;)

Changed in avahi (Ubuntu):
status: New → Confirmed
Revision history for this message
Anakin Starkiller (sunrider) wrote :

There has been an update today for avahi...and I can't reproduce this bug anymore...Takkat > can you confirm ?

Revision history for this message
Takkat (takkat-nebuk) wrote :

Here is still 2.6.25 on Lucid. I cannot reproduce an update. However I did not try Maverick/Avahi 2.6.27 so far. From the changelogs (if any) I didn't see anything related to this admittedly unrecognised bug.

Revision history for this message
Anakin Starkiller (sunrider) wrote :

Something very interesting I've just found out...
When I start the computer but do not login to a session...the computer is visible from avahi client
When a user is connected...it is not visible anymore.
So the problem is during gnome startup I guess.

Revision history for this message
Takkat (takkat-nebuk) wrote :

today's update to 2.6.25-1ubuntu6.1 as expected with no success: bug is very present still. Device names are resolved as long as I manually restart avahi-daemon - even if the device has long gone.

Revision history for this message
Anakin Starkiller (sunrider) wrote :

Takkat >> and if you don't open any X session...?

Revision history for this message
Takkat (takkat-nebuk) wrote :

Bug still present in a fresh install of ubuntu 10.10..

Revision history for this message
Ivan X (ivanxqz) wrote :

I have seen this bug in a fresh install of 10.04.1 LTS server edition in the boot console, so I don't think it would be related to any X session.

I have worked around it by making a script called avahi-daemon-restart in /etc/init.d, which consists solely of "sleep 5; restart avahi-daemon". I then used "sudo update-rc.d avahi-daemon-restart defaults" to activate it at startup. (I am not really a Linux pro, so I don't know if this is the most optimal way of doing this, but it worked for me.)

This bug is instantaneously visible if you run it inside VirtualBox (or presumably another virtualizer) under a Mac OS X host. The Mac OS X Finder will show the appearance of the Ubuntu guest as soon as avahi-daemon is restarted, and it vanishes as soon as you shut down the VM.

Revision history for this message
Takkat (takkat-nebuk) wrote :

MacOS should work fine with Bonjour (which is not Avahi). Thanks @Ivan for your workaround. That was ok for me too in respect of initial startup but it does not resolve the IMHO quite serious issue when Avahi still resolves names of devices that are no longer present. I wonder, why so few people seem to be affected.

Revision history for this message
Takkat (takkat-nebuk) wrote :

When thinking of filing an upstream ticket I came across these:

http://avahi.org/ticket/280
http://avahi.org/ticket/229

where it is made clear that Avahi cannot see vanishing services if they don't send a proper good-bye. Won't fix, of course. IMHO however the default time-out for inactive services to disappear seems to be rather long.

Revision history for this message
Anakin Starkiller (sunrider) wrote :

avahi daemon is started with upstart...As upstart was introduced recently and I was not able to reproduce this bug under Karmic...it might be related. Look at the /etc/init/avahi-daemon.conf file ;) I'm not familiar with upstart so I can't see anything that might cause this issue...but I'll investigate this further ;)

Revision history for this message
Takkat (takkat-nebuk) wrote :

Here, issue exists in Karmic, Lucid Maverick as well, didn't use Avahi in Jaunty so I don't know.

Revision history for this message
Anakin Starkiller (sunrider) wrote :

Takkat >> I may have found another lead on this issue....try to add a txt-record to your service file, like this :

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">/home</name>
<service>
<type>_sftp-ssh._tcp</type>
<port>22</port>
<txt-record>path=/home/</txt-record>
</service>
</service-group>

Changed in avahi (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.