From mquero@one-esecurity.com Tue Dec 20 13:08:02 2016 Received: (at submit) by bugs.x2go.org; 20 Dec 2016 12:08:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,HTML_MESSAGE, URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from localhost (localhost [127.0.0.1]) by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 7D42B3CC60 for ; Tue, 20 Dec 2016 13:08:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de Received: from ymir.das-netzwerkteam.de ([127.0.0.1]) by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XAUy3DceTBoK for ; Tue, 20 Dec 2016 13:07:55 +0100 (CET) X-Greylist: delayed 724 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Tue, 20 Dec 2016 13:07:55 CET Received: from jessland.net (200.red-81-47-178.staticip.rima-tde.net [81.47.178.200]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 408CA3CC5F for ; Tue, 20 Dec 2016 13:07:55 +0100 (CET) Received: from [127.0.0.1] (202.red-80-28-148.adsl.static.ccgg.telefonica.net [80.28.148.202]) by jessland.net (8.12.11/8.12.11) with ESMTP id uBIE2L02006592 for ; Sun, 18 Dec 2016 15:02:42 +0100 (CET) To: submit@bugs.x2go.org From: Miguel Quero Subject: x2gobroker-ssh big delay in session status recovery Message-ID: <39e399fd-41ad-bb00-0abd-7b5401bbe82f@one-esecurity.com> Date: Tue, 20 Dec 2016 12:55:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------DEE3B450ED3861DE2173B678" This is a multi-part message in MIME format. --------------DEE3B450ED3861DE2173B678 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Package: x2gobroker Version: 0.0.3.1 When x2gobroker-ssh is used with system with not IPv6 configured, this generate very big delays in x2gobroker listsession task. Before some research, the problem become from x2gobroker.utils portscan function. This function propagates a delay in all agents call because it tests first the IPV6 connection: /ip_proto = 0////try:////socket.getaddrinfo(addr, None, socket.AF_INET6)////ip_proto = 6////except socket.gaierror:////try:////socket.getaddrinfo(addr, None, socket.AF_INET)////ip_proto = 4////except socket.gaierror:////# we can't find a valid address for this host, so returning a failure...////return False /This will be fixed testing IPv4 first or more easily, setting a new option in config to select the ip protocol. Best regards. -- Miguel Quero | One eSecurity | www.one-esecurity.com M: +34 608 36 17 05 Europe (Spain): +34 911 011 000 PGP: 0x34AA 050B D15C 7593 5671 3748 40C6 8E95 6C5A 40D3 --------------DEE3B450ED3861DE2173B678 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
Package: x2gobroker
Version: 0.0.3.1

When x2gobroker-ssh is used with system with not IPv6 configured, this generate very big delays in x2gobroker listsession task.

Before some research, the problem become from x2gobroker.utils portscan function.

This function propagates a delay in all agents call because it tests first the IPV6 connection:

    ip_proto = 0
    try:
        socket.getaddrinfo(addr, None, socket.AF_INET6)
        ip_proto = 6
    except socket.gaierror:
        try:
            socket.getaddrinfo(addr, None, socket.AF_INET)
            ip_proto = 4
        except socket.gaierror:
            # we can't find a valid address for this host, so returning a failure...
            return False

This will be fixed testing IPv4 first or more easily, setting a new option in config to select the ip protocol.

Best regards.
 

-- 
Miguel Quero | One eSecurity | www.one-esecurity.com
M: +34 608 36 17 05
Europe (Spain): +34 911 011 000
PGP: 0x34AA 050B D15C 7593 5671 3748 40C6 8E95 6C5A 40D3
--------------DEE3B450ED3861DE2173B678-- From mike.gabriel@das-netzwerkteam.de Thu Sep 13 14:27:28 2018 Received: (at 1129) by bugs.x2go.org; 13 Sep 2018 12:27:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=BAYES_00,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.1 Received: from localhost (localhost [127.0.0.1]) by ymir.das-netzwerkteam.de (Postfix) with ESMTP id D5B375DAEE for <1129@bugs.x2go.org>; Thu, 13 Sep 2018 14:27:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de Received: from ymir.das-netzwerkteam.de ([127.0.0.1]) by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TsKBpbp0iG8O for <1129@bugs.x2go.org>; Thu, 13 Sep 2018 14:27:22 +0200 (CEST) Received: from fregna.das-netzwerkteam.de (unknown [IPv6:2a01:4f8:202:1381::1]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id BA3E75DA81 for <1129@bugs.x2go.org>; Thu, 13 Sep 2018 14:27:21 +0200 (CEST) Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [148.251.201.105]) by fregna.das-netzwerkteam.de (Postfix) with ESMTPS id 9D94F604F6; Thu, 13 Sep 2018 12:27:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 93631C2711; Thu, 13 Sep 2018 14:27:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de Received: from grimnir.das-netzwerkteam.de ([127.0.0.1]) by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eMdSreIgEGzl; Thu, 13 Sep 2018 14:27:16 +0200 (CEST) Received: from das-netzwerkteam.de (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id F27AFC2690; Thu, 13 Sep 2018 14:27:15 +0200 (CEST) Received: from bifrost.das-netzwerkteam.de (bifrost.das-netzwerkteam.de [178.62.101.154]) by mail.das-netzwerkteam.de (Horde Framework) with HTTPS; Thu, 13 Sep 2018 12:27:15 +0000 Date: Thu, 13 Sep 2018 12:27:15 +0000 Message-ID: <20180913122715.Horde.BYMw_KeaXSF6jGAoUKkBre5@mail.das-netzwerkteam.de> From: Mike Gabriel To: 1129@bugs.x2go.org Cc: Miguel Quero Subject: Re: x2gobroker-ssh big delay in session status recovery User-Agent: Horde Application Framework 5 Accept-Language: de,en Organization: DAS-NETZWERKTEAM X-Originating-IP: 178.62.101.154 X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Content-Type: multipart/signed; boundary="=_0kSUhmj5L8YYuBGj6jRP6r5"; protocol="application/pgp-signature"; micalg=pgp-sha256 MIME-Version: 1.0 This message is in MIME format and has been PGP signed. --=_0kSUhmj5L8YYuBGj6jRP6r5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dear Miguel, > Package: x2gobroker > Version: 0.0.3.1 > > When x2gobroker-ssh is used with system with not IPv6 configured,=20=20 >=20this generate very big delays in x2gobroker listsession task. > > Before some research, the problem become from x2gobroker.utils=20=20 >=20portscan function. > > This function propagates a delay in all agents call because it tests=20= =20 >=20first the IPV6 connection: > > /ip_proto =3D 0////try:////socket.getaddrinfo(addr, None,=20=20 >=20socket.AF_INET6)////ip_proto =3D 6////except=20=20 >=20socket.gaierror:////try:////socket.getaddrinfo(addr, None,=20=20 >=20socket.AF_INET)////ip_proto =3D 4////except socket.gaierror:////# we=20= =20 >=20can't find a valid address for this host, so returning a=20=20 >=20failure...////return False /This will be fixed testing IPv4 first or=20= =20 >=20more easily, setting a new option in config to select the ip protocol. > A while ago you reported the above issue. I tested this now. The portscan function in x2gobroker.utils is really fast when=20=20 detecting=20that a remote host is not IPv6 supportive. It basically is a=20= =20 fast=20DNS query. Is it so, that your client system has IPv4 disabled entirely (in the=20=20 kernel)?=20Or what exactly did you mean by "When x2gobroker-ssh is used=20= =20 with=20system with not IPv6 configured..."? I am willing to do more test, please provide more info. You possibly=20=20 also=20have found a fix meanwhile. If so, I'd be happy, if you could=20=20 share=20it. Thanks Mike --=20 DAS-NETZWERKTEAM mike=20gabriel, herweg 7, 24357 fleckeby mobile: +49 (1520) 1976 148 landline: +49 (4354) 8390 139 GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de --=_0kSUhmj5L8YYuBGj6jRP6r5 Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIzBAABCAAdFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAluaV6MACgkQmvRrMCV3 GzGieRAArKvnkiN2vPasZpo6kQVT8R5zdJWSe5j+fiF0DR7Anb2+9bXl3rdUNiNx 1nYBvgM3epkgiZyI3fcYoTyDhn+h7us8G950S82L3CJ05os8ZFd/62M0ynzNBSY+ lAzHrN72KdGKyH4Ilfda50LVZkf/ZjTSm6MFfmJe4nqbQ1qziZaUAh+qXkOb2k6K Ku56MYt+6H8c2VQz8bL7ZLXyTF55qS1hpdSxpccjeNCDoAnvykIMMV/YzeVtUCLz yG+6s2in+1EtJfubAg6+B6ZUdza7LwBlTy+/V6PeJ/CuXry6R7+VenOOO/bZTlGr NiuqC/h1gIJqbdhYfi0t0cMpdm4toXdMa0qxZH4/xQK+xI2Fo1QAB+OlXiM7o3m1 gbkQG8rY22/VcMxXOU4I6KljniKzuGZmiUi4DAIlRNxRJKvpOv3g/7E5l826DNM/ pay/FkbsdJNGYrgl5+jTWRrfe1Qi+qpkP/0XB5044YnT1XQFQJJ2LJ4/Z0/O7BgU HCirWNkhFerz4BQluh9Dr+CIRK626D1s7RzKk7TTDS4vsVOwypnUletyKtKjV/k4 D2xFueYWUjFKoVW5UhBYgSrYoVUFZk5O/hkPG2atMm7n3G65lFg1OKgb2x76YKka 6gI3W+7AgViGHg+E70kAM1a77EuTi0f5aSwfJyiGRVV+BCHdcjs= =zOhK -----END PGP SIGNATURE----- --=_0kSUhmj5L8YYuBGj6jRP6r5--