大网数据广告活动
服务器运维问答

FreeIPA : Installer not resolving domain name from hosts file

· 52CE 我爱测

I have been having an issue while installing FreeIPA . The problem is that every time I run the installer the FreeIPA application does not read from the host file rather tries to resolve the domain name (my machine's hostname) wi…

问题原文

原帖链接 · Mustafa Mujahid · CC BY-SA 3.0

I have been having an issue while installing FreeIPA. The problem is that every time I run the installer the FreeIPA application does not read from the host file rather tries to resolve the domain name (my machine's hostname) with a DNS query. I'm Working with CentOS Linux release 7.3.1611 (Core)

Following are the entries in my /etc/hosts file :

[root@ipa ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.28.5 ipa.example.com ipa

Entries in /etc/resolve.conf

[root@ipa ~]# cat /etc/resolv.conf 
# Generated by NetworkManager
search example.com

If I add a DNS entry in the above, the domain example.com is resolved from that DNS and following error is observed as would be expected if an external DNS is queried.

Please provide a realm name [EXAMPLE.COM]: 
Checking DNS domain example.com., please wait ...
ipa.ipapython.install.cli.install_tool(Server): ERROR    DNS zone example.com. already exists in DNS and is handled by server(s): a.iana-servers.net., b.iana-servers.net.

So I choose not to add a DNS and use an empty resolve.conf file as shown above. I have also tried setting the nameserver to my machines IP but to no luck.

To get it to force read from my hosts file I changed the nsswitch config to only read from the hosts file but that was still in vain. kindly see below the my /etc/nsswitch configuration.

[root@ipa ~]# grep hosts /etc/nsswitch.conf
hosts:      files

Running the installer

[root@ipa ~]# ipa-server-install --setup-dns -a <passwd> -p <passwd>

now with the current config returns the following :

Please provide a realm name [EXAMPLE.COM]: 
Checking DNS domain example.com., please wait ...
Please provide the IP address to be used for this host name:

So again, the hosts file was ignored and installer asks for an IP against the domain.

Following are some test which show hostname to IP resolution is succesful

[root@ipa ~]# ping ipa.example.com
PING ipa.example.com (192.168.28.5) 56(84) bytes of data.
64 bytes from ipa.example.com (192.168.28.5): icmp_seq=1 ttl=64 time=0.126 ms
^C
--- ipa.example.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.126/0.126/0.126/0.000 ms

[root@ipa ~]# getent hosts ipa.example.com
192.168.28.5    ipa.example.com ipa

[root@ipa ~]# telnet ipa.example.com
Trying 192.168.28.5...

Apologies for the long post, I'm quite stuck with this and I'm having trouble figuring out what I'm missing. Any assistance on this issue would be greatly appreciated. Thankyou.

PS : The setup is not for a live environment, its for testing purposes.

已采纳解答

原帖链接 · zultron · CC BY-SA 3.0

Actually, it's a legitimate use case to set up IPA servers to eventually replace existing, running DNS servers for a domain. The "go purchase a new domain" answers fail to address the underlying technical issue.

This case can be handled by specifying ipa-server-install --allow-zone-overlap option, documented here.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-02-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。