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 1297690 - XML-RPC error : Cannot write data: Transport endpoint is not connected
Summary: XML-RPC error : Cannot write data: Transport endpoint is not connected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1271183
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2016-01-12 08:58 UTC by Richard W.M. Jones
Modified: 2018-07-16 12:13 UTC (History)
24 users (show)

Fixed In Version: libvirt-1.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1271183
Environment:
Last Closed: 2016-11-03 18:35:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 751696 0 None None None 2016-01-12 08:58:04 UTC
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Richard W.M. Jones 2016-01-12 08:58:05 UTC
+++ This bug was initially created as a clone of Bug #1271183 +++

Cloning to ensure this bug is fixed in RHEL 7.  (It affects 7.2 for
sure, possibly earlier).

Description of problem:

libvirt still fails with qemu:///session intermittently:
libguestfs: opening libvirt handle: URI = qemu:///session, auth = default+wrapper, flags = 0
libvirt: XML-RPC error : Cannot write data: Transport endpoint is not connected
libguestfs: error: could not connect to libvirt (URI = qemu:///session): Cannot write data: Transport endpoint is not connected [code=38 domain=7]
libguestfs-test-tool: failed to launch appliance

There's another bug about this, but I can't find it right now.

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

libvirt-1.2.20-1.fc24.x86_64

How reproducible:

Unknown, but not often.  Seems to happen when user libvirtd
starts up the first time, but not every time.

Steps to Reproduce:
1. Run: libguestfs-test-tool as non-root.

--- Additional comment from Fabian Deutsch on 2016-01-07 06:25:12 EST ---

We are also seeing this issue on CentOS 7

--- Additional comment from Cole Robinson on 2016-01-11 20:24:06 EST ---

I'm pretty sure these patches fix things:

https://www.redhat.com/archives/libvir-list/2016-January/msg00422.html

--- Additional comment from Michael Catanzaro on 2016-01-11 23:07:56 EST ---

Thanks a bunch Cole; I rely on libvirt (via Boxes) and it's annoying when it doesn't start up properly. If you do a Fedora build, I'd be happy to test it!

Comment 2 Jaroslav Suchanek 2016-01-21 11:57:52 UTC
Fixed by

commit 2eb7a975756d05a5b54ab4acf60083beb6161ac6
Author: Cole Robinson <crobinso>
Date:   Mon Jan 11 20:13:38 2016 -0500

    rpc: socket: Don't repeatedly attempt to launch daemon
    
    On every socket connect(2) attempt we were re-launching session
    libvirtd, up to 100 times in 5 seconds.
    
    This understandably caused some weird load races and intermittent
    qemu:///session startup failures
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271183

Comment 4 Zeeshan Ali 2016-04-27 12:13:13 UTC
Thanks Cole for fixing this!

Comment 7 yafu 2016-09-09 06:40:52 UTC
Reproduce with libvirt-1.2.17-13.el7_2.5.x86_64.

Test steps:
1.Reinstall libvirt:
 #yum -y reinstall libvirt*

2.Clean caches:
 #echo 3 > /proc/sys/vm/drop_caches

3.Run libguestfs-test-tool with non-root:
 $libguestfs-test-tool
  ...
  libguestfs: opening libvirt handle: URI = qemu:///session, auth = default+wrapper, flags = 0
libvirt: XML-RPC error : Cannot write data: Transport endpoint is not connected
libguestfs: error: could not connect to libvirt (URI = qemu:///session): Cannot write data: Transport endpoint is not connected [code=38 domain=7]
libguestfs-test-tool: failed to launch appliance
 ...

Verify pass with libvirt-2.0.0-8.el7.x86_64.

Test steps:
1.Using libguestfs
a).Reinstall libvirt:
 #yum -y reinstall libvirt*

b).Clean caches:
 #echo 3 > /proc/sys/vm/drop_caches

c).Run libguestfs-test-tool with non-root:
  $libguestfs-test-tool
   no error output.

Comment 8 yafu 2016-09-09 06:54:05 UTC
Hi,Richard,

Would you help to check the steps in comment 7 are enough for verifying this bug?
Thanks a lot.

Comment 9 yafu 2016-09-14 09:04:56 UTC
Reproduce the bug using libvirt-python.
Test version:
libvirt-python-1.2.17-2.el7.x86_64
libvirt-1.2.17-13.el7_2.5.x86_64
  
Test steps:
1.Reinstall libvirt:
 #yum -y reinstall libvirt*

2.Clean caches:
 #echo 3 > /proc/sys/vm/drop_caches

3.Run the scripts with non-root:
  https://bugzilla.redhat.com/show_bug.cgi?id=1240283#c9
  $ python bug1240283.py 
libvirt: XML-RPC error : Cannot write data: Transport endpoint is not connected
Traceback (most recent call last):
  File "bug1240283.py", line 14, in <module>
    conn = libvirt.openReadOnly(None)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 268, in openReadOnly
    if ret is None:raise libvirtError('virConnectOpenReadOnly() failed')
libvirt.libvirtError: Cannot write data: Transport endpoint is not connected


Verify pass using libvirt-python.
Test version:
libvirt-python-2.0.0-2.el7.x86_64
libvirt-2.0.0-8.el7.x86_64

Test steps:
1.Reinstall libvirt:
 #yum -y reinstall libvirt*

2.Clean caches:
 #echo 3 > /proc/sys/vm/drop_caches

3.Run the scripts with non-root:
  https://bugzilla.redhat.com/show_bug.cgi?id=1240283#c9
  $ python bug1240283.py 
  NOT reproduced RHBZ#1240283

Comment 11 errata-xmlrpc 2016-11-03 18:35:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


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