From unknown Fri Mar 29 08:26:24 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#806: x2goserver database problems was root cause? Reply-To: Jason Alavaliant , 806@bugs.x2go.org Resent-From: Jason Alavaliant Resent-To: x2go-dev@lists.x2go.org Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Mon, 09 Mar 2015 01:15:01 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.x2go.org X-X2Go-PR-Message: followup 806 X-X2Go-PR-Package: x2goclient X-X2Go-PR-Keywords: Received: via spool by 806-submit@bugs.x2go.org id=B806.1425863478646 (code B ref 806); Mon, 09 Mar 2015 01:15:01 +0000 Received: (at 806) by bugs.x2go.org; 9 Mar 2015 01:11:18 +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=5.0 tests=BAYES_50 autolearn=ham version=3.3.2 X-Greylist: delayed 2463 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Mon, 09 Mar 2015 02:11:16 CET Received: from thetower.ra09.com (ra09.com [202.124.104.240]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id CDA825DBC9 for <806@bugs.x2go.org>; Mon, 9 Mar 2015 02:11:15 +0100 (CET) Received: from localhost ([127.0.0.1] helo=private.ra09.com) by thetower.ra09.com with esmtp (Exim 4.80) (envelope-from ) id 1YUlaC-0006hc-9m for 806@bugs.x2go.org; Mon, 09 Mar 2015 13:30:08 +1300 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 09 Mar 2015 13:30:08 +1300 From: Jason Alavaliant To: 806@bugs.x2go.org Message-ID: <09650b6d2c930f2e87b0fb0c5002b06c@private.ra09.com> X-Sender: alavaliant@ra09.com User-Agent: Roundcube Webmail/1.0.5 Further digging through my install revealed that in the database the used_ports table had 36108 entries recording every port from 30001 up to 66109 in use. The session table didn't have anywhere near that many sessions recorded as in use, so I ran a "delete from used_ports where session_id not in (select session_id from sessions);" which removed 34683 rows from the table. My clients are now getting ports in a much more sensible range provided back from the x2goserver when establishing a connection. Reading the database creation code it looks like there should be a trigger deletes from used_ports when a session table row is removed so I think my database might have somehow failed to create that trigger on creation? Still digging into exactly how the data got into the state it was in.