• virt-manager: Cannot recv data: Connection reset by peer

    From Ceppo@21:1/5 to All on Wed Jun 12 17:40:01 2024
    Context: I am on sid, so random breakage is expected. This time it happened somewhere between virt-manager and KVM, and I got stuck as I don't know much about KVM and emulation general.

    I have been using virt-manager to manage virtual machine with QEMU/KVM user session for some months without any issue. From monday the session is "Not Connected" and when I try to connect I get the following message:

    Unable to connect to libvirt qemu:///session.

    Cannot recv data: Connection reset by peer

    and Details:

    Unable to connect to libvirt qemu:///session.

    Cannot recv data: Connection reset by peer

    Libvirt URI is: qemu:///session

    Traceback (most recent call last):
    File "/usr/share/virt-manager/virtManager/connection.py", line 923, in _do_open
    self._backend.open(cb, data)
    File "/usr/share/virt-manager/virtinst/connection.py", line 171, in open
    conn = libvirt.openAuth(self._open_uri,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/libvirt.py", line 147, in openAuth
    raise libvirtError('virConnectOpenAuth() failed')
    libvirt.libvirtError: Cannot recv data: Connection reset by peer

    I supposed something happened when I upgraded my (host) machine with aptitude full-upgrade, and in fact aptitude logs include the following:

    [UPGRADE] libvirt-daemon-driver-qemu:amd64 10.3.0-3 -> 10.4.0-1
    [UPGRADE] python3-libvirt:amd64 10.3.0-1 -> 10.4.0-1
    [UPGRADE] qemu-block-extra:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-common:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-data:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-gui:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-modules-opengl:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-modules-spice:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-x86:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-utils:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2

    But I couldn't find anything interesting in their changelogs.
    The usual online forums digging suggested to make sure that libvirtd is active [1] - and it does. I also experimented with solutions proposed for similar but different issues, to no avail. Here I got stuck.
    Someone can help me investigate or resolve the issue?



    [1]: https://bbs.archlinux.org/viewtopic.php?id=289546z



    --
    Ceppo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bruno Kleinert@21:1/5 to All on Fri Jun 28 18:30:02 2024
    --=-kfFwkZN90XiJQe1CizoH
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    Am Mittwoch, dem 12.06.2024 um 15:30 +0000 schrieb Ceppo:
    Context: I am on sid, so random breakage is expected. This time it happened somewhere between virt-manager and KVM, and I got stuck as I don't know much about KVM and emulation general.

    I have been using virt-manager to manage virtual machine with QEMU/KVM user session for some months without any issue. From monday the session is "Not Connected" and when I try to connect I get the following message:

    Unable to connect to libvirt qemu:///session.

    Cannot recv data: Connection reset by peer

    and Details:

    Unable to connect to libvirt qemu:///session.

    Cannot recv data: Connection reset by peer

    Libvirt URI is: qemu:///session

    Traceback (most recent call last):
    File "/usr/share/virt-manager/virtManager/connection.py", line 923, in _do_open
    self._backend.open(cb, data)
    File "/usr/share/virt-manager/virtinst/connection.py", line 171, in open
    conn = libvirt.openAuth(self._open_uri,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/libvirt.py", line 147, in openAuth
    raise libvirtError('virConnectOpenAuth() failed')
    libvirt.libvirtError: Cannot recv data: Connection reset by peer

    I supposed something happened when I upgraded my (host) machine with aptitude full-upgrade, and in fact aptitude logs include the following:

    [UPGRADE] libvirt-daemon-driver-qemu:amd64 10.3.0-3 -> 10.4.0-1
    [UPGRADE] python3-libvirt:amd64 10.3.0-1 -> 10.4.0-1
    [UPGRADE] qemu-block-extra:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-common:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-data:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-gui:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-modules-opengl:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-modules-spice:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-system-x86:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2
    [UPGRADE] qemu-utils:amd64 1:8.2.4+ds-1 -> 1:8.2.4+ds-2

    But I couldn't find anything interesting in their changelogs.
    The usual online forums digging suggested to make sure that libvirtd is active
    [1] - and it does. I also experimented with solutions proposed for similar but
    different issues, to no avail. Here I got stuck.
    Someone can help me investigate or resolve the issue?



    [1]: https://bbs.archlinux.org/viewtopic.php?id=289546z



    --
    Ceppo


    Hi Ceppo,

    FWIW, if you're running firewalld on that machine that seems somewhat
    related: https://libvirt.org/firewall.html#firewalld-and-the-virtual-network-driver

    I'm affected by the same issue, digged a little around but still have
    no clue what's going wrong.

    Regards,
    Bruno

    --=-kfFwkZN90XiJQe1CizoH
    Content-Type: text/html; charset="utf-8"
    Content-Transfer-Encoding: quoted-printable

    <html><head><style>pre,code,address {
    margin: 0px;
    }
    h1,h2,h3,h4,h5,h6 {
    margin-top: 0.2em;
    margin-bottom: 0.2em;
    }
    ol,ul {
    margin-top: 0em;
    margin-bottom: 0em;
    }
    blockquote {
    margin-top: 0em;
    margin-bottom: 0em;
    }
    </style></head><body><div>Am Mittwoch, dem 12.06.2024 um 15:30 +0000 schrieb Ceppo:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>Context: I am on sid, so random breakage is expected. This
    time it happened</pre><pre>somewhere between virt-manager and KVM, and I got stuck as I don't know much</pre><pre>about KVM and emulation general.</pre><pre><br></pre><pre>I have been using virt-manager to manage virtual machine with QEMU/KVM user</pre><
    session for some months without any issue. From monday the session is "Not</pre><pre>Connected" and when I try to connect I get the following message:</pre><pre><br></pre><pre> Unable to connect to libvirt qemu:///session.</pre><pre><br></pre><pre>
    Cannot recv data: Connection reset by peer</pre><pre><br></pre><pre>and Details:</pre><pre><br></pre><pre> Unable to connect to libvirt qemu:///session.</pre><pre><br></pre><pre> Cannot recv data: Connection reset by peer</pre><pre><br></pre><pre>
    Libvirt URI is: qemu:///session</pre><pre><br></pre><pre> Traceback (most recent call last):</pre><pre> File "/usr/share/virt-manager/virtManager/connection.py", line 923, in _do_open</pre><pre> self._backend.open(cb, data)</pre><pre> File "/usr/
    share/virt-manager/virtinst/connection.py", line 171, in open</pre><pre> conn = libvirt.openAuth(self._open_uri,</pre><pre> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</pre><pre> File "/usr/lib/python3/dist-packages/libvirt.py", line 147, in
    openAuth</pre><pre> raise libvirtError('virConnectOpenAuth() failed')</pre><pre> libvirt.libvirtError: Cannot recv data: Connection reset by peer</pre><pre><br></pre><pre>I supposed something happened when I upgraded my (host) machine with aptitude</
    <pre>full-upgrade, and in fact aptitude logs include the following:</pre><pre><br></pre><pre> [UPGRADE] libvirt-daemon-driver-qemu:amd64 10.3.0-3 -&gt; 10.4.0-1</pre><pre> [UPGRADE] python3-libvirt:amd64 10.3.0-1 -&gt; 10.4.0-1</pre><pre> [
    UPGRADE] qemu-block-extra:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre> [UPGRADE] qemu-system-common:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre> [UPGRADE] qemu-system-data:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre> [UPGRADE] qemu-
    system-gui:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre> [UPGRADE] qemu-system-modules-opengl:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre> [UPGRADE] qemu-system-modules-spice:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre> [UPGRADE] qemu-
    system-x86:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre> [UPGRADE] qemu-utils:amd64 1:8.2.4+ds-1 -&gt; 1:8.2.4+ds-2</pre><pre><br></pre><pre>But I couldn't find anything interesting in their changelogs.</pre><pre>The usual online forums digging
    suggested to make sure that libvirtd is active</pre><pre>[1] - and it does. I also experimented with solutions proposed for similar but</pre><pre>different issues, to no avail. Here I got stuck.</pre><pre>Someone can help me investigate or resolve the
    issue?</pre><pre><br></pre><pre><br></pre><pre><br></pre><pre>[1]: <a href="https://bbs.archlinux.org/viewtopic.php?id=289546z">https://bbs.archlinux.org/viewtopic.php?id=289546z</a></pre><pre><br></pre><pre><br></pre><pre><br></pre><pre>--</pre><pre>
    Ceppo</pre><pre><br></pre></blockquote><div><br></div><div>Hi Ceppo,</div><div><br></div><div>FWIW, if you're running firewalld on that machine that seems somewhat related: <a href="https://libvirt.org/firewall.html#firewalld-and-the-virtual-network-
    driver">https://libvirt.org/firewall.html#firewalld-and-the-virtual-network-driver</a></div><div><br></div><div>I'm affected by the same issue, digged a little around but still have no clue what's going wrong.</div><div><br></div><div>Regards,</div><div>
    Bruno</div><div><span></span></div></body></html>

    --=-kfFwkZN90XiJQe1CizoH--

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEbNBoYg3hPRuThXIzSwBpzPZSeEcFAmZ+4TMACgkQSwBpzPZS eEe2BQ/+OJcVhC+6Y6LZlLWjCm0hfd2HvNWl8mumobHLC4T4hKOnnuj6W1hks1BV LBzVBkiQCVbM+o4Obuf1oXk0t58dgHJovEBA8zw7+WlJxPRD8r2l6PPQpncEK8vu 9EbTUiQP61vYQQp0UY26BbcUCiMlHkHouYxTNAegY5CoZnpi1rHjwJa78DiGsykc JAuP5I2wY/FQbrkqPCGbE10ceke/MQ6AKjZ52ieRf/J8KO82ORqvntNI8m55eXFN DoyH52su4AHSwkkCvwf/Ua1vqM/+d/3GTMsXZgHb1J1mZ5OeU2IfPUOg9BtNnAfk 9SzQ519nEztrK9hYfF5wJqAIbIVptuEOYgLbLsRcKNycGbt9K4i3OD81h2wM3U5/ +giZdkdlj7I6yyzvmMX0FUTc3cJzGUybvg9RfonOWeLzZPMZj0Vb5skxTtpxWfeH 1qloVl0I143ErVNm24+l7OO+rf0KfMZRjAP/8zTvnhp8O2OT8UgqGbR4Dec/df94 D5/IdwLwnY7G5ejpMUupHCN7kL+3LOAZHPMnNmK0YE1GU9URj16AOf++yYAw86qe 8SKVlAxm3IzXuEmWvj3V+1DrIKNrVrkHxOWnEl7dNYNrR0b2KDKbBtIbMkH8NRLK EFLNadNF0SgLgQ9T0i1Ig1JdYEC0173yoHCRqb+xQqQ166wjykY=
    =nbup
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ceppo@21:1/5 to Bruno Kleinert on Tue Jul 2 18:30:01 2024
    On Fri, Jun 28, 2024 at 06:13:39PM GMT, Bruno Kleinert wrote:
    Am Mittwoch, dem 12.06.2024 um 15:30 +0000 schrieb Ceppo:
    FWIW, if you're running firewalld on that machine that seems somewhat related: https://libvirt.org/firewall.html#firewalld-and-the-virtual-network-driver

    I'm affected by the same issue, digged a little around but still have
    no clue what's going wrong.

    Hi Bruno, thanks for answering!
    I don't have firewalld installed, but your message let me explore the issue again and reading some forum threads I found something weird.
    Just after I boot my system, virt-manager behaves the same as a few weeks ago and the default network is not active:

    ceppo@mypc:~$ sudo virsh net-info default
    Name: default
    UUID: e2a6d5a1-e57e-4281-ad59-6af1f54112e2
    Active: no
    Persistent: yes
    Autostart: no
    Bridge: virbr0

    Also, if I run `sudo virsh net-destroy default`, I get the expected result:

    error: Failed to destroy network default
    error: Requested operation is not valid: network 'default' is not active

    But if I run virt-manager after that, it connects to the user session but
    the network doesn't work for guest machines - which makes sense.

    Is this of any use to understand what's the issue? If you can't help, I think I will file a bug report.


    --
    Ceppo

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEdITIc+KDsfJi9wdlzV8M+/K0eFUFAmaEKcoACgkQzV8M+/K0 eFXwBw//WAmPPO+Xai5NOSU/caM0Lc19P9i6OOKF+fT0kHKiLk9fzaYUUMr73lkv K6Ege9gUFwQ06zMRjzxcb4awACFikC4zIQjxib9GKrSD0OutICwBMVdRDD+hzklm wkDqlv4pi2s9O679wWDwlWOw3BaZUHxkrMnLz8hoqLHm4Vq7lGAQ0OWcWckVhoCA 41UZJIawWB2UJB28Raig+3oNZbxeG1fyIUOzdkkWST64rxea/t1XjoruMt9GpbmN 4POkzWcc+Anc1OEuT+H5mFowWH7f+PAUZjQylis/wZspweoa1H4ut8eERINLSnCx rvAceKjjCUISc3UfxDk0+XfiZ4ymhseLskltk/YuvBFFfVTigoJE6/rz3yenonAO OghTj078nWVzln5/HTkz7O67ATL8AwNXF+A5ZAeKGtPt3SbJvwyhhbMyfwYPxobS CCAPaWtStCTdxD3CAItj+m+tKOfzjSZc2VkMRvlLLSq/ubehdz9v0RzKHukfRUfm JatV53UdQGZliN54HRYGck3QUrV+WtDVFM2Wl2psK9Ay0ROQSDYXlim3OZ1AwloZ f10AQ4YBNNZK33WLpfSTyHx0QJS0jlh6V3PHonHmdlnjXMy78YjG+wEdwaV2DkT/ azlLowubFn8NYbTtzwUmu1SpCcwl4uQxNGxV50t50yu8DVxTH+Q=
    =H/aK
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)