Ticket #74 (closed defect: duplicate)
Hostname collisions not resolved on receiving HUP signal
| Reported by: | amk | Owned by: | lennart |
|---|---|---|---|
| Milestone: | Avahi 0.6.13 | Component: | avahi-daemon |
| Keywords: | Cc: |
Description
When I run 'avahi-daemon', on initially starting it changes service names to avoid collisions with other avahi servers. On receiving a 'killall -HUP', though, Avahi behaves differently and withdraws the records. (For our application, newly installed systems often come up with identical hostnames.)
avahi-daemon --version is 0.6.10 (the version included in Ubuntu Dapper).
How to replicate (once you have two machines which think they have the same hostname -- 'telestra' in this example):
Create a service file; ours is called durus.service:
<service-group>
<name replace-wildcards="yes">%h model database</name>
<service protocol="ipv4">
<type>_durus._tcp</type>
<port>2972</port> <txt-record>running=True</txt-record>
<txt-record>model=Aural_Cue</txt-record>
<txt-record>description=No description</txt-record>
<txt-record>xpoint-port=2000</txt-record>
</service></service-group>
Run avahi-daemon --debug; here's some relevant output:
... Registering HINFO record with values 'I686'/'LINUX'. Recieved conflicting record [telestra.local IN A 10.3.103.1 ; ttl=120] with local record to be. Withdrawing. ... Host name conflict, retrying with <telestra3> Registering new address record for 20.1.1.1 on eth2. Registering new address record for 192.168.100.254 on eth1. Registering new address record for 10.2.0.190 on eth0. Registering HINFO record with values 'I686'/'LINUX'. Server startup complete. Host name is telestra3.local. Local service cookie is 3042642544. Service "telestra3 model database" (/services/durus.service) successfully established. ...
Do 'killall -HUP avahi-daemon'.
The debug output is puzzling, and varies a bit. The most common is:
Got SIGHUP, reloading. write() failed: Broken pipe Failed to open /etc/resolv.conf: Broken pipe
I've also seen:
Got SIGHUP, reloading. chroot.c: chroot() helper got command 02
