6.5. 主机没有找到/不能解析 FQDN
因为 RHN 配置文件完全依赖 FQDN,所以关键应用程序必须可以将 RHN Proxy Server 名称转换为 IP 地址,对 Red Hat Update Agent、Red Hat Network Registration Client 和 Apache Web server 尤为重要。否则将无法启动 RHN 应用程序,并显示 "host not found" 和 "Could not determine the server's fully qualified domain name" 错误信息。
这个问题通常是由
/etc/hosts 文件产生的。/etc/nsswitch.conf 定义了域名解析的方法和顺序,您可以通过检查这个文件来确认它。通常,/etc/hosts 文件会被首先使用,然后是网络信息服务(NIS),接下来是 DNS。以上方法中最少有一种是正确的才能保证 Apache Web server以及 RHN 客户端应用程序可以正常工作。
要解决这个问题,检查
/etc/hosts 文件的内容,它应该与以下内容相似:
127.0.0.1 this_machine.example.com this_machine localhost.localdomain \ localhost
127.0.0.1 this_machine.example.com this_machine localhost.localdomain \ localhost
首先,在一个文本编辑器中删除有疑问的信息,如:
127.0.0.1 localhost.localdomain.com localhost
127.0.0.1 localhost.localdomain.com localhost
然后,保存文件并尝试重新运行 RHN 客户端应用程序或 Apache Web server。如果仍然无法正常运行,检查这个文件中 Proxy 的 IP 地址,如:
127.0.0.1 localhost.localdomain.com localhost 123.45.67.8 this_machine.example.com this_machine
127.0.0.1 localhost.localdomain.com localhost
123.45.67.8 this_machine.example.com this_machine
使用 Proxy 的实际地址来替换这个值就应该可以解决这个问题。请记住,如果指定具体 IP 地址,当这个机器获得一个新地址时,则需要更新这个文件。