X2Go Bug report logs - #1013
x2gobroker-daemon doesn't return error when it can't spawn/bind to port

version graph

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

Reported by: Stefan Baur <X2Go-ML-1@baur-itcs.de>

Date: Tue, 22 Mar 2016 09:55:02 UTC

Severity: minor

Tags: pending

Found in version 0.0.3.0

Fixed in version 0.0.4.0

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1013; Package x2gobroker-daemon. (Tue, 22 Mar 2016 09:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 22 Mar 2016 09:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.x2go.org (full text, mbox):

From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: submit@bugs.x2go.org
Subject: x2gobroker-daemon doesn't return error when it can't spawn/bind to port
Date: Tue, 22 Mar 2016 10:54:43 +0100
[Message part 1 (text/plain, inline)]
package: x2gobroker-daemon
version: 0.0.3.0


This is what happened:

node:~# service x2gobroker-daemon stop
[....] Stopping X2Go Session Broker standalone daemon:
x2gobroker-daemonstart-stop-daemon: warning: failed to kill 14170: No
such process
 failed!
# huh, wait, what?
node:~# ps ax | grep brok
 5499 ?        S      0:00 x2gobroker-authservice -s
/run/x2gobroker/x2gobroker-authservice.socket -o root -g x2gobroker -p 0660
18791 pts/0    S+     0:00 grep brok
# no running x2gobroker-daemon, so ...

# let's remove the PID file:
node:~# rm /run/x2gobroker/x2gobroker-daemon.pid

node:~# service x2gobroker-daemon stop
node:~# service x2gobroker-daemon start
[ ok ] Starting X2Go Session Broker standalone daemon: x2gobroker-daemon.
# looking good so far ...

node:~# service x2gobroker-daemon stop
[....] Stopping X2Go Session Broker standalone daemon:
x2gobroker-daemonstart-stop-daemon: warning: failed to kill 18470: No
such process
 failed!
# whoops, again?

node:~# ps ax | grep brok
 5499 ?        S      0:00 x2gobroker-authservice -s
/run/x2gobroker/x2gobroker-authservice.socket -o root -g x2gobroker -p 0660
18791 pts/0    S+     0:00 grep brok
# no running x2gobroker-daemon, so ...

# let's remove the PID file:
node:~# rm /run/x2gobroker/x2gobroker-daemon.pid

# I wonder what a restart will do?
node:~# service x2gobroker-daemon restart
[ ok ] Starting X2Go Session Broker standalone daemon: x2gobroker-daemon.
node:~# service x2gobroker-daemon restart
[....] Stopping X2Go Session Broker standalone daemon:
x2gobroker-daemonstart-stop-daemon: warning: failed to kill 18641: No
such process
 failed!
[warn] X2Go Session Broker: stale PID file
(/run/x2gobroker/x2gobroker-daemon.pid). Delete it manually! ... (warning).
node:~# ps ax | grep brok
 5499 ?        S      0:00 x2gobroker-authservice -s
/run/x2gobroker/x2gobroker-authservice.socket -o root -g x2gobroker -p 0660
18791 pts/0    S+     0:00 grep brok
# and again, no running x2gobroker-daemon :-(


The reason, as I found out later, was, that it tries to bind to
127.0.0.1:8080 by default, and that port is already in use by another
process on that machine.

IMO, this is a bug: when it can't bind to the port, and thus dies, this
should be returned to the start script, so it can report back "FAILED".

-Stefan

-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1013; Package x2gobroker-daemon. (Tue, 22 Mar 2016 11:05:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 22 Mar 2016 11:05:01 GMT) Full text and rfc822 format available.

Message #10 received at 1013@bugs.x2go.org (full text, mbox):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: Stefan Baur <X2Go-ML-1@baur-itcs.de>, 1013@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1013: x2gobroker-daemon doesn't return error when it can't spawn/bind to port
Date: Tue, 22 Mar 2016 11:01:34 +0000
[Message part 1 (text/plain, inline)]
Control: severity -1 minor

HI Stefan,

On  Di 22 Mär 2016 10:54:43 CET, Stefan Baur wrote:

> The reason, as I found out later, was, that it tries to bind to
> 127.0.0.1:8080 by default, and that port is already in use by another
> process on that machine.
>
> IMO, this is a bug: when it can't bind to the port, and thus dies, this
> should be returned to the start script, so it can report back "FAILED".

Yeah, this is a valid issue. Is you system launching x2gobroker-daemon  
via systemd or via System V init scripts?

Mike
-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/mailxchange/kronolith/fb.php?u=m.gabriel%40das-netzwerkteam.de
[Message part 2 (application/pgp-signature, inline)]

Severity set to 'minor' from 'normal' Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to 1013-submit@bugs.x2go.org. (Tue, 22 Mar 2016 11:05:02 GMT) Full text and rfc822 format available.

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1013; Package x2gobroker-daemon. (Tue, 22 Mar 2016 11:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 22 Mar 2016 11:10:03 GMT) Full text and rfc822 format available.

Message #17 received at 1013@bugs.x2go.org (full text, mbox):

From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>, 1013@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1013: x2gobroker-daemon doesn't return error when it can't spawn/bind to port
Date: Tue, 22 Mar 2016 12:03:52 +0100
[Message part 1 (text/plain, inline)]
Am 22.03.2016 um 12:01 schrieb Mike Gabriel:
> 
> Yeah, this is a valid issue. Is you system launching x2gobroker-daemon
> via systemd or via System V init scripts?

This is on System V init, as we've seen SystemD misbehaving with some of
our own init scripts.

Kind Regards,
Stefan

-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1013; Package x2gobroker-daemon. (Thu, 13 Sep 2018 13:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 13 Sep 2018 13:30:02 GMT) Full text and rfc822 format available.

Message #22 received at 1013@bugs.x2go.org (full text, mbox):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: 1013-submitter@bugs.x2go.org
Cc: control@bugs.x2go.org, 1013@bugs.x2go.org
Subject: X2Go issue (in src:x2gobroker) has been marked as pending for release
Date: Thu, 13 Sep 2018 15:26:35 +0200 (CEST)
tag #1013 pending
fixed #1013 0.0.4.0
thanks

Hello,

X2Go issue #1013 (src:x2gobroker) reported by you has been
fixed in X2Go Git. You can see the changelog below, and you can
check the diff of the fix at:

    http://code.x2go.org/gitweb?p=x2gobroker.git;a=commitdiff;h=c3067f0

The issue will most likely be fixed in src:x2gobroker (0.0.4.0).

light+love
X2Go Git Admin (on behalf of the sender of this mail)

---
commit c3067f00df60d43ebbbecf5dd6f0f8da3c4221e4
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Date:   Thu Sep 13 15:26:01 2018 +0200

    bin/x2gobroker: If binding the http server fails, a non-zero exit code should be returned. (Fixes: #1013).

diff --git a/debian/changelog b/debian/changelog
index fc33189..7217c4f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -75,6 +75,8 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium
       install into x2gobroker bin:pkg (on DEB based systems).
     - Makefile.docupload: Add apidoc target (running sphinx-apidoc).
     - docs/source: Initialize Sphinx API documentation's .rst files.
+    - bin/x2gobroker: If binding the http server fails, a non-zero exit code
+      should be returned. (Fixes: #1013).
   * debian/*:
     + Trigger Makefile's install target and install those files. Drop debhelper
       from-source-installation magic.


Added tag(s) pending. Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to control@bugs.x2go.org. (Thu, 13 Sep 2018 13:30:03 GMT) Full text and rfc822 format available.

Marked as fixed in versions 0.0.4.0. Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to control@bugs.x2go.org. (Thu, 13 Sep 2018 13:30:04 GMT) Full text and rfc822 format available.

Message sent on to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
Bug#1013. (Thu, 13 Sep 2018 13:30:04 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Wed Dec 12 02:53:48 2018; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.