When ISP changes dynamic IP address avahi-daemon changes Zeroconf host name

Bug #1091645 reported by Till Kamppeter on 2012-12-18
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Critical
Unassigned

Bug Description

I have a home network with several Ubuntu and one Mac OS X machine. Internet access is via VDSL with dynamic IP addresses, amd the ISP changes the IP address every night, around 4am. ISP is Deutsche Telekom in Germany. On my Ubuntu (Quantal) machines, connecting to the network only via ethernet (wired, W-Fi connection turned off on the machines, due to bug 1083565) avahi-daemon sometimes switches the Zeroconf hostname from the originally given one (like "till-hp") to a name with an added number, (like "till-hp-2"). This happens on the nightly IP address change as the attached syslog shows. Problem is that on clients I cannot refer to the Zeroconf names as they can change on the next day. If I restart avahi-daemon during the day the Zeroconf name gets reset to the original.

It is possible that bug 1083565 is this one in reality, but I am not absolutely sure.

As BonJour replaces the IPP-based CUPS broadcasting for printer discovery from CUPS 1.6.x on, avahi must be made more reliable.

Also Zeroconf as replacement for DNS on the local network, to avoid the need that home users have to register host names on the router, need a reliable Avahi in term of the Zeroconf host names.

In the attached syslog, aroung 4:18am the following appears (machine set up with "till-hp" as host name):

----------
Dec 17 04:09:41 till-hp avahi-daemon[822]: Registering new address record for 2002:5ddb:9586:0:7c4d:f18c:29e3:8b33 on eth0.*.
Dec 17 04:09:42 till-hp NetworkManager[853]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv6 routing and DNS.
Dec 17 04:09:43 till-hp avahi-daemon[822]: Withdrawing address record for 2002:5ddb:9586:0:e0b8:4178:444a:af6c on eth0.
Dec 17 04:17:01 till-hp CRON[3993]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Dec 17 04:18:45 till-hp avahi-daemon[822]: Withdrawing address record for 2002:5ddb:9586:0:7c4d:f18c:29e3:8b33 on eth0.
Dec 17 04:18:45 till-hp avahi-daemon[822]: Registering new address record for 2002:5ddb:9586:0:7c4d:f18c:29e3:8b33 on eth0.*.
Dec 17 04:18:45 till-hp avahi-daemon[822]: Registering new address record for 2002:5ddb:9586:0:e0b8:4178:444a:af6c on eth0.*.
Dec 17 04:18:45 till-hp avahi-daemon[822]: Registering new address record for fe80::20f:b0ff:fe6e:a460 on eth0.*.
Dec 17 04:18:46 till-hp NetworkManager[853]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv6 routing and DNS.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Registering new address record for fd00::20f:b0ff:fe6e:a460 on eth0.*.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing address record for 2002:5ddb:9586:0:7c4d:f18c:29e3:8b33 on eth0.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing address record for 2002:5ddb:9586:0:e0b8:4178:444a:af6c on eth0.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing address record for 2002:5ddb:9586:0:20f:b0ff:fe6e:a460 on eth0.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing address record for fe80::20f:b0ff:fe6e:a460 on eth0.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing workstation service for eth1.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing address record for 192.168.178.34 on eth0.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing workstation service for eth0.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Withdrawing workstation service for lo.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Host name conflict, retrying with till-hp-2
Dec 17 04:18:46 till-hp avahi-daemon[822]: Registering new address record for fd00::20f:b0ff:fe6e:a460 on eth0.*.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Registering new address record for 192.168.178.34 on eth0.IPv4.
Dec 17 04:18:46 till-hp avahi-daemon[822]: Registering HINFO record with values 'I686'/'LINUX'.
Dec 17 04:18:47 till-hp avahi-daemon[822]: Registering new address record for fd00::7c4d:f18c:29e3:8b33 on eth0.*.
Dec 17 04:18:47 till-hp avahi-daemon[822]: Leaving mDNS multicast group on interface eth0.IPv6 with address 2002:5ddb:9586:0:e0b8:4178:444a:af6c.
Dec 17 04:18:47 till-hp avahi-daemon[822]: Joining mDNS multicast group on interface eth0.IPv6 with address fd00::7c4d:f18c:29e3:8b33.
Dec 17 04:18:47 till-hp avahi-daemon[822]: Withdrawing address record for fd00::7c4d:f18c:29e3:8b33 on eth0.
Dec 17 04:18:47 till-hp avahi-daemon[822]: Registering new address record for fd00::7c4d:f18c:29e3:8b33 on eth0.*.
Dec 17 04:18:47 till-hp avahi-daemon[822]: Registering new address record for 2002:5ddb:9586:0:20f:b0ff:fe6e:a460 on eth0.*.
Dec 17 04:18:47 till-hp avahi-daemon[822]: Registering new address record for fe80::20f:b0ff:fe6e:a460 on eth0.*.
Dec 17 04:18:48 till-hp NetworkManager[853]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv6 routing and DNS.
Dec 17 04:18:49 till-hp avahi-daemon[822]: Registering new address record for 2002:5ddb:91de:0:20f:b0ff:fe6e:a460 on eth0.*.
Dec 17 04:18:49 till-hp avahi-daemon[822]: Withdrawing address record for fd00::7c4d:f18c:29e3:8b33 on eth0.
Dec 17 04:18:49 till-hp avahi-daemon[822]: Withdrawing address record for fd00::20f:b0ff:fe6e:a460 on eth0.
Dec 17 04:18:49 till-hp avahi-daemon[822]: Withdrawing address record for 2002:5ddb:9586:0:20f:b0ff:fe6e:a460 on eth0.
Dec 17 04:18:49 till-hp avahi-daemon[822]: Withdrawing address record for fe80::20f:b0ff:fe6e:a460 on eth0.
Dec 17 04:18:49 till-hp avahi-daemon[822]: Registering new address record for 2002:5ddb:91de:0:7c4d:f18c:29e3:8b33 on eth0.*.
Dec 17 04:18:50 till-hp avahi-daemon[822]: Server startup complete. Host name is till-hp-2.local. Local service cookie is 296843173.
Dec 17 04:18:51 till-hp avahi-daemon[822]: Service "till-hp-2" (/services/udisks.service) successfully established.
Dec 17 04:28:26 till-hp avahi-daemon[822]: Leaving mDNS multicast group on interface eth0.IPv6 with address fd00::7c4d:f18c:29e3:8b33.
Dec 17 04:28:26 till-hp avahi-daemon[822]: Joining mDNS multicast group on interface eth0.IPv6 with address 2002:5ddb:91de:0:7c4d:f18c:29e3:8b33.
Dec 17 04:28:27 till-hp NetworkManager[853]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv6 routing and DNS.
----------

