Bug 789669 - Unable to connect to libvirt: F17-Branched
Unable to connect to libvirt: F17-Branched
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
rawhide
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Libvirt Maintainers
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-12 04:06 EST by Frank Murphy
Modified: 2012-02-13 09:24 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-13 09:15:49 EST
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 Frank Murphy 2012-02-12 04:06:04 EST
Description of problem: 
Failed to connect socket to '/var/run/libvirt/libvirt-sock': 
No such
file or directory

http://lists.fedoraproject.org/pipermail/virt/2012-February/003178.html
Comment 1 Frank Murphy 2012-02-12 04:13:42 EST
/etc/libvirtd.conf

As a result of Google "libvirt-sock"

# This is enabled by default, uncomment this to disable it
listen_tls = 0

No difference to missing sock.
Comment 2 Frank Murphy 2012-02-13 04:28:52 EST
Solution given on mailing list.

Needed avahi-daemon running.
Comment 3 Frank Murphy 2012-02-13 05:14:04 EST
Spoke too soon:

libvirt wont start on boot.
due to dependency on avahi.

There doesn't appear to be an avahi.target
libvirtd.service
After=avahi.target
After=dbus.target

Just avahi-daemon.service, avahi-daemon.socket
Similar for dbus

Maybe these need to be changed to relevant *.service

Avahi won't start due to:
]# /usr/sbin/avahi-daemon 
Found user 'avahi' (UID 70) and group 'avahi' (GID 70).
Successfully dropped root privileges.
avahi-daemon 0.6.30 starting up.
dbus_bus_get_private(): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.6.30 exiting.

avahi-daemon.service shows pre=/usr/sbin/avahi-daemon -s
but running that shows nothing, and does nothing.
Going by systemctl status avahi-daemon.service

Am available for more testing.
Comment 4 Cole Robinson 2012-02-13 09:13:11 EST
I think there were some patches upstream about avahi deps, Laine probably has more info
Comment 5 Frank Murphy 2012-02-13 09:15:49 EST
1: enable dbus.service
2. enable avahi-daemon.service
3. start libvirtd.service

on command line:

systemctl status libvirtd.service
libvirtd.service - Virtualization daemon
	  Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
	  Active: active (running) since Mon, 13 Feb 2012 14:07:21 +0000; 18s ago
	Main PID: 1830 (libvirtd)
	  CGroup: name=systemd:/system/libvirtd.service
		  ├ 1830 /usr/sbin/libvirtd
		  └ 1935 /sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --ex...

Feb 13 14:07:23 testvm libvirtd[1830]: 2012-02-13 14:07:23.694+0000: 1841: error : virCommandWait:2308 : internal error Child proce...ebtables
Feb 13 14:07:23 testvm libvirtd[1830]: cmd='$EBT -t nat -L'
Feb 13 14:07:23 testvm libvirtd[1830]: eval res=\$\("${cmd} 2>&1"\)
Feb 13 14:07:23 testvm libvirtd[1830]: if [ $? -ne 0 ]; then  echo "Failure to execute command '${cmd}' : '${res}'.";  exit 1;fi
Feb 13 14:07:23 testvm libvirtd[1830]: ) status unexpected: exit status 1
Feb 13 14:07:23 testvm libvirtd[1830]: 2012-02-13 14:07:23.773+0000: 1841: error : virCommandWait:2308 : internal error Child proce...p6tables
Feb 13 14:07:23 testvm libvirtd[1830]: cmd='$IPT -n -L FORWARD'
Feb 13 14:07:23 testvm libvirtd[1830]: eval res=\$\("${cmd} 2>&1"\)
Feb 13 14:07:23 testvm libvirtd[1830]: if [ $? -ne 0 ]; then  echo "Failure to execute command '${cmd}' : '${res}'.";  exit 1;fi
Feb 13 14:07:23 testvm libvirtd[1830]: ) status unexpected: exit status 1

in virt-manager window:
Unable to connect to libvirt:

authentication failed: Not authorized.

Could not detect a local session: if you are 
running virt-manager over ssh -X or VNC, you 
may not be able to connect to libvirt as a 
regular user. Try running as root.

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1185, in _open_thread
    self.vmm = self._try_open()
  File "/usr/share/virt-manager/virtManager/connection.py", line 1167, in _try_open
    flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 102, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: authentication failed: Not authorized.

But it should let me in due to:

/var/lib/polkit-1/localauthority/50-local.d/virt-manager.pkl

 [Local virt-manager Permissions]
Identity=unix-user:frank
Action=org.libvirt.unix.*
ResultAny=no
ResultInactive=no
ResultActive=yes
Comment 6 Cole Robinson 2012-02-13 09:18:02 EST
Frank, that's a separate issue, please file a different bug.
Comment 7 Frank Murphy 2012-02-13 09:24:42 EST
(In reply to comment #6)
> Frank, that's a separate issue, please file a different bug.

Apologies, just saw it from here.

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