在客户端机器上,我运行以下命令:
while true ; do ping -c 1 server_name.local. ; sleep 1s ; done
它输出:
ping: unknown host server_name.local.
...除了当我重新启动服务器时,在关机之前和启动之后都有几次成功的 ping。
同样,诊断实用程序mdns-scan
只能在服务器重新启动时查看它。
发生了什么事?我怎样才能使它更一致地工作?
该服务器正在运行 Ubuntu Desktop 11.10。
我在 中发现了以下消息/var/log/syslog
。但需要注意的是,.local 似乎对我网络上的其他设备运行良好。
Avahi detected that your currently configured local DNS server serves
a domain .local. This is inherently incompatible with Avahi and thus
Avahi disabled itself. If you want to use Avahi in this network, please
contact your administrator and convince him to use a different DNS domain,
since .local should be used exclusively for Zeroconf technology.
For more information, see http://avahi.org/wiki/AvahiAndUnicastDotLocal
答案1
错误报告https://lists.ubuntu.com/archives/foundations-bugs/2012-December/129282.html提示了以下解决方法:
sudo start avahi-daemon
-- 每次启动后都需要执行此操作- 修改
/etc/default/avahi-daemon
(或类似)AVAHI_DAEMON_DETECT_LOCAL=0