libvirtError: no connection driver available for qemu:///system 解决办法
今天部署了一套K版的OpenStack环境后,启动nova-compute后,日志里狂报如下错误(因为其内部有定时任务需要去连libvirtd进程):
2015-08-14 10:01:00.061 28580 TRACE nova.virt.libvirt.host File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth
2015-08-14 10:01:00.061 28580 TRACE nova.virt.libvirt.host if ret is None:raise libvirtError('virConnectOpenAuth() failed')
2015-08-14 10:01:00.061 28580 TRACE nova.virt.libvirt.host libvirtError: no connection driver available for qemu:///system
刚开始看到这个错误,首先第一反应是不是 libvirtd 进程没有启起来,于是 ps 查看确定下,发现已经启动起来了:
[root@localhost ~]# ps aux | grep libvirtd
root 2648 0.0 0.0 112640 980 pts/1 S+ 10:34 0:00 grep --color=auto libvirtd
root 31850 0.1 0.0 1053776 7264 ? Ssl 10:17 0:01 /usr/sbin/libvirtd --listen
后来,尝试直接执行下 virsh list 命令,同样得到如下错误:
[root@localhost ~]# virsh list
error: failed to connect to the hypervisor
error: no valid connection
error: no connection driver available for <null>
error: Failed to reconnect to the hypervisor
然后在想是不是URI不对,于是我指定URI再次尝试执行命令,同样返回错误:
[root@localhost ~]# virsh -c qemu:///system list
error: failed to connect to the hypervisor
error: no connection driver available for qemu:///system
为保持每次使用的URI都正确,后来我将 /etc/libvirt/libvirt.conf 配置文件里的 uri_default 直接设置为 qemu:///system:
[root@localhost ~]# cat /etc/libvirt/libvirt.conf
#
# This can be used to setup URI aliases for frequently
# used connection URIs. Aliases may contain only the
# characters a-Z, -, _, -.
#
# Following the '=' may be any valid libvirt connection
# URI, including arbitrary parameters #uri_aliases = [
# "hail=qemu+ssh://root@hail.cloud.example.com/system",
# "sleet=qemu+ssh://root@sleet.cloud.example.com/system",
#] #
# This can be used to prevent probing of the hypervisor
# driver when no URI is supplied by the application. uri_default = "qemu:///system"
然后重启 libvirtd 进程,通过 systemctl 命令查看下 libvirtd 进程的状态,发现有如下3个错误:
[root@localhost ~]# systemctl status libvirtd
libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
Active: active (running) since Fri -- :: CST; 4s ago
Docs: man:libvirtd()
http://libvirt.org
Main PID: (libvirtd)
CGroup: /system.slice/libvirtd.service
└─ /usr/sbin/libvirtd --listen Aug :: localhost.localdomain libvirtd[]: libvirt version: 1.2., package: .el7_1. (CentOS BuildSystem <http://bugs.centos.org>, 2015-05-12-20:12:58, worker1.bsys.centos.org)
Aug :: localhost.localdomain libvirtd[]: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so /usr/lib64/libvirt/connection-driver/...e reference
Aug :: localhost.localdomain libvirtd[]: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so /usr/lib64/libvirt/connection-driver/lib...eFileCreate
Aug :: localhost.localdomain libvirtd[]: Module /usr/lib64/libvirt/connection-driver/libvirt_driver_lxc.so not accessible
Aug :: localhost.localdomain systemd[]: Started Virtualization daemon.
Hint: Some lines were ellipsized, use -l to show in full.
从上面错误来看,两个错误是由于libvirt_driver_storage.so、libvirt_driver_qemu.so加载失败,一个错误是由于没有libvirt_driver_lxc.so module。
于是查看下目录 /usr/lib64/libvirt/connection-driver/ 看看是否都有上面三个module:
[root@localhost ~]# ll /usr/lib64/libvirt/connection-driver/
total
-rwxr-xr-x root root May : libvirt_driver_interface.so
-rwxr-xr-x root root May : libvirt_driver_network.so
-rwxr-xr-x root root May : libvirt_driver_nodedev.so
-rwxr-xr-x root root May : libvirt_driver_nwfilter.so
-rwxr-xr-x root root May : libvirt_driver_qemu.so
-rwxr-xr-x root root May : libvirt_driver_secret.so
-rwxr-xr-x root root May : libvirt_driver_storage.so
发现libvirt_driver_storage.so、libvirt_driver_qemu.so存在,而libvirt_driver_lxc.so确实不存在。
对于 libvirt_driver_lxc.so不存在 的情况,应该是相应的rpm包没有安装,我们只需要安装下即可:
[root@localhost ~]# yum install libvirt-daemon-lxc
安装完后,再次通过 systemctl 查看下 libvirtd 进程的状态,剩下两个错误还是没有得到解决:
[root@localhost ~]# systemctl status libvirtd
libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
Active: active (running) since Fri -- :: CST; 3s ago
Docs: man:libvirtd()
http://libvirt.org
Main PID: (libvirtd)
CGroup: /system.slice/libvirtd.service
└─ /usr/sbin/libvirtd --listen Aug :: localhost.localdomain libvirtd[]: libvirt version: 1.2., package: .el7_1. (CentOS BuildSystem <http://bugs.centos.org>, 2015-05-12-20:12:58, worker1.bsys.centos.org)
Aug :: localhost.localdomain libvirtd[]: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so /usr/lib64/libvirt/connection-driver/...e reference
Aug :: localhost.localdomain libvirtd[]: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so /usr/lib64/libvirt/connection-driver/lib...eFileCreate
Aug :: localhost.localdomain systemd[]: Started Virtualization daemon.
Hint: Some lines were ellipsized, use -l to show in full.
于是查看 /var/log/message 关于libvirtd进程的系统日志,发现错误日志:
Aug 14 10:14:22 localhost journal: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference
Aug 14 10:14:23 localhost journal: failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so: undefined symbol: virStorageFileCreate
从上面错误来看,undefined symbol,很明显,是因为driver所需要的引用未定义,于是想应该是 libdevmapper.so.1.02 库太老,与 libvirtd 库不匹配,于是就尝试更新下 device-mapper:
[root@localhost ~]# yum update device-mapper
更新后,重启 libvirtd 进程,再次查看其状态:
[root@localhost ~]# systemctl restart libvirtd
[root@localhost ~]# systemctl status libvirtd
libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
Active: active (running) since Fri -- :: CST; 2s ago
Docs: man:libvirtd()
http://libvirt.org
Main PID: (libvirtd)
CGroup: /system.slice/libvirtd.service
└─ /usr/sbin/libvirtd --listen Aug :: localhost.localdomain systemd[]: Started Virtualization daemon.
发现没有问题出现了,尝试执行 virsh list 命令,也OK了:
[root@localhost ~]# virsh list
Id Name State
----------------------------------------------------
最后,启动openstack-nova-compute,也不再出现最初的错误了。
libvirtError: no connection driver available for qemu:///system 解决办法的更多相关文章
- 【转】Android出现“Read-only file system”解决办法
原文网址:http://www.111cn.net/sj/android/44496.htm 下面介绍一篇Android出现“Read-only file system”解决办法 有碰到这类问题的朋友 ...
- (转载)Android出现“Read-only file system”解决办法
下面介绍一篇Android出现“Read-only file system”解决办法 有碰到这类问题的朋友可参考参考. Android-出现Read-only file system的解决方法 输 ...
- 【转】Android adb shell操作时出现“ XXX ... Read-only file system”解决办法--不错
原文网址:http://blog.csdn.net/whu_zhangmin/article/details/25364349 手机连接PC后 adb shell su rm -r /system/a ...
- Android SDK Manager检查更新时遇到Failed to fetch URL xxxxxxx reason: Connection to xxxxxx的错误的解决办法!
首先说明的是这个问题并不是每个人都存在,但是我和我的一个同学都有这种情况,所以我同学百度了一下,找出了解决办法. 问题描述: 使用Android SDK Manager检查在线更新,提示以下错误: & ...
- Android出现“Read-only file system”解决办法
操作设备文件系统上的文件结果遇到"... Read-only file system". 解决办法: 1. 最简单的,adb remount 2. 不行的话,adb shell s ...
- ORA-00845 MEMORY_TARGET not supported on this system解决办法
ORA-00845: MEMORY_TARGET not supported on this system报错解决 Oracle 11g数据库修改pfile参数后启动数据库报错ora-00845 SQ ...
- Resource is out of sync with the file system: 解决办法
在eclipse中,启动server时报此错,是因为文件系统不同步造成的,解决方法有两个: (1)选中工程,右键,选择F5(手动刷新): (2)Window->Preferences->G ...
- Powershell cannot be loaded because running scripts is disabled on this system 解决办法
问题背景 第一次跑ps时,出现了下面的提示.这是因为windows不允许执行脚本而已,不要大惊小怪. 解决办法 这个需要管理员执行,不然会出现以下的情况 正常情况
- com.rabbitmq.client.impl.ForgivingExceptionHandler.log:119 -An unexpected connection driver error occured
在服务器上安装了一个RabbitMq,并新创建了一个用户授予了管理员角色,登录控制台查看一切正常,兴高采烈启动项目进行连接,结果一盆冷水下来,报如下错误: o.s.a.r.l.SimpleMessag ...
随机推荐
- biztalk中使用WCF-SQL接受传送数据【转】
接触biztalk时间不长,转载一篇学习教程: http://www.cnblogs.com/chnking/archive/2010/05/09/1731098.html chnking写的. 一. ...
- PDF 补丁丁 0.4.1 版将增加嵌入中文字库的功能
有不少用户反映,部分老 PDF 文件由于在制作时没有嵌入字库,导致该文件在某些阅读器上显示为乱码.即使他们用 Acrobat 嵌入了相应的字库,文件仍然无法正确显示. 这些老 PDF 看起来具有如下相 ...
- Spring mvc中使用request和response
@ResponseBody @RequestMapping(value="/ip", method=RequestMethod.GET) public String getIP(H ...
- Topcoder SRM 584 DIV1 600
思路太繁琐了 ,实在不想解释了 代码: #include<iostream> #include<cstdio> #include<string> #include& ...
- PL/SQL安装教程
转自:http://www.cnblogs.com/volnet/archive/2012/05/22/2513728.html
- invalid types 'int[int]' for array subscrip
定义重复 如 一个int r 与一个 r[i] 重复
- 站在K2角度审视流程--任务的独占与释放
应用场景一:某件事情由A.B两人(或者更多人)完成,任务开始后,两人随时可以处理任务,只需有一人处理完成,此事情即可结束. 应用场景二:某件事情由A.B两人(或者更多人)完成,任务开始后,两人随时可以 ...
- 深入理解dispatch_queue
Grand Central Dispatch是苹果过去几年创造出来的非常强大的API,在Let's Build系列的最新一期中,我们将探究dispatch_queue基础功能的重新实现.该主题是Rob ...
- 本节向大家介绍一下UML建模误区
本节向大家介绍一下UML建模误区,这里向大家介绍九个误区,希望通过本节的学习,你对UML建模有清晰的认识,以免在以后使用过程中产生不必要的麻烦.下面让我们一起来看一下这些建模误区吧. UML建模误区 ...
- MVC5 烂笔头
HttpContent Controller:HttpContextBase View:HttpContext.Current View的搜寻顺序:本文件夹.本共享.根共享等 class=" ...