我有几个虚拟机(运行 Scientific Linux 6.2),它们发布工作站记录,以便在网上轻松找到它们。一些虚拟机在几分钟后停止发布,即我可以通过 hostname.local 访问它们几分钟,然后任何发现都会超时。它们仍然可以通过其 IP 地址访问。重新启动avahi-daemon
会导致相同的行为。
/var/log/messages 中没有任何内容表明存在问题:
Nov 27 08:07:33 vm01 avahi-daemon[2836]: Got SIGTERM, quitting.
Nov 27 08:07:33 vm01 avahi-daemon[2836]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.100.200.226.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Successfully dropped root privileges.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: avahi-daemon 0.6.25 starting up.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Successfully called chroot().
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Successfully dropped remaining capabilities.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: No service file found in /etc/avahi/services.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.100.200.226.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: New relevant interface eth0.IPv4 for mDNS.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Network interface enumeration completed.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Registering new address record for fe80::216:3eff:fe73:df12 on eth0.*.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Registering new address record for 10.100.200.226 on eth0.IPv4.
Nov 27 08:07:33 vm01 avahi-daemon[2880]: Registering HINFO record with values 'X86_64'/'LINUX'.
Nov 27 08:07:34 vm01 avahi-daemon[2880]: Server startup complete. Host name is vm01.local. Local service cookie is 320168790.
日志中没有其他信息表明存在问题。启动期间的 SIGTERM 似乎很正常,粗略地谷歌搜索后发现。
我只修改了配置部分的条目publish
;其他一切都保持原样:
[publish]
disable-publishing=no
disable-user-service-publishing=no
#add-service-cookie=no
publish-addresses=yes
#publish-hinfo=yes
publish-workstation=yes
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no
avahi-daemon 不会产生任何显著的 CPU 负载。进程正在运行:
# ps auxww |grep avahi
avahi 2880 0.0 0.0 27660 1488 ? S 08:07 0:00 avahi-daemon: running [vm01.local]
avahi 2881 0.0 0.0 27660 520 ? Ss 08:07 0:00 avahi-daemon: chroot helper
我有一些装有 CentOS 5.8 的虚拟机,它们没有这个问题。它们有 avahi-daemon 0.6.16 和相同的配置。有什么想法吗?
答案1
我刚刚意识到我正要回复真的老问题,但也许有人会发现这很有用。
检查一下您的网络设备,特别是任何托管交换机。我遇到过 IGMP 监听问题,几分钟后客户端可能会突然停止接收多播请求,因为交换机正在过滤它。
值得深思。