Bug 1160426 - libvirt: error : no connection driver available for qemu:///session
Summary: libvirt: error : no connection driver available for qemu:///session
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-04 18:55 UTC by Richard W.M. Jones
Modified: 2015-11-22 02:05 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-22 02:05:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-11-04 18:55:06 UTC
Description of problem:

libguestfs: [00000ms] connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///session, auth = default+wrapper, flags = 0
libvirt:  error : no connection driver available for qemu:///session
libguestfs: error: could not connect to libvirt (URI = qemu:///session): no connection driver available for qemu:///session [code=5 domain=0]

The error is completely opaque.  What does it even mean?

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

libvirt-1.2.9-4.fc21.x86_64
libvirt-client-1.2.9-4.fc21.x86_64
libvirt-daemon-1.2.9-4.fc21.x86_64
libvirt-daemon-config-network-1.2.9-4.fc21.x86_64
libvirt-daemon-config-nwfilter-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-interface-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-libxl-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-lxc-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-network-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-nodedev-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-nwfilter-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-qemu-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-secret-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-storage-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-uml-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-vbox-1.2.9-4.fc21.x86_64
libvirt-daemon-driver-xen-1.2.9-4.fc21.x86_64
libvirt-daemon-kvm-1.2.9-4.fc21.x86_64
libvirt-daemon-qemu-1.2.9-4.fc21.x86_64
libvirt-debuginfo-1.1.3.5-2.fc20.x86_64
libvirt-devel-1.2.9-4.fc21.x86_64
libvirt-docs-1.2.9-4.fc21.x86_64
libvirt-gconfig-0.1.7-2.fc20.x86_64
libvirt-glib-0.1.7-2.fc20.x86_64
libvirt-gobject-0.1.7-2.fc20.x86_64
libvirt-python-1.2.7-2.fc21.x86_64

How reproducible:

100%

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

Comment 1 Cole Robinson 2014-11-04 19:08:54 UTC
I think that's typically the error when libvirt-daemon-driver-qemu isn't installed and you try to connect to a qemu URI. But since that package is installed, there's something else weird going on.

Comment 2 Richard W.M. Jones 2014-11-04 23:17:30 UTC
Strange .. Firefox crashed(!) as I was submitting this bug, so I
wasn't sure I'd created it.

In any case, rebooting the machine fixed the problem.  I have
no idea why.

Comment 3 Kashyap Chamarthy 2014-11-18 10:20:30 UTC
I hit this with qemu:///system too:

$ rpm -ql libvirt-daemon-driver-qemu
/etc/libvirt/qemu
/etc/libvirt/qemu-lockd.conf
/etc/libvirt/qemu.conf
/etc/logrotate.d/libvirtd.qemu
/usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so
/usr/share/augeas/lenses/libvirtd_qemu.aug
/usr/share/augeas/lenses/tests/test_libvirtd_qemu.aug
/var/cache/libvirt/qemu
/var/lib/libvirt/qemu
/var/lib/libvirt/qemu/channel
/var/lib/libvirt/qemu/channel/target
/var/lib/libvirt/qemu/nvram
/var/log/libvirt/qemu
/var/run/libvirt/qemu


$ systemctl status libvirtd | grep -i Active
   Active: active (running) since Tue 2014-11-18 05:13:31 EST; 3s ago


$ virsh nodeinfo
error: failed to connect to the hypervisor
error: no valid connection
error: no connection driver available for qemu
error: Failed to reconnect to the hypervisor

$ libguestfs-test-tool
[. . .]
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libvirt:  error : no connection driver available for qemu:///system
libguestfs: error: could not connect to libvirt (URI = qemu:///system): no connection driver available for qemu:///system [code=5 domain=0]
libguestfs-test-tool: failed to launch appliance
libguestfs: closing guestfs handle 0x7fde120eff20 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfspi2mBV
[. . .]
error: failed to connect to the hypervisor
error: no valid connection
error: no connection driver available for qemu
error: Failed to reconnect to the hypervisor



RPMs installed:

$ rpm -qa | grep -i libvirt
libvirt-daemon-driver-storage-1.2.10-2.fc22.x86_64
libvirt-docs-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-vbox-1.2.10-2.fc22.x86_64
libvirt-daemon-qemu-1.2.10-2.fc22.x86_64
libvirt-1.2.10-2.fc22.x86_64
libvirt-devel-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-uml-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-interface-1.2.10-2.fc22.x86_64
libvirt-daemon-config-nwfilter-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-libxl-1.2.10-2.fc22.x86_64
libvirt-client-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-nodedev-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-xen-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-nwfilter-1.2.10-2.fc22.x86_64
libvirt-daemon-kvm-1.2.10-2.fc22.x86_64
libvirt-python-1.2.10-1.fc22.x86_64
libvirt-daemon-driver-lxc-1.2.10-2.fc22.x86_64
libvirt-daemon-config-network-1.2.10-2.fc22.x86_64
libvirt-daemon-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-qemu-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-secret-1.2.10-2.fc22.x86_64
libvirt-daemon-driver-network-1.2.10-2.fc22.x86_64
libvirt-debuginfo-1.2.10-2.fc22.x86_64

$ rpm -q qemu-system-x86
qemu-system-x86-2.2.0-0.1.rc1.fc22.x86_64

Rebooting doesn't fix it, either.

Comment 4 Kashyap Chamarthy 2014-11-20 15:42:02 UTC
(In reply to Kashyap Chamarthy from comment #3)
> I hit this with qemu:///system too:

In my case, I was hitting it because it was due to a buggy device-mapper libs (libdevmapper.so from device-mapper-1.02.88-2.fc21.x86_64) which resulted in failure to load libvirt storage driver (libvirt_driver_storage.so) which resulted in failure to load QEMU driver.


This version, in f21 stable, fixed it: device-mapper-libs-1.02.90-1.fc21.x86_64.rpm (provided as part of parent package -- lvm2-2.02.111-1.fc21)

Comment 5 Jaroslav Reznik 2015-03-03 16:28:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Yukinori Sagara 2015-04-05 10:20:32 UTC
I have a same trouble in CentOS 7.1.
I found a work around this problem. It's maybe some SELinux related initialization problem.

I had an error with guestmount(libguestfs).

[root@localhost ~]# guestmount -a centos-7.1-20150404.0.x86_64.qcow2 -i --ro /mnt
libvirt:  error : no connection driver available for qemu:///system
libguestfs: error: could not connect to libvirt (URI = qemu:///system): no connection driver available for qemu:///system [code=5 domain=0]

And simle virsh command is also, so it's a libvirt problem.

[root@localhost ~]# virsh -c qemu:///system
error: failed to connect to the hypervisor
error: no connection driver available for qemu:///system

I noticed SELinux mode was Enforcing, when I executed libguestfs-test-tool.

[root@localhost ~]# libguestfs-test-tool
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
SELinux: Enforcing
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: libvirt
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_direct: 0
guestfs_get_hv: /usr/libexec/qemu-kvm
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib64/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_selinux: 0
guestfs_get_smp: 1
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.28.1rhel=7,release=1.18.el7,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfsDJHjrl
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: libvirt version = 1002008 (1.2.8)
libguestfs: guest random name = guestfs-5pi2y28mhuv7f8ab
libguestfs: [00000ms] connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libvirt:  error : no connection driver available for qemu:///system
libguestfs: error: could not connect to libvirt (URI = qemu:///system): no connection driver available for qemu:///system [code=5 domain=0]
libguestfs-test-tool: failed to launch appliance
libguestfs: closing guestfs handle 0x7f5477c43530 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsDJHjrl

I changed SELinux mode from Enforcing to Permissive.
and retry libguestfs-test-tool, but this time, I failed with same message.

[root@localhost ~]# setenforce Permissive
[root@localhost ~]# libguestfs-test-tool
[. . .]
SELinux: Permissive
[. . .]
libguestfs: [00000ms] connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libvirt:  error : no connection driver available for qemu:///system
libguestfs: error: could not connect to libvirt (URI = qemu:///system): no connection driver available for qemu:///system [code=5 domain=0]
libguestfs-test-tool: failed to launch appliance
[. . .]

In debugging virsh, I had known 'qemu:///system' uses remote qemu driver, so it is not libvirt-client problem, but libvirtd. we need to changing SELinux mode change and restart libvirtd.

[root@localhost ~]# systemctl restart libvirtd

Retry 2. This was successed.

[root@localhost ~]# libguestfs-test-tool
[. . .]
SELinux: Permissive
[. . .]
libguestfs: [00000ms] connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x7f24fe0e3bd0
libguestfs: qemu version (reported by libvirt) = 2000000 (2.0.0)
libguestfs: [00005ms] get libvirt capabilities
libguestfs: [00008ms] parsing capabilities XML
[. . .]

In addition, I changed SELinux mode back to Enforce, restarted libvirtd, and executed  libguestfs-test-tool. This time was succeeded. so I think it's may be some SELinux related initialization problem.

[root@localhost ~]# setenforce Enforcing
[root@localhost ~]# systemctl restart libvirtd
[root@localhost ~]# libguestfs-test-tool
[. . .]
SELinux: Enforcing
[. . .]
===== TEST FINISHED OK =====

Finally, this is my libvirt related packages.

[root@localhost ~]# rpm -qa | grep libvirt | sort
libvirt-1.2.8-16.el7_1.2.x86_64
libvirt-client-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-config-network-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-config-nwfilter-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-interface-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-lxc-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-network-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-nodedev-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-nwfilter-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-qemu-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-secret-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-driver-storage-1.2.8-16.el7_1.2.x86_64
libvirt-daemon-kvm-1.2.8-16.el7_1.2.x86_64
libvirt-debuginfo-1.2.8-16.el7_1.2.x86_64
libvirt-gconfig-0.1.7-3.el7.x86_64
libvirt-glib-0.1.7-3.el7.x86_64
libvirt-gobject-0.1.7-3.el7.x86_64
libvirt-python-1.2.8-7.el7_1.1.x86_64

Comment 7 Rastislav Hepner 2015-05-09 07:35:51 UTC
I'm using rhel 7.1 and I had same error after I've installed:

libguestfs-tools-c-1:1.28.1-1.18.el7.x86_64 

and several other packages got updated. After yum roll-back error disappeared.


Loaded plugins: changelog, fs-snapshot, langpacks, priorities, product-id, refresh-packagekit, rpm-warm-cache, subscription-manager, verify
Transaction ID : 49
Begin time     : Fri May  8 14:04:58 2015
Begin rpmdb    : 1593:00880008b245a7648e2798c41d833da4a70b7895
End time       :            14:05:05 2015 (7 seconds)
End rpmdb      : 1607:eecca55a5b993642c2c4c3fe901d69c28a601eed
User           : Rastislav Hepner <rhepner>
Return-Code    : Success
Command Line   : install libguestfs-tools-c
Transaction performed with:
    Installed     rpm-4.11.1-25.el7.x86_64                  @rhel-7-workstation-htb-rpms
    Installed     subscription-manager-1.13.22-1.el7.x86_64 @rhel-7-workstation-rpms
    Installed     yum-3.4.3-118.el7.noarch                  @CSB-RHEL7-updates/7.0
Packages Altered:
    Dep-Install attr-2.4.46-12.el7.x86_64                               @rhel-7-workstation-htb-rpms
    Updated     augeas-libs-1.1.0-12.el7_0.1.x86_64                     @CSB-RHEL7-updates/7.0
    Update                  1.1.0-17.el7.x86_64                         @rhel-7-workstation-htb-rpms
    Dep-Install hexedit-1.2.13-5.el7.x86_64                             @rhel-7-workstation-htb-rpms
    Dep-Install hivex-1.3.10-5.7.el7.x86_64                             @rhel-7-workstation-htb-rpms
    Dep-Install icoutils-0.31.0-3.el7.x86_64                            @rhel-7-workstation-htb-rpms
    Dep-Install libguestfs-1:1.28.1-1.18.el7.x86_64                     @rhel-7-workstation-htb-rpms
    Install     libguestfs-tools-c-1:1.28.1-1.18.el7.x86_64             @rhel-7-workstation-htb-rpms
    Updated     libvirt-1.1.1-29.el7_0.4.x86_64                         @CSB-RHEL7-updates/7.0
    Update              1.2.8-16.el7_1.2.x86_64                         @rhel-7-workstation-rpms
    Updated     libvirt-client-1.1.1-29.el7_0.4.x86_64                  @CSB-RHEL7-updates/7.0
    Update                     1.2.8-16.el7_1.2.x86_64                  @rhel-7-workstation-rpms
    Updated     libvirt-daemon-1.1.1-29.el7_0.4.x86_64                  @CSB-RHEL7-updates/7.0
    Update                     1.2.8-16.el7_1.2.x86_64                  @rhel-7-workstation-rpms
    Updated     libvirt-daemon-config-network-1.1.1-29.el7_0.4.x86_64   @CSB-RHEL7-updates/7.0
    Update                                    1.2.8-16.el7_1.2.x86_64   @rhel-7-workstation-rpms
    Updated     libvirt-daemon-config-nwfilter-1.1.1-29.el7_0.4.x86_64  @CSB-RHEL7-updates/7.0
    Update                                     1.2.8-16.el7_1.2.x86_64  @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-interface-1.1.1-29.el7_0.4.x86_64 @CSB-RHEL7-updates/7.0
    Update                                      1.2.8-16.el7_1.2.x86_64 @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-lxc-1.1.1-29.el7_0.4.x86_64       @CSB-RHEL7-updates/7.0
    Update                                1.2.8-16.el7_1.2.x86_64       @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-network-1.1.1-29.el7_0.4.x86_64   @CSB-RHEL7-updates/7.0
    Update                                    1.2.8-16.el7_1.2.x86_64   @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-nodedev-1.1.1-29.el7_0.4.x86_64   @CSB-RHEL7-updates/7.0
    Update                                    1.2.8-16.el7_1.2.x86_64   @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-nwfilter-1.1.1-29.el7_0.4.x86_64  @CSB-RHEL7-updates/7.0
    Update                                     1.2.8-16.el7_1.2.x86_64  @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-qemu-1.1.1-29.el7_0.4.x86_64      @CSB-RHEL7-updates/7.0
    Update                                 1.2.8-16.el7_1.2.x86_64      @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-secret-1.1.1-29.el7_0.4.x86_64    @CSB-RHEL7-updates/7.0
    Update                                   1.2.8-16.el7_1.2.x86_64    @rhel-7-workstation-rpms
    Updated     libvirt-daemon-driver-storage-1.1.1-29.el7_0.4.x86_64   @CSB-RHEL7-updates/7.0
    Update                                    1.2.8-16.el7_1.2.x86_64   @rhel-7-workstation-rpms
    Updated     libvirt-daemon-kvm-1.1.1-29.el7_0.4.x86_64              @CSB-RHEL7-updates/7.0
    Update                         1.2.8-16.el7_1.2.x86_64              @rhel-7-workstation-rpms
    Updated     libvirt-python-1.1.1-29.el7_0.4.x86_64                  @CSB-RHEL7-updates/7.0
    Update                     1.2.8-7.el7_1.1.x86_64                   @rhel-7-workstation-rpms
    Dep-Install lsscsi-0.27-3.el7.x86_64                                @rhel-7-workstation-htb-rpms
    Dep-Install netpbm-10.61.02-9.el7.x86_64                            @rhel-7-workstation-htb-rpms
    Dep-Install netpbm-progs-10.61.02-9.el7.x86_64                      @rhel-7-workstation-htb-rpms
    Dep-Install perl-hivex-1.3.10-5.7.el7.x86_64                        @rhel-7-workstation-htb-rpms
    Dep-Install scrub-2.5.2-5.el7.x86_64                                @rhel-7-workstation-htb-rpms
    Dep-Install supermin5-5.1.10-1.2.el7.x86_64                         @rhel-7-workstation-htb-rpms
    Dep-Install syslinux-4.05-12.el7.x86_64                             @rhel-7-workstation-htb-rpms
    Dep-Install syslinux-extlinux-4.05-12.el7.x86_64                    @rhel-7-workstation-htb-rpms
history info

Comment 8 Cole Robinson 2015-11-22 02:05:36 UTC
Sounds like the root reported issue was fixed, so closing this


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