From unknown Wed Apr 15 05:45:01 2026
MIME-Version: 1.0
X-Mailer: MIME-tools 5.507 (Entity 5.507)
X-Loop: owner@bugs.x2go.org
From: owner@bugs.x2go.org (X2Go Bug Tracking System)
Subject: Bug#1031 closed by Mihai Moldovan <ionic@ionic.de> (Re:
 [X2Go-Dev] x2goserver stops accepting new sessions after some years of
 working)
Message-ID: <handler.1031.b1031.151288407226047.notifdone@bugs.x2go.org>
References: <06bd4c45-a05b-92c3-78b7-e15c0b783ec0@ionic.de>
X-X2go-PR-Keywords: patch
X-X2go-PR-Message: they-closed 1031
X-X2go-PR-Package: x2goserver
X-X2go-PR-Source: x2goserver
Date: Sun, 10 Dec 2017 05:35:03 +0000
Content-Type: multipart/mixed; boundary="----------=_1512884103-26081-0"

This is a multi-part message in MIME format...

------------=_1512884103-26081-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

This is an automatic notification regarding your Bug report
which was filed against the x2goserver package:

#1031: x2goserver stops accepting new sessions after some years of working

It has been closed by Mihai Moldovan <ionic@ionic.de>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mihai Moldovan <ionic@=
ionic.de> by
replying to this email.


--=20
1031: http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=3D1031
X2Go Bug Tracking System
Contact owner@bugs.x2go.org with problems

------------=_1512884103-26081-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 1031) by bugs.x2go.org; 10 Dec 2017 05:34:32 +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=0.7 required=3.0 tests=BAYES_20,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,RDNS_NONE 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 8F1675DAD0
	for <1031@bugs.x2go.org>; Sun, 10 Dec 2017 06:34:30 +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 0vr7h8sYu1gP for <1031@bugs.x2go.org>;
	Sun, 10 Dec 2017 06:34:13 +0100 (CET)
Received: from mail.ionic.de (unknown [IPv6:2001:41d0:a:588b:1::2])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 3ADDE5DACF
	for <1031@bugs.x2go.org>; Sun, 10 Dec 2017 06:34:12 +0100 (CET)
Received: from [10.30.40.2] (178.162.222.41.adsl.inet-telecom.org [178.162.222.41])
	by mail.ionic.de (Postfix) with ESMTPSA id D554A4F05093;
	Sun, 10 Dec 2017 06:34:11 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ionic.de; s=default;
	t=1512884052; bh=Sitlp5/Je3OXvax8tjqsJMlWd8mFqMziAx+40HR3+u0=;
	h=Subject:To:References:From:Date:In-Reply-To:From;
	b=K2pZQlobxA9dFdaxCsmkVDawjZ54m5sUZa4MJ26cBdnyV8Ji38DTtQsjmG2mcKbSu
	 n9e+GCsQGpx2fqkDW4PE/WOzHIq3D6uPTlNn3+Zrb0tryWRWJs88ZVhCA0b+ylL8mn
	 YD/0RhiZqZsUMw4OgkwoRuNIZr9uft1fIL+c1C0g=
Subject: Re: [X2Go-Dev] x2goserver stops accepting new sessions after some
 years of working
To: Arne Wichmann <aw@anhrefn.saar.de>, 1031@bugs.x2go.org
References: <20160429134629.GB17740@anhrefn.saar.de>
From: Mihai Moldovan <ionic@ionic.de>
Message-ID: <06bd4c45-a05b-92c3-78b7-e15c0b783ec0@ionic.de>
Date: Sun, 10 Dec 2017 06:34:07 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <20160429134629.GB17740@anhrefn.saar.de>
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="dFOnqHiFXJoaAuClioSsVjp1SCm1xaJxb"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--dFOnqHiFXJoaAuClioSsVjp1SCm1xaJxb
Content-Type: multipart/mixed; boundary="L3eNvTIwmndbDiR6Ch1s5smRUnOab0UPm";
 protected-headers="v1"
From: Mihai Moldovan <ionic@ionic.de>
To: Arne Wichmann <aw@anhrefn.saar.de>, 1031@bugs.x2go.org
Message-ID: <06bd4c45-a05b-92c3-78b7-e15c0b783ec0@ionic.de>
Subject: Re: [X2Go-Dev] x2goserver stops accepting new sessions after some
 years of working
References: <20160429134629.GB17740@anhrefn.saar.de>
In-Reply-To: <20160429134629.GB17740@anhrefn.saar.de>

--L3eNvTIwmndbDiR6Ch1s5smRUnOab0UPm
Content-Type: text/plain; charset=windows-1252
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

control: close -1


* On 04/29/2016 03:46 PM, Arne Wichmann wrote:
> After some years of working x2goserver stopped accepting sessions - aft=
er
> some debugging it turned out that the list of used ports in the databas=
e
> was never cleaned up.

