[Pkg-libvirt-maintainers] Bug#659860: virt-manager: seems to connect via qemu+ssh but closes connection immediately again
Cole Robinson
crobinso at redhat.com
Tue Feb 14 11:47:17 UTC 2012
On 02/14/2012 05:40 AM, Martin Steigerwald wrote:
> Package: virt-manager
> Version: 0.9.1-1
> Severity: important
>
> Dear Maintainer,
>
> I installed QEMU+KVM+libvirt-bin onto a server with Debian Wheezy.
> I tried to access this server with virt-manager from my workstation
> using key based SSH authentification without need to enter key
> password due to running SSH agent.
>
> When I try to connect to the server it shows that it connects but
> then very quickly says it is not connected again.
>
> virt-manager --debug shows:
>
> 2012-02-14 11:14:27,190 (connect:108): Showing open connection
> 2012-02-14 11:14:45,471 (connect:350): Generate URI=qemu+ssh://root@frisbie.of.teamix.net/system, auto=False
> 2012-02-14 11:14:45,472 (connect:103): Closing open connection
> 2012-02-14 11:14:45,479 (manager:171): Showing manager
> 2012-02-14 11:14:45,482 (connection:991): Scheduling background open thread for qemu+ssh://root@frisbie.of.teamix.net/system
> 2012-02-14 11:14:45,483 (connection:1177): Background 'open connection' thread is running
> 2012-02-14 11:14:45,712 (connection:1227): Background open thread complete, scheduling notify
> 2012-02-14 11:14:45,717 (connection:1232): Notifying open result
> 2012-02-14 11:14:45,722 (cli:83): Uncaught exception:
> Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/manager.py", line 665, in _connect_error
> if conn.is_remote() and re.search(r"nc: .* -- 'U'", details):
> UnboundLocalError: local variable 'details' referenced before assignment
>
> Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/manager.py", line 665, in _connect_error
> if conn.is_remote() and re.search(r"nc: .* -- 'U'", details):
> UnboundLocalError: local variable 'details' referenced before assignment
>
>
> When I try again I get:
>
> 2012-02-14 11:15:41,505 (connection:991): Scheduling background open thread for qemu+ssh://root@frisbie.of.teamix.net/system
> 2012-02-14 11:15:41,506 (connection:1177): Background 'open connection' thread is running
> 2012-02-14 11:15:41,623 (connection:1227): Background open thread complete, scheduling notify
> 2012-02-14 11:15:41,624 (connection:1232): Notifying open result
> 2012-02-14 11:15:41,627 (cli:83): Uncaught exception:
> Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/manager.py", line 665, in _connect_error
> if conn.is_remote() and re.search(r"nc: .* -- 'U'", details):
> UnboundLocalError: local variable 'details' referenced before assignment
>
> Traceback (most recent call last):
> File "/usr/share/virt-manager/virtManager/manager.py", line 665, in _connect_error
> if conn.is_remote() and re.search(r"nc: .* -- 'U'", details):
> UnboundLocalError: local variable 'details' referenced before assignment
>
>
> Expected results:
>
> virt-manager connects to the server or if it can't gives a meaningful
> error message.
>
>
> Regarding those netcat.openbsd bug reports that are probably related I
> do have netcat.openbsd on my workstation and the server:
>
> mango:~# LANG=C update-alternatives --display nc
> nc - auto mode
> link currently points to /bin/nc.openbsd
> /bin/nc.openbsd - priority 50
> slave nc.1.gz: /usr/share/man/man1/nc_openbsd.1.gz
> slave netcat: /bin/nc.openbsd
> slave netcat.1.gz: /usr/share/man/man1/nc_openbsd.1.gz
> /bin/nc.traditional - priority 10
> slave nc.1.gz: /usr/share/man/man1/nc.traditional.1.gz
> slave netcat: /bin/nc.traditional
> slave netcat.1.gz: /usr/share/man/man1/nc.traditional.1.gz
> Current 'best' version is '/bin/nc.openbsd'.
>
> root at frisbie:~# LANG=C update-alternatives --display nc
> nc - auto mode
> link currently points to /bin/nc.openbsd
> /bin/nc.openbsd - priority 50
> slave nc.1.gz: /usr/share/man/man1/nc_openbsd.1.gz
> slave netcat: /bin/nc.openbsd
> slave netcat.1.gz: /usr/share/man/man1/nc_openbsd.1.gz
> /bin/nc.traditional - priority 10
> slave nc.1.gz: /usr/share/man/man1/nc.traditional.1.gz
> slave netcat: /bin/nc.traditional
> slave netcat.1.gz: /usr/share/man/man1/nc.traditional.1.gz
> Current 'best' version is '/bin/nc.openbsd'.
>
>
> Opening an SSH connection to the server works without password due
> to SSH agent:
>
> ms at mango:~> ssh root at frisbie
> Linux frisbie 3.2.0-1-amd64 #1 SMP Sun Feb 5 15:17:15 UTC 2012 x86_64
> [ ]
> Last login: Tue Feb 14 10:34:07 2012 from mango.of.teamix.net
> root at frisbie:~#
>
> libvirtd is running there:
>
> root at frisbie:~# ps aux | grep libvirt | grep -v grep
> root 1403 0.0 0.0 264532 6628 ? Sl 09:30 0:00 /usr/sbin/libvirtd -d
>
>
> Aside the non-working functionality there seems to be a programming
> error in "/usr/share/virt-manager/virtManager/manager.py" in function
> connect_error, line 665 that might cause that I do not see an error
> message. See the debug output above. Maybe thats the main bug here,
> feel free to retitle as needed.
>
> Ah, this seems to be in a check for some netcat arguments:
>
> 664 hints = []
> 665 if conn.is_remote() and re.search(r"nc: .* -- 'U'", details):
> 666 hints.append(
> 667 _("\n - The remote netcat understands the '-U' option"))
>
>
> So maybe this is actually a dupe of some of the netcat related bugs.
> Feel free to merge if so.
>
Yeah that's fixed upstream:
http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=54d007b2875a887b1579604e45b122dde286b9be
(also for debian guys, here's another unrelated bug fix you might want to pull)
http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=c47fc5454039a9e7093f179c1e06ffc576dc1ad3
> Okay, when I fix this by moving some source lines around, I get the following
> error message:
>
> Unable to connect to libvirt:
>
> Cannot recv data: Value too large for defined data typeVerify that:
> - The 'libvirtd' daemon has been started
>
> Unable to connect to libvirt:
>
> Cannot recv data: Value too large for defined data type
>
> Libvirt URI is: qemu+ssh://root@frisbie.of.teamix.net/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/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
> if ret is None:raise libvirtError('virConnectOpenAuth() failed')
> libvirtError: Cannot recv data: Value too large for defined data type
>
>
> On the console I have:
>
> 2012-02-14 11:33:19,911 (connection:991): Scheduling background open thread for qemu+ssh://root@frisbie.of.teamix.net/system
> 2012-02-14 11:33:19,914 (connection:1177): Background 'open connection' thread is running
> 2012-02-14 11:33:20,031 (connection:1227): Background open thread complete, scheduling notify
> 2012-02-14 11:33:20,032 (connection:1232): Notifying open result
> 2012-02-14 11:33:20,035 (error:80): dialog message: Unable to connect to libvirt:
>
> Cannot recv data: Value too large for defined data typeVerify that:
> - The 'libvirtd' daemon has been started : Unable to connect to libvirt:
>
> Cannot recv data: Value too large for defined data typeVerify that:
> - The 'libvirtd' daemon has been started
>
> Unable to connect to libvirt:
>
> Cannot recv data: Value too large for defined data type
>
> Libvirt URI is: qemu+ssh://root@frisbie.of.teamix.net/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/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
> if ret is None:raise libvirtError('virConnectOpenAuth() failed')
> libvirtError: Cannot recv data: Value too large for defined data type
>
>
> So there seems to be another programming error.
>
> So these are at least two bugs:
> - local variable not defined on in
> /usr/share/virt-manager/virtManager/manager.py on line 665
> (I will attach a patch for this.)
>
> - value too large bug in /usr/lib/python2.7/dist-packages/libvirt.py
>
> Can you split my bug report into two as needed?
>
Haven't seen that error before but should be filed against libvirt. See if you
can reproduce using virsh --connect qemu+ssh://root@frisbie.of.teamix.net/system
More information about the Pkg-libvirt-maintainers
mailing list