[opensuse-virtual] libvirtd, qemu+ssh and polkit: internal error: received hangup / error event on socket?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi everyone, maybe this is an old issue, but I am just starting to set up my machines with libvirt and qemu-kvm, and tried using a remote connection. I already changed the following lines in libvirtd.conf: unix_sock_group = "libvirt" unix_sock_rw_perms = "0770" auth_unix_rw = "none" I made my user a member of said group 'libvirt'. And I restarted both libvirtd and polkit. I can connect as local user via virsh -c qemu:///sytem without a password prompt. I can also ssh into the remote host with my ssh key without problems. Trying from another machine (say hostname HOSTX, username testuser) with virsh -c qemu+ssh://testusers@HOSTX/system always results in
error: failed to connect to the hypervisor error: internal error: received hangup / error event on socket
I found not much information on this error, so I need your help. /var/log/messages says:
2014-03-24T21:25:55.023525+01:00 HOSTX sshd[3509]: Accepted publickey for testuser from 192.168.79.8 port 54176 ssh2 2014-03-24T21:25:55.024744+01:00 HOSTX sshd[3509]: pam_unix(sshd:session): session opened for user testuser by (uid=0) 2014-03-24T21:25:55.025717+01:00 HOSTX kernel: [ 3162.225673] type=1006 audit(1395692755.024:69): pid=3509 uid=0 old auid=4294967295 new auid=1000 old ses=4294967295 new ses=24 res=1 2014-03-24T21:25:55.027501+01:00 HOSTX systemd[1]: Starting Session 24 of user testuser. 2014-03-24T21:25:55.027918+01:00 HOSTX systemd-logind[703]: New session 24 of user testuser. 2014-03-24T21:25:55.028213+01:00 HOSTX systemd[1]: Started Session 24 of user testuser. 2014-03-24T21:25:55.081719+01:00 HOSTX sshd[3511]: Received disconnect from 192.168.79.8: 11: disconnected by user 2014-03-24T21:25:55.082095+01:00 HOSTX sshd[3509]: pam_unix(sshd:session): session closed for user testuser 2014-03-24T21:25:55.086268+01:00 HOSTX systemd-logind[703]: Removed session 24.
I am curious about the "disconnected by user" line, but I could not figure out what causes this line. I tried adding the libvirt rules to /etc/polkit-default-privs.local and all kinds of javascript stuff to /etc/polkit-1/rules.d/, but to no avail. Is configuring polkit necessary anymore? I am using Tumbleweed, which means libvirt* is 1.1.2-2.18.3.x86_64 and polkit is polkit-0.112-2.1.x86_64. Regards, Johannes - -- Osama bin Laden might wish to destroy America, but America is too big for him; he cannot do it. Bush may really do it. (Richard M. Stallman) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/ iEYEARECAAYFAlMwmlcACgkQzi3gQ/xETbJrggCffwnL4SvZeTWKqMXKX5/wiq9a +SgAnRAJogyyyA2equDI6EyRz0GPwIW/ =9WvP -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 As this might be an issue in tumbleweed, I'll take this to the factory ml. Fullquote due to crosspost, follow-ups please to opensuse-factory I currently have no non-Tumbleweed machine, so I cannot test if this is tumbleweed-related. It seems that libvirt is not in tumbleweed, at least thats what http://software.opensuse.org/package/libvirt says. (Version I have is 1.1.2, and its from openSUSE current OSS Update repo. I cannot say if e.g. polkit are the cause here. Thanks in advance, Johannes On 24.03.14 21:49 Johannes Kastl wrote:
Hi everyone,
maybe this is an old issue, but I am just starting to set up my machines with libvirt and qemu-kvm, and tried using a remote connection.
I already changed the following lines in libvirtd.conf: unix_sock_group = "libvirt" unix_sock_rw_perms = "0770" auth_unix_rw = "none"
I made my user a member of said group 'libvirt'. And I restarted both libvirtd and polkit.
I can connect as local user via virsh -c qemu:///sytem without a password prompt. I can also ssh into the remote host with my ssh key without problems.
Trying from another machine (say hostname HOSTX, username testuser) with virsh -c qemu+ssh://testusers@HOSTX/system always results in
error: failed to connect to the hypervisor error: internal error: received hangup / error event on socket
I found not much information on this error, so I need your help.
/var/log/messages says:
2014-03-24T21:25:55.023525+01:00 HOSTX sshd[3509]: Accepted publickey for testuser from 192.168.79.8 port 54176 ssh2 2014-03-24T21:25:55.024744+01:00 HOSTX sshd[3509]: pam_unix(sshd:session): session opened for user testuser by (uid=0) 2014-03-24T21:25:55.025717+01:00 HOSTX kernel: [ 3162.225673] type=1006 audit(1395692755.024:69): pid=3509 uid=0 old auid=4294967295 new auid=1000 old ses=4294967295 new ses=24 res=1 2014-03-24T21:25:55.027501+01:00 HOSTX systemd[1]: Starting Session 24 of user testuser. 2014-03-24T21:25:55.027918+01:00 HOSTX systemd-logind[703]: New session 24 of user testuser. 2014-03-24T21:25:55.028213+01:00 HOSTX systemd[1]: Started Session 24 of user testuser. 2014-03-24T21:25:55.081719+01:00 HOSTX sshd[3511]: Received disconnect from 192.168.79.8: 11: disconnected by user 2014-03-24T21:25:55.082095+01:00 HOSTX sshd[3509]: pam_unix(sshd:session): session closed for user testuser 2014-03-24T21:25:55.086268+01:00 HOSTX systemd-logind[703]: Removed session 24.
I am curious about the "disconnected by user" line, but I could not figure out what causes this line.
I tried adding the libvirt rules to /etc/polkit-default-privs.local and all kinds of javascript stuff to /etc/polkit-1/rules.d/, but to no avail. Is configuring polkit necessary anymore?
I am using Tumbleweed, which means libvirt* is 1.1.2-2.18.3.x86_64 and polkit is polkit-0.112-2.1.x86_64.
Regards, Johannes
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/ iEYEARECAAYFAlMzJKQACgkQzi3gQ/xETbJbEQCfW/KMB+Zv8RNUV3tHImeUY9Kf /msAn0mSw6jJresCrJBPbs8Kj1aGvT4Q =wm3C -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26.03.14 20:04 Johannes Kastl wrote:
Trying from another machine (say hostname HOSTX, username testuser) with virsh -c qemu+ssh://testusers@HOSTX/system always results in
error: failed to connect to the hypervisor error: internal error: received hangup / error event on socket
Now it works. I suddenly got prompted to accept the ssh host key of the target server, and it worked. The only thing I changed was to have a libvirt.conf for the user, to set some aliases and a default uri. Maybe that was it. Regards, Johannes - -- In the beginning there was nothing. God said, 'Let there be light!' And there was light. There was still nothing, but you could see it a whole lot better. (Ellen DeGeneres) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/ iEYEARECAAYFAlM2c9cACgkQzi3gQ/xETbI17gCeMwbjq6Sc5AgK6a2SMJrGHt98 RRcAnit3u4EO0z23pwkYYDEasZAaJdH0 =KPmz -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 03/24/2014 02:49 PM, Johannes Kastl wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi everyone,
maybe this is an old issue, but I am just starting to set up my machines with libvirt and qemu-kvm, and tried using a remote connection.
I already changed the following lines in libvirtd.conf: unix_sock_group = "libvirt" unix_sock_rw_perms = "0770" auth_unix_rw = "none"
I made my user a member of said group 'libvirt'. And I restarted both libvirtd and polkit.
I can connect as local user via virsh -c qemu:///sytem without a password prompt. I can also ssh into the remote host with my ssh key without problems.
Trying from another machine (say hostname HOSTX, username testuser) with virsh -c qemu+ssh://testusers@HOSTX/system always results in
error: failed to connect to the hypervisor error: internal error: received hangup / error event on socket
Unfortunately, you can't use polkit remotely. I think you are suffering the same problem I wasted time investigating several years ago http://www.redhat.com/archives/libvir-list/2010-November/msg00820.html Regards, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
participants (2)
-
Jim Fehlig
-
Johannes Kastl