重启服务器后,我发现主机名无法解析。我检查了/firewall-cmd
是否打开,结果发现是打开的。mdns
5353/udp
然后,我去检查 Avahi 守护进程是否正在运行,结果是它正在运行。
[vestatian@etune ~]$ systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service;>
Active: active (running) since Mon 2025-02-10 15:13:27 +08;
此外,sudo netstat -tuln
还表明服务器实际上正在监听
udp 0 0 0.0.0.0:5353 0.0.0.0:*
在我运行以下命令后,我意识到 mdns 实际上正在解析,但只是向后解析。什么avahi-daemon
可能导致此行为?
vestatian@pegasus:~/sources/frappe_podlet$ avahi-resolve -n etune.local
Failed to resolve host name 'etune.local': Timeout reached
vestatian@pegasus:~/sources/frappe_podlet$ avahi-resolve -a 192.168.50.241
192.168.50.241 etune
附加信息:
Operating System: Red Hat Enterprise Linux 9.5 (Plow)
CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos
Kernel: Linux 5.14.0-503.21.1.el9_5.x86_64
Architecture: x86-64