7.5. 主机没有找到/不能解析 FQDN
因为 RHN 配置文件完全依赖 FQDN,所以关键应用程序必须可以将 RHN Proxy 服务器名称转换为 IP 地址,对 Red Hat Update Agent、红帽网络注册客户端 和 Apache Web 服务器尤为重要。否则将无法启动 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 服务器以及 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 服务器。如果仍然无法正常运行,检查这个文件中的 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 地址是被指定的,当这个机器获得一个新地址时,这个文件需要被更新。