It looks like this bug was fixed in X2Go Server 3.1.0.0 (shortly after th=
e
version you are/have been using.)

Closing up.



Mihai


--L3eNvTIwmndbDiR6Ch1s5smRUnOab0UPm--

--dFOnqHiFXJoaAuClioSsVjp1SCm1xaJxb
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCgAdFiEEbhHQj3UzgcdE8cg8H9Yu2W4lOocFAlosx1AACgkQH9Yu2W4l
OocE4xAAptGIpUx7105s4FBkd+WABqSHiQ/hedRCNdILWC9KAoiaWT4q+U1g35nV
5webauN6HwzQqwhNF8XzKnTEjjUvhF8pq/CwLHzoReOHHuNnJka4ggvE6XlG+JI5
emZVVz7UnRWsO+kZgpmLTMgCEMqwmzGKP/siqsbStnFduZIZzAthLq0hLUMzfKz0
wrWaQhjvTcB3BvHj+CMI6/tszR5wNS9DJNDnp/X7mbjr2TPwUsvRaV2yuOPLXHBE
OyPbC3xWC8tvht4rjiEtIf3iRgFgHWJu9GjdnQh6U7rRL90LqpzDGn3Y/2aYDyiS
XbB1MN1IRFIggMWw2JaHMk59/I7g+fvh6t/6boUYf//vgM9p9Zzp0in6Q3pKhrsz
203z0+nfM1r4+6xK/GFfednbwaLtCdiRSzrNaeWT6xn68xBCyDFtBYDKdGlR8DwF
mJAiandiyPInERo/AmJDD43tlcgUuozLXL3LbrhIQpxCXgxIwKzB7fZ/YjGuNegW
3u08OdVlzNp2fZBtHDoFpQvmxOD5Xo+wpbFOfNWgm/a8id3ORpZWK0Xp4FiVIh/c
y/35vqmCJTms1M+3jY+uVrZNKORHgAxs1/GaxkJgjDKy6zOoIGNzhljpqCdxIHv3
lXMJiunYIkDPe58zvJas8h/e2jAloFiJV5eJ3xBcBds/d/8xG5c=
=nNQA
-----END PGP SIGNATURE-----

--dFOnqHiFXJoaAuClioSsVjp1SCm1xaJxb--


------------=_1512884103-26081-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by bugs.x2go.org; 29 Apr 2016 13:51:44 +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,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 87E855DA98
	for <submit@bugs.x2go.org>; Fri, 29 Apr 2016 15:51:42 +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 QPlsTb0aZZHX for <submit@bugs.x2go.org>;
	Fri, 29 Apr 2016 15:51:36 +0200 (CEST)
X-Greylist: delayed 305 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Fri, 29 Apr 2016 15:51:36 CEST
Received: from apu.snow-crash.org (apu.snow-crash.org [78.47.227.179])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 299EA5DA93
	for <submit@bugs.x2go.org>; Fri, 29 Apr 2016 15:51:36 +0200 (CEST)
Received: from chao.old-forest.org (arne.local [10.99.0.2])
	by apu.snow-crash.org (Postfix) with ESMTP id 23ACC81EB6
	for <submit@bugs.x2go.org>; Fri, 29 Apr 2016 15:46:31 +0200 (CEST)
Received: from anhrefn ([192.168.10.23] helo=anhrefn.saar.de)
	by chao.old-forest.org with esmtps (Exim 4.84_2)
	(envelope-from <aw@old-forest.org>)
	id 1aw8kX-0002kq-F9
	for submit@bugs.x2go.org; Fri, 29 Apr 2016 15:46:30 +0200
Received: from aw by anhrefn.saar.de with local (Exim 4.87)
	(envelope-from <aw@old-forest.org>)
	id 1aw8kX-0005eQ-BT
	for submit@bugs.x2go.org; Fri, 29 Apr 2016 15:46:29 +0200
Date: Fri, 29 Apr 2016 15:46:29 +0200
From: Arne Wichmann <aw@anhrefn.saar.de>
To: submit@bugs.x2go.org
Subject: x2goserver stops accepting new sessions after some years of working
Message-ID: <20160429134629.GB17740@anhrefn.saar.de>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="uZ3hkaAS1mZxFaxD"
Content-Disposition: inline
Return-Receipt-To: aw@anhrefn.saar.de
X-message-flag: Outluck ist kaputt :-)
User-Agent: Mutt/1.5.23 (2014-03-12)


--uZ3hkaAS1mZxFaxD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: x2goserver
Version: 3.0.99-3
Tags: patch

After some years of working x2goserver stopped accepting sessions - after
some debugging it turned out that the list of used ports in the database
was never cleaned up.

