[X2Go-Dev] Bug#1013: x2gobroker-daemon doesn't return error when it can't spawn/bind to port

Stefan Baur X2Go-ML-1 at baur-itcs.de
Tue Mar 22 10:54:43 CET 2016


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20160322/a3506ce8/attachment-0001.pgp>


More information about the x2go-dev mailing list