Bug 442812 - When /etc/hosts contains hostname on 127.0.0.1 line, ipa-server-install fails
When /etc/hosts contains hostname on 127.0.0.1 line, ipa-server-install fails
Status: CLOSED ERRATA
Product: freeIPA
Classification: Community
Component: ipa-server (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
:
Depends On:
Blocks: 429034
  Show dependency treegraph
 
Reported: 2008-04-16 18:35 EDT by Michael Gregg
Modified: 2015-01-04 18:31 EST (History)
1 user (show)

See Also:
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 03:14:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
include pointer to /etc/hosts for where to look to fix the problem (1.11 KB, patch)
2008-05-08 17:15 EDT, Rob Crittenden
no flags Details | Diff

  None (edit)
Description Michael Gregg 2008-04-16 18:35:56 EDT
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 19:45:41 EDT
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-16 20:39:41 EDT
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 14:54:12 EDT
Perhaps show what the /etc/hosts should look like.
Comment 5 Rob Crittenden 2008-05-08 17:15:33 EDT
Created attachment 304902 [details]
include pointer to /etc/hosts for where to look to fix the problem
Comment 6 Rob Crittenden 2008-05-09 14:05:03 EDT
ipa-1-0: 8b99efbe3c8f050402f98cb9305a2d749ddc9ed8
master: ae641ed31b45a19def11273b13d41658ed0580ce
Comment 7 Yi Zhang 2008-06-09 16:50:01 EDT
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

Note You need to log in before you can comment on or make changes to this bug.