X2Go Bug report logs - #1031
x2goserver stops accepting new sessions after some years of working

version graph

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Arne Wichmann <aw@anhrefn.saar.de>

Date: Fri, 29 Apr 2016 13:55:01 UTC

Severity: normal

Tags: patch

Found in version 3.0.99-3

Done: Mihai Moldovan <ionic@ionic.de>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#1031: x2goserver stops accepting new sessions after some years of working
Reply-To: Arne Wichmann <aw@anhrefn.saar.de>, 1031@bugs.x2go.org
Resent-From: Arne Wichmann <aw@anhrefn.saar.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Fri, 29 Apr 2016 13:55:01 +0000
Resent-Message-ID: <handler.1031.B.146193790429634@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 1031
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: patch
Received: via spool by submit@bugs.x2go.org id=B.146193790429634
          (code B); Fri, 29 Apr 2016 13:55:01 +0000
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
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)
[Message part 1 (text/plain, inline)]
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;
 
-use lib "/usr/lib/x2go";
-use x2godbwrapper; 
-
-
 sub check_pid
 {
    my $pid=shift;
@@ -105,6 +101,5 @@
        }       
      }
   }
-  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.759026003 +0100
@@ -59,12 +59,10 @@
 
 use base 'Exporter';
 
-our @EXPORT=('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=('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');
 
             
             
@@ -409,15 +407,7 @@
        {
           return split("\n",`sudo -u x2gouser x2gosqlitewrapper getports $server`);
        }
-}
 
-# throw away all ports for which no matching session exists
-sub db_cleanports {
-  if($backend eq 'postgres') {
-    my $dbh=DBI->connect("dbi:Pg:dbname=$db;host=$host;port=$port;", "$dbuser", "$dbpass",{AutoCommit => 1}) or die $_;
-    my $sth=$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"; }
 }
 
 sub db_getservers


-- 
[...] 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)
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Jul 19 05:29:35 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.