Bug 442812

Summary: When /etc/hosts contains hostname on 127.0.0.1 line, ipa-server-install fails
Product: [Retired] freeIPA Reporter: Michael Gregg <mgregg>
Component: ipa-serverAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: benl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: freeipa-2.0.0-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-27 07:14:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 429034    
Attachments:
Description Flags
include pointer to /etc/hosts for where to look to fix the problem none

Description Michael Gregg 2008-04-16 22:35:56 UTC
Description of problem:
when the hosts file is mis configured, ipa-server-install fails.

Version-Release number of selected component (if applicable):
RHEL IPA nightly build from 4-15-08

How reproducible:
always

Steps to Reproduce:
1. add the hostname to the 127.0.0.1 line only, like:
127.0.0.1 <FQDN hostname> localhost
2. run ipa-server-install
3.
  
Actual results:
ipa-server-install exits with:
root        : ERROR    The IPA Server hostanme cannot resolve to localhost
(127.0.0.1), a routable IP address must be used.

Expected results:
IPA-server install can exit. I expect the installer to detect this problem and
explain that in it's failure message.
Something like:
IPA server install detected that the machines hostname resolves to 127.0.0.1 the
most common cause of this is a misconfigured hosts file. Make sure the hostname
is referenced only to the real IP of the machine in the hosts file, and not to
127.0.0.1

Additional info:
This hosts file configuration type is the most common configuration that RHEL
sets up. We need to detect it.

Comment 1 Rob Crittenden 2008-04-16 23:45:41 UTC
So the bug here is that the error message is bad, not that we don't handle the
case of a misconfigured /etc/hosts, right?

Comment 2 Michael Gregg 2008-04-17 00:39:41 UTC
Right, I didn't state that very clearly.

The bug is that we don't explain this very well to the end user. 

IPA not installing properly with a mis-configured hosts file seems fine. 



Comment 3 Rob Crittenden 2008-04-30 18:54:12 UTC
Perhaps show what the /etc/hosts should look like.

Comment 5 Rob Crittenden 2008-05-08 21:15:33 UTC
Created attachment 304902 [details]
include pointer to /etc/hosts for where to look to fix the problem

Comment 6 Rob Crittenden 2008-05-09 18:05:03 UTC
ipa-1-0: 8b99efbe3c8f050402f98cb9305a2d749ddc9ed8
master: ae641ed31b45a19def11273b13d41658ed0580ce

Comment 7 Yi Zhang 2008-06-09 20:50:01 UTC
QA Verified on June 9, 2008 (Yi)
Build used: June 9, 2008 (64bit RHEL 5.2)


[root@replica64 ~]# cat < /etc/hosts 
127.0.0.1       replica64.ipaqa.com localhost
::1             localhost6.localdomain6 localhost6

===> ipa-server-install error: <===============
Server host name [replica64.ipaqa.com]: 

Unexpected error - see ipaserver-install.log for details:
 The IPA Server hostname cannot resolve to localhost (127.0.0.1). A routable IP
address must be used. Check /etc/hosts to see if replica64.ipaqa.com is an alias
for 127.0.0.1