--- /usr/sbin/x2gocleansessions 2016-01-18 12:45:22.794498999 +0100
+++ /usr/sbin/x2gocleansessions.151214  2015-12-14 16:26:55.979026003 +0100
@@ -2,10 +2,6 @@
 use Sys::Hostname;
 use strict;
=20
-use lib "/usr/lib/x2go";
-use x2godbwrapper;=20
-
-
 sub check_pid
 {
    my $pid=3Dshift;
@@ -105,6 +101,5 @@
        }      =20
      }
   }
-  db_cleanports() or warn "cleanports failed";
  }
 }
--- /usr/lib/x2go/x2godbwrapper.pm      2016-01-18 12:05:26.544499000 +0100
+++ /usr/lib/x2go/x2godbwrapper.pm.151214       2015-12-14 16:25:17.7590260=
03 +0100
@@ -59,12 +59,10 @@
=20
 use base 'Exporter';
=20
-our @EXPORT=3D('db_listsessions','db_listsessions_all', 'db_getservers',
-  'db_getagent', 'db_resume', 'db_changestatus', 'db_getdisplays',
-  'db_insertsession', 'db_getports', 'db_insertport', 'db_createsession',
-  'db_insertmount', 'db_getmounts', 'db_deletemount', 'db_getdisplay',
-  'dbsys_getmounts', 'dbsys_listsessionsroot', 'dbsys_listsessionsroot_all=
',
-  'dbsys_rmsessionsroot', 'db_cleanports');
+our @EXPORT=3D('db_listsessions','db_listsessions_all', 'db_getservers', '=
db_getagent', 'db_resume', 'db_changestatus',=20
+            'db_getdisplays', 'db_insertsession', 'db_getports', 'db_inser=
tport', 'db_createsession', 'db_insertmount',=20
+            'db_getmounts', 'db_deletemount', 'db_getdisplay', 'dbsys_getm=
ounts', 'dbsys_listsessionsroot',=20
+            'dbsys_listsessionsroot_all', 'dbsys_rmsessionsroot');
=20
            =20
            =20
@@ -409,15 +407,7 @@
        {
           return split("\n",`sudo -u x2gouser x2gosqlitewrapper getports $=
server`);
        }
-}
=20
-# throw away all ports for which no matching session exists
-sub db_cleanports {
-  if($backend eq 'postgres') {
-    my $dbh=3DDBI->connect("dbi:Pg:dbname=3D$db;host=3D$host;port=3D$port;=
", "$dbuser", "$dbpass",{AutoCommit =3D> 1}) or die $_;
-    my $sth=3D$dbh->prepare("delete from used_ports where port in (select =
port from used_ports natural left join sessions  where status is null)");
-    $sth->execute()or die;
-  } else { die "not implemented - possibly not needed"; }
 }
=20
 sub db_getservers


--=20
[...] If you don't want to be restricted, don't agree to it. If you are
coerced, comply as much as you must to protect yourself, just don't support
it. Noone can free you but yourself. (crag, on Debian Planet)
Arne Wichmann (aw@saar.de)

--uZ3hkaAS1mZxFaxD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXI2WvAAoJEENYfBy4DUs+ijAP/imL35p0voLfYXClaTDJUr1l
h8uIGKuQg+10wiz5wTt2FuRAJFz7uIDplJTpdc2mOtAv7N2o1r0UPmIGN4kFGLkU
heTUvmA1rW0slWK6s0l7grgfdCsAFjn2cxRQXhIrCZENLZr16il7I+1Fovmf/X/V
lv+fxZCYO8Pa77uPji82UfNLtRCoWE7LvY8W1GH2bYDk1v7xOxCTBmoEl6nwkmjR
Lbncu5GltFWNDg9fqQiirmSS/1iW8eQugxdpBUGxDusb9pfRzTLL8FwK4a9f13nu
aPPRk9kwoQ5lTgxnERdFTjza+sm0PvYH9hFL6feq5Px+EwxvC80S2SnAQg6mJ8Wx
iyYlV+Lrwrx5b9Ct6Arue0iVwP/igzIuUDDGYxXihwuMO8pAftXWtes/WZ0wunMi
Ic6yP5a6UOxdLv4Vz03iZoVRDJc51R+x07riJCSIpkth1RNsUCkW6GDn/bcy63K4
gKkuTTXlvxkSbpJgNEsuO+gpNqgkhd3Lyp87xAl/z+TjwELpx1Ahdtf74J/JkfDe
yOsKjL30BaDQzHSAjxvjYh38CHJAKlUpgiuPfOXQcuWFN61k7afZdkCUE12aVV4K
R0yv2zztpUrs+NROpMY5KnZ8pYrJkNz3uGYh+bYPB+4z/aT4fntaAyI/D8wWkbgk
EfWUpGQ0sSeyC1WyW/H7
=Zp7q
-----END PGP SIGNATURE-----

--uZ3hkaAS1mZxFaxD--

------------=_1512884103-26081-0--