Till Kamppeter (till-kamppeter) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in avahi (Ubuntu):
status: New → Confirmed
psamuel (persaudsamuel) wrote :

Este bug no es este mismo que esta aca registrado https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1083565

Possible workaround may be to explicitly set the "host-name" in "avahi-daemon.conf"

ref: "man avahi-daemon.conf"

Ugh, previous workaround suggestion does not work for me.

Carlos Luna (caralu1974) wrote :
Download full text (10.1 KiB)

I`m running Ubuntu 12.04 updated till today (09 may 2014 ) and aswell Debian Testing with KDE updated and I have the same trouble the network is not working after a 30 o 45 minutes; I can not restart the network so if I wanna have the network running well I must restart the machine and the modem.

Syslog:
May 9 16:44:10 pcdebian kernel: [ 2071.820186] via-rhine 0000:00:12.0 eth0: Transmit timed out, status 1003, PHY status 786d, resetting...
May 9 16:44:20 pcdebian kernel: [ 2081.820185] via-rhine 0000:00:12.0 eth0: Transmit timed out, status 1003, PHY status 786d, resetting...
May 9 17:00:16 pcdebian kernel: [ 3037.820197] via-rhine 0000:00:12.0 eth0: Transmit timed out, status 1003, PHY status 786d, resetting...

Kern.log:
May 6 12:35:48 pcdebian kernel: [ 1383.808509] via-rhine 0000:00:12.0 eth0: Transmit timed out, status 1003, PHY status 786d, resetting...
May 6 13:26:54 pcdebian kernel: [ 0.822714] via_rhine: v1.10-LK1.5.1 2010-10-09 Written by Donald Becker
May 6 13:26:54 pcdebian kernel: [ 0.823126] via-rhine 0000:00:12.0 eth0: VIA Rhine II at 0x1f200, 00:19:db:a0:d6:13, IRQ 23
May 6 13:26:54 pcdebian kernel: [ 0.823905] via-rhine 0000:00:12.0 eth0: MII PHY found at address 1, status 0x786d advertising 01e1 Link 45e1
May 6 13:37:07 pcdebian kernel: [ 625.820368] via-rhine 0000:00:12.0 eth0: Transmit timed out, status 1003, PHY status 786d, resetting...
May 6 13:37:17 pcdebian kernel: [ 635.820197] via-rhine 0000:00:12.0 eth0: Transmit timed out, status 1003, PHY status 786d, resetting...

Ubuntu kern.log
May 5 19:28:54 caralu74 kernel: [ 451.136479] device eth0 left promiscuous mode
May 5 19:29:01 caralu74 kernel: [ 458.572040] device eth0 entered promiscuous mode
May 5 19:36:50 caralu74 kernel: [ 926.820645] via-rhine 0000:00:12.0: eth0: Transmit timed out, status 1003, PHY status 786d, resetting...
May 5 19:36:50 caralu74 kernel: [ 926.821393] via-rhine 0000:00:12.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
May 5 19:36:54 caralu74 kernel: [ 930.820180] via-rhine 0000:00:12.0: eth0: Transmit timed out, status 1003, PHY status 786d, resetting...
May 9 16:00:02 caralu74 kernel: [ 5408.820181] via-rhine 0000:00:12.0: eth0: Transmit timed out, status 1003, PHY status 786d, resetting...

##########################
And this could be useful:
May 6 16:13:53 caralu74 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
May 6 16:13:58 caralu74 NetworkManager[1568]: <warn> (eth0): DHCPv4 request timed out.
May 6 16:13:58 caralu74 NetworkManager[1568]: <info> (eth0): canceled DHCP transaction, DHCP client pid 2876
May 6 16:13:58 caralu74 NetworkManager[1568]: <info> Activation (eth0) Stage 4 of 5 (IPv4 Configure Timeout) scheduled...
May 6 16:13:58 caralu74 NetworkManager[1568]: <info> Activation (eth0) Stage 4 of 5 (IPv4 Configure Timeout) started...
May 6 16:13:58 caralu74 NetworkManager[1568]: <info> (eth0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
May 6 16:13:58 caralu74 NetworkManager[1568]: <warn> Activation (eth0) failed.
May 6 16:13:58 caralu74 NetworkManager[1568]: <info> Activation (eth0) Stage 4 of 5 (IPv4 Configure Timeout) complete.
May 6 16:13:58 caralu74 NetworkMan...

Till Kamppeter (till-kamppeter) wrote :

Problem still persists.

Till Kamppeter (till-kamppeter) wrote :

Bug 831022 is a similar problem.

Malin (malinhidro) wrote :

Can you try removing write permissions from /etc/hostname ?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments