Bug 211800 - Default ipv6 entry refering to localhost in /etc/host file needs ipv4 added
Default ipv6 entry refering to localhost in /etc/host file needs ipv4 added
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
6
noarch Linux
medium Severity medium
: ---
: ---
Assigned To: David Cantrell
: Reopened
: 209597 212815 216919 223428 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-22 22:28 EDT by Zigzagcom
Modified: 2007-11-30 17:11 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-27 12:57:38 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)

  None (edit)
Description Zigzagcom 2006-10-22 22:28:01 EDT
Description of problem:
I installed webmin 1.3 and navigated to 
https://localhost:10000, but the control panel failed to open. The /etc/host
file has a default ipv6 entry refering to localhost but not in ipv4. When adding
127.0.0.1 localhost.localdomain localhost to the host file, all is well.



Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1.Install webmin after a fresh install (no updates available yet 10/22/06)
2.open port 10000 tcp on firewall
3.Navigate to http://localhost:10000
  
Actual results:
Cannot find localhost

Expected results:
Webmin control panel opens


Additional info:
Comment 1 Thomas Woerner 2006-10-23 04:55:00 EDT
This is not an iptables problem. It is a confugration problem.

Assigning to anaconda.
Comment 2 David Cantrell 2006-10-23 18:09:40 EDT
We needed to be writing out the ::1 entry in /etc/hosts as
localhost6.localdomain6 localhost6.

Fixed in rawhide.

There is a line for 127.0.0.1 localhost, but the IPv6 entry is after it and you
hit a conflict.
Comment 3 Andre Robatino 2006-10-25 00:02:40 EDT
  As someone not familiar with IPv6, what should the exact contents of
/etc/hosts be?  The hostname localhost was not recognized on my box, so I looked
at /etc/hosts and saw a single line

::1    localhost.localdomain     localhost

so I changed it to

127.0.0.1       localhost.localdomain   localhost

Should there be two lines, like this?

127.0.0.1       localhost.localdomain        localhost
::1                   localhost6.localdomain6   localhost6
Comment 4 David Cantrell 2006-10-25 10:34:19 EDT
There's no real answer to this question.  The basic rule is that the name
'localhost' must be reserved for 127.0.0.1 on IPv4.  Always.  If you give the
name 'localhost' an IPv6 address or any other IPv4 address, things will break.

You don't really need an entry for ::1, but we do it for consistency.  The
localhost6 name seems to be common across other operating systems and it's good
enough for me because some people want an entry for ::1 in /etc/hosts.  If you
think of a better name for the IPv6 localhost address, let me know.  I'll be
happy to change it.

Personally, ::1 is easier to me than any name since it's so short anyway.  :)
Comment 5 Zigzagcom 2006-10-25 22:25:14 EDT
In reference to comment #2:
There is a line for 127.0.0.1 localhost, but the IPv6 entry is after it and you
hit a conflict.

That was not the case in my situation,i.e., the entry referring to
127.0.0.1 localhost.localdomain localhost was absent in my /etc/hosts file.
Or, does the conflict somehow remove that line, leaving only the reference to IPv6?
Comment 6 David Cantrell 2006-10-26 13:47:53 EDT
I'm not sure how you installed because a line for 127.0.0.1 will _always_ be
written to /etc/hosts, regardless of your network settings.

Can you explain in detail how you installed?

Thanks.
Comment 7 Andre Robatino 2006-10-26 18:10:35 EDT
  After I did a clean install, I ran system-config-network to configure a new
network interface.  I suspect that this modified the file, as in bug #140997,
which is still not fixed as far as I know.  The way to tell is to look at the
modification time of /etc/hosts and compare to when the install was done.
Comment 8 Zigzagcom 2006-10-26 23:28:49 EDT
In my case, I did a clean install, and selected dhcp for the network settings.
After the install, I did not change any network settings, nor invoke any tools
to modify the settings. I more or less went straight to www.webmin.com,
downloaded the rpm and installed the control panel via the gnome installation
tool, by clicking on the rpm and following thru on the prompts.
I could not tell you the difference between the install time and the time stamp
on the /etc/hosts file, as I was not looking for that. Unfortunately (or
fortunately) I added the "127.0.0.1 localhost.localdomain localhost" line,
thereby modifying the time stamp.
But this is more or less the same phenomena as Andre had. 
Comment 9 Zigzagcom 2006-10-26 23:36:28 EDT
Some additional info:
I have Verizon as my service provider and use a Westell Model 327W residential
gateway. Its DNS service is enabled and general settings use the 192.168.1.1 IP
as gateway and dns server. I don't think that it is IPv6 aware...the search
domain returned is "myhome.westell.com".
Hope that rounds out the info from my previous post.
Comment 10 Andre Robatino 2006-10-27 00:12:53 EDT
  I can clear up some of the mystery.  I have another box on which I did a clean
of install of FC6 and no network configuration.  /etc/hosts had a timestamp
during the time of install, and looked like this:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain   localhost
::1             localhost.localdomain   localhost

  Then I used system-config-network to configure an xDSL interface.  Upon saving
my changes and exiting, /etc/hosts was modified to look like this:

# Do not remove the following line, or various programs
# that require network functionality will fail.
::1     localhost.localdomain   localhost

Experimenting reveals that if both lines are present, adding or deleting a
network interface with system-config-network results in the first line being
deleted.  If only one line is present (it doesn't matter which one), it's left
alone.
Comment 11 Zigzagcom 2006-10-27 00:20:12 EDT
In light of the last comment from Andre, I do recall adding port 10000/tcp
as a trusted port during install time, i.e., before first boot from the HDD.
This was in anticipation of installing webmin.
Comment 12 Need Real Name 2006-10-27 12:50:08 EDT
Echoing the findings of comment #10. I know of a few others who have been bitten
(mildly) by this too. I think this should be re-assigned from anaconda to
system-config-network.
Comment 13 David Cantrell 2006-10-27 12:57:38 EDT
OK, this bug is fixed in anaconda.  I am writing out correct lines for localhost
and localhost6.  But if you run system-config-network, that's different code. 
It should preserve those entries, so this really isn't much of a problem.  But
I'll file a bug against that component to make sure they add code to write out
localhost6 if they need to.

Unfortunately, this bug is present in FC6.  Sorry.
Comment 14 Jeremy Katz 2006-10-30 14:44:25 EST
*** Bug 212815 has been marked as a duplicate of this bug. ***
Comment 15 David Cantrell 2006-11-27 11:38:14 EST
*** Bug 216919 has been marked as a duplicate of this bug. ***
Comment 16 D. Hugh Redelmeier 2007-01-13 14:11:58 EST
Please also look at 214932.

My symptom is described in 216919.

This may well be an Anaconda bug but no update can fix an Anaconda bug (as I
understand it).  To get a fix in out there for FC6, s-c-n needs to have a
work-around for the Anaconda bug.
Comment 17 David Cantrell 2007-03-08 11:56:08 EST
*** Bug 223428 has been marked as a duplicate of this bug. ***
Comment 18 Thomas Woerner 2007-07-24 11:30:54 EDT
*** Bug 209597 has been marked as a duplicate of this bug. ***

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