RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 585600 - libvirtd fails to start without a correct /etc/hosts file, and installer doesn't add hostname to /etc/hosts
Summary: libvirtd fails to start without a correct /etc/hosts file, and installer does...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Chris Lalancette
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-24 23:36 UTC by Gordan Bobic
Modified: 2010-09-09 11:09 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.8.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 20:52:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gordan Bobic 2010-04-24 23:36:39 UTC
Description of problem:
libvirtd fails to start. The error it returns is:
error: Unable to initialize network sockets

Version-Release number of selected component (if applicable):
libvirt-0.7.6-2.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL6b with Desktop package selection
2. libvirtd service will be failing to start.
  
Actual results:
error: Unable to initialize network sockets

Expected results:
Successful start

Additional info:
Digging a little deeper, it looks like the problem is related to a faulty /etc/hosts file (not all that intuitive from the error message!). It seems the installer hasn't added a suitable entry for the local host name at install time. On F12, IIRC, the hostname is added to 127.0.0.1, which makes this work. RHEL6b installer doesn't do the same thing (regression?).

Adding a suitable line to /etc/hosts containing the local host name fixes the problem.

Comment 2 RHEL Program Management 2010-04-25 01:12:12 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Chris Lalancette 2010-04-26 12:57:12 UTC
(In reply to comment #0)
> Additional info:
> Digging a little deeper, it looks like the problem is related to a faulty
> /etc/hosts file (not all that intuitive from the error message!). It seems the
> installer hasn't added a suitable entry for the local host name at install
> time. On F12, IIRC, the hostname is added to 127.0.0.1, which makes this work.
> RHEL6b installer doesn't do the same thing (regression?).

No, in point of fact, adding the hostname as 127.0.0.1 is entirely the wrong thing to do (so it's a bug in F-12's installer).  It just doesn't make any sense.  The real problem is that libvirt was depending on the hostname to be setup properly at all times.  The good news is that this should be fixed in the latest libvirt packages for RHEL-6, 0.8.0 or so, which will be available in Beta2.

Chris Lalancette

Comment 9 releng-rhel@redhat.com 2010-07-02 20:52:33 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 10 Nan Zhang 2010-09-09 11:09:06 UTC
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-0.12.1.2-2.113.el6.x86_64.


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