Ubuntu 14.04 LTS 上的主机名与 avahi 守护进程冲突

Ubuntu 14.04 LTS 上的主机名与 avahi 守护进程冲突

我有两台虚拟机在 Virtualbox 上运行 Ubunut 14.04。它们通过 VIP 连接。节点 1 上的 Syslog 显示 Avahi 重复出现的错误消息,我找不到问题或解决方案。

尾部/var/log/syslog

Aug 18 09:15:16 localhost avahi-daemon[902]: Host name conflict, retrying with node1-47
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for fe80::a00:27ff:fef0:2b00 on eth2.*.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 192.168.0.59 on eth2.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for fe80::a00:27ff:fe01:2f25 on eth1.*.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 10.0.0.121 on eth1.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 10.0.0.120 on eth1.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for fe80::a00:27ff:fe60:7f89 on eth0.*.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 10.0.0.10 on eth0.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 192.168.56.151 on eth0.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 192.168.56.150 on eth0.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 192.168.56.121 on eth0.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering new address record for 192.168.56.120 on eth0.IPv4.
Aug 18 09:15:16 localhost avahi-daemon[902]: Registering HINFO record with values 'X86_64'/'LINUX'.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for fe80::a00:27ff:fef0:2b00 on eth2.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for 192.168.0.59 on eth2.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for fe80::a00:27ff:fe01:2f25 on eth1.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for 10.0.0.121 on eth1.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for 10.0.0.120 on eth1.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for fe80::a00:27ff:fe60:7f89 on eth0.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for 10.0.0.10 on eth0.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for 192.168.56.150 on eth0.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for 192.168.56.121 on eth0.
Aug 18 09:15:36 localhost avahi-daemon[902]: Withdrawing address record for 192.168.56.120 on eth0.

节点1:〜$ ifconfig -a

 eth0      Link encap:Ethernet  HWaddr 08:00:27:60:7f:89  
           inet addr:192.168.56.120  Bcast:192.168.56.255  Mask:255.255.255.0
           inet6 addr: fe80::a00:27ff:fe60:7f89/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:1470 errors:0 dropped:0 overruns:0 frame:0
           TX packets:2088 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:110754 (110.7 KB)  TX bytes:425774 (425.7 KB)

 eth0:0    Link encap:Ethernet  HWaddr 08:00:27:60:7f:89  
           inet addr:192.168.56.121  Bcast:192.168.56.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 eth1      Link encap:Ethernet  HWaddr 08:00:27:01:2f:25  
           inet addr:10.0.0.120  Bcast:10.0.0.255  Mask:255.255.255.0
           inet6 addr: fe80::a00:27ff:fe01:2f25/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:4328 errors:0 dropped:0 overruns:0 frame:0
           TX packets:5036 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:336379 (336.3 KB)  TX bytes:524405 (524.4 KB)

 eth1:0    Link encap:Ethernet  HWaddr 08:00:27:01:2f:25  
           inet addr:10.0.0.121  Bcast:10.0.0.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 eth2      Link encap:Ethernet  HWaddr 08:00:27:f0:2b:00  
           inet addr:192.168.0.59  Bcast:192.168.0.255  Mask:255.255.255.0
           inet6 addr: fe80::a00:27ff:fef0:2b00/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:575 errors:0 dropped:0 overruns:0 frame:0
           TX packets:789 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:118869 (118.8 KB)  TX bytes:178305 (178.3 KB)

 lo        Link encap:Local Loopback  
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:65536  Metric:1
           RX packets:8938 errors:0 dropped:0 overruns:0 frame:0
           TX packets:8938 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0 
           RX bytes:534220 (534.2 KB)  TX bytes:534220 (534.2 KB)

我该如何修复这个问题?配置对我来说看起来没问题。

答案1

如果此服务器使用的 DNS 服务器有 .local 域,则 avahi 将无法工作。请参阅https://web.archive.org/web/20150228130344/http://avahi.org/wiki/AvahiAndUnicastDotLocal了解更多信息。

相关内容