X2Go Bug report logs - #377
Init scripts (for Debian) not properly working on RPM distros

version graph

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

Reported by: Jan Engelhardt <jengelh@inai.de>

Date: Tue, 17 Dec 2013 14:03:01 UTC

Severity: normal

Found in version 0.0.2.3

Fixed in version 0.0.3.0

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to x2go-dev@lists.berlios.de, X2Go Developers <x2go-dev@lists.berlios.de>:
Bug#377; Package x2gobroker. (Tue, 17 Dec 2013 14:03:01 GMT) (full text, mbox, link).


Acknowledgement sent to Jan Engelhardt <jengelh@inai.de>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.berlios.de>. (Tue, 17 Dec 2013 14:03:01 GMT) (full text, mbox, link).


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

From: Jan Engelhardt <jengelh@inai.de>
To: submit@bugs.x2go.org
Cc: Michael Kromer <mkromer@netitwork.de>
Subject: paramiko fails to recognize known_hosts
Date: Tue, 17 Dec 2013 14:47:20 +0100 (CET)
Package: x2gobroker
Version: 0.0.2.3

When logging into a x2gobroker-0.0.2.3 with paramiko-1.11.0,
it so happens that, for whatever reason, it rejects the
remote side's key despite that being in
/var/lib/x2gobroker/.ssh/known_hosts.


{u'defsndport': False, u'useiconv': False, u'iconvfrom': 'UTF-8', u'height': 768, u'pack': '16m-jpeg', u'export': '', u'quality': 9, u'fullscreen': False, u'layout': '', 'host=terminalsrv2': '172.18.7.216', 'host=terminalsrv1': '172.18.7.205', u'width': 1024, u'speed': 4, u'soundtunnel': False, u'soundsystem': 'pulse', u'print': True, u'type': 'auto', u'sndport': 4713, u'xinerama': True, u'usekbd': True, u'variant': '', u'applications': ['TERMINAL', 'WWWBROWSER', 'MAILCLIENT', 'OFFICE'], u'host': ['terminalsrv1', 'terminalsrv2', 'terminalsrv3'], u'link': 'lan', u'multidisp': False, 'host=terminalsrv3': '172.18.7.214', u'fstunnel': False, u'sound': False, u'rootless': False, u'name': 'Terminalsitzung starten LAN Einstellungen', u'sshproxyport': 22, u'iconvto': 'UTF-8', u'directrdp': False, u'useexports': True, u'command': 'GNOME', u'dpi': 96, u'sshport': 22, u'setdpi': 0, u'startsoundsystem': 'false', u'user': ''}
['terminalsrv1', 'terminalsrv2', 'terminalsrv3']
['terminalsrv3', 'terminalsrv1', 'terminalsrv2']
{u'hostname': 'terminalsrv2', u'port': 22}
starting thread (client mode): 0xe8ded0L
Connected (version 2.0, client OpenSSH_5.1)
kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] server encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] ser
 ver lang:[''] kex follows?False
Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
Switch to new keys ...
/usr/lib64/python2.6/site-packages/paramiko/client.py:95:
UserWarning: Unknown ssh-rsa host key for terminalsrv2: 4d1d9d46a16da7d8c5a3829c920ff5da
  (key.get_name(), hostname, hexlify(key.get_fingerprint())))
['terminalsrv3', 'terminalsrv1']
{u'hostname': 'terminalsrv1', u'port': 22}
starting thread (client mode): 0xe95cd0L
Connected (version 2.0, client OpenSSH_5.1)
kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] server encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] ser
 ver lang:[''] kex follows?False
Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
Switch to new keys ...
/usr/lib64/python2.6/site-packages/paramiko/client.py:95:
UserWarning: Unknown ssh-rsa host key for terminalsrv1: 4d1d9d46a16da7d8c5a3829c920ff5da
  (key.get_name(), hostname, hexlify(key.get_fingerprint())))
thservice.logEOF in transport thread
['terminalsrv3']
{u'hostname': 'terminalsrv3', u'port': 22}
starting thread (client mode): 0xe95290L
Connected (version 2.0, client OpenSSH_5.1)
kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] server encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] ser
 ver lang:[''] kex follows?False
Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
Switch to new keys ...
/usr/lib64/python2.6/site-packages/paramiko/client.py:95:
UserWarning: Unknown ssh-rsa host key for terminalsrv3: 4d1d9d46a16da7d8c5a3829c920ff5da
  (key.get_name(), hostname, hexlify(key.get_fingerprint())))
EOF in transport thread
EOF in transport thread
starting thread (client mode): 0xe8df50L
Connected (version 2.0, client OpenSSH_5.1)
kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] server encrypt:['aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour', 'aes192-cbc', 'aes256-cbc', 'rijndael-cbc@lysator.liu.se', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] ser
 ver lang:[''] kex follows?False
Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
Switch to new keys ...
Traceback (most recent call last):
  File "/usr/sbin/x2gobroker", line 145, in <module>
    tornado.ioloop.IOLoop.instance().start()
  File "/usr/lib64/python2.6/site-packages/tornado/ioloop.py", line 606, in start
    self._run_callback(callback)
  File "/usr/lib64/python2.6/site-packages/tornado/ioloop.py", line 457, in _run_callback
    callback()
  File "/usr/lib64/python2.6/site-packages/tornado/stack_context.py", line 330, in wrapped
    raise_exc_info(exc)
  File "/usr/lib64/python2.6/site-packages/tornado/stack_context.py", line 301, in wrapped
    ret = fn(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/tornado/iostream.py", line 340, in wrapper
    callback(*args)
  File "/usr/lib64/python2.6/site-packages/tornado/stack_context.py", line 330, in wrapped
    raise_exc_info(exc)
  File "/usr/lib64/python2.6/site-packages/tornado/stack_context.py", line 301, in wrapped
    ret = fn(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/tornado/httpserver.py", line 339, in _on_request_body
    self.request_callback(self._request)
  File "/usr/lib64/python2.6/site-packages/tornado/web.py", line 1599, in __call__
    handler._execute(transforms, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/tornado/web.py", line 1133, in _execute
    self._when_complete(self.prepare(), self._execute_method)
  File "/usr/lib64/python2.6/site-packages/tornado/web.py", line 1140, in _when_complete
    callback()
  File "/usr/lib64/python2.6/site-packages/tornado/web.py", line 1161, in _execute_method
    self._when_complete(method(*self.path_args, **self.path_kwargs),
  File "/usr/lib64/python2.6/site-packages/x2gobroker/web/plain.py", line 136, in post
    profiles = broker_backend.list_profiles(username)
  File "/usr/lib64/python2.6/site-packages/x2gobroker/brokers/base_broker.py", line 870, in list_profiles
    running_sessions, suspended_sessions = x2gobroker.agent.has_sessions(username, query_mode=agent_query_mode, remote_agent=remote_agent)
  File "/usr/lib64/python2.6/site-packages/x2gobroker/agent.py", line 229, in has_sessions
    _session_list = list_sessions(username, query_mode=query_mode, remote_agent=remote_agent)
  File "/usr/lib64/python2.6/site-packages/x2gobroker/agent.py", line 174, in list_sessions
    return call_remote_broker_agent(username, mode='listsessions', remote_agent=remote_agent)
  File "/usr/lib64/python2.6/site-packages/x2gobroker/agent.py", line 139, in call_remote_broker_agent
    raise x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException('Query to remote X2Go Broker Agent (user: {user}, hostname: {hostname}, port: {port}) failed'.format(user=remote_username, hostname=remote_hostname, port=remote_port))
x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException: Query to remote X2Go Broker Agent (user: x2gobroker, hostname: terminalsrv3, port: 22) failed


Information forwarded to x2go-dev@lists.berlios.de, X2Go Developers <x2go-dev@lists.berlios.de>:
Bug#377; Package x2gobroker. (Tue, 17 Dec 2013 14:33:01 GMT) (full text, mbox, link).


Acknowledgement sent to Jan Engelhardt <jengelh@inai.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.berlios.de>. (Tue, 17 Dec 2013 14:33:01 GMT) (full text, mbox, link).


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

From: Jan Engelhardt <jengelh@inai.de>
To: 377@bugs.x2go.org
Subject: Re: paramiko fails to recognize known_hosts
Date: Tue, 17 Dec 2013 15:14:59 +0100 (CET)
strace reveals this:

2844  open("//.ssh/known_hosts", O_RDONLY) = -1 ENOENT (No such file or
directory)

Looking at the environ of a newly-started x2gobroker:

# hexdump -C /proc/20044/environ
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000840  00 00 00 00 00 00 00                              |.......|
00000847
#

So the environment was modified inside python and I have no
further clue on what its actual state is, whether the environ
array just moved in memory (plausible), or destroyed in-place
leaving nothing for paramiko.


Information forwarded to x2go-dev@lists.berlios.de, X2Go Developers <x2go-dev@lists.berlios.de>:
Bug#377; Package x2gobroker. (Tue, 17 Dec 2013 14:48:01 GMT) (full text, mbox, link).


Acknowledgement sent to Jan Engelhardt <jengelh@inai.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.berlios.de>. (Tue, 17 Dec 2013 14:48:01 GMT) (full text, mbox, link).


Message #15 received at 377@bugs.x2go.org (full text, mbox, reply):

From: Jan Engelhardt <jengelh@inai.de>
To: 377@bugs.x2go.org
Subject: Re: paramiko fails to recognize known_hosts
Date: Tue, 17 Dec 2013 15:47:16 +0100 (CET)
When started from sysvinit, the HOME environment variable is not set 
(what to, anyway!), and startproc does not set HOME _either_.
Therefore, /etc/init.d/x2gobroker-daemon needs a

  export HOME=/var/lib/x2gobroker

or something nicer of equal footing so that /usr/sbin/x2gobroker has 
something to work with.


Information forwarded to x2go-dev@lists.berlios.de, X2Go Developers <x2go-dev@lists.berlios.de>:
Bug#377; Package x2gobroker. (Tue, 17 Dec 2013 18:18:01 GMT) (full text, mbox, link).


Acknowledgement sent to Jan Engelhardt <jengelh@inai.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.berlios.de>. (Tue, 17 Dec 2013 18:18:01 GMT) (full text, mbox, link).


Message #20 received at 377@bugs.x2go.org (full text, mbox, reply):

From: Jan Engelhardt <jengelh@inai.de>
To: 377@bugs.x2go.org
Subject: Re: init scripts
Date: Tue, 17 Dec 2013 19:10:20 +0100 (CET)
[Message part 1 (text/plain, inline)]
I seem to remember that start-stop-daemon might have been part of LSB, 
but then again, maybe not? (In the current openSUSE release with 
systemd, start-stop-daemon is part of the dpkg package.)

So the following are the init scripts currently running here. They lack 
in quality, are dirt hacks, and only do the one thing they were tested 
for. There is a lack of quoting all over the place.
[x2gobroker-authservice (text/plain, attachment)]
[x2gobroker-daemon (text/plain, attachment)]

Information forwarded to x2go-dev@lists.berlios.de, X2Go Developers <x2go-dev@lists.berlios.de>:
Bug#377; Package x2gobroker. (Sat, 21 Dec 2013 21:10:02 GMT) (full text, mbox, link).


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.berlios.de>. (Sat, 21 Dec 2013 21:10:02 GMT) (full text, mbox, link).


Message #25 received at 377@bugs.x2go.org (full text, mbox, reply):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: Jan Engelhardt <jengelh@inai.de>, 377@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#377: init scripts
Date: Sat, 21 Dec 2013 21:09:32 +0000
[Message part 1 (text/plain, inline)]
Control: close -1

Hi Jan,

On  Di 17 Dez 2013 19:10:20 CET, Jan Engelhardt wrote:

> I seem to remember that start-stop-daemon might have been part of LSB,
> but then again, maybe not? (In the current openSUSE release with
> systemd, start-stop-daemon is part of the dpkg package.)
>
> So the following are the init scripts currently running here. They lack
> in quality, are dirt hacks, and only do the one thing they were tested
> for. There is a lack of quoting all over the place.

I have included two init scripts [1, 2] in X2Go Session Broker now  
that work on RHEL derived distros.

The script use the daemon function from /etc/init.d/functions.

Because of the limitation of the daemon function not being able to  
fork a process to background, I had to implement the "--daemonize"  
command line option in x2gobroker [3] and x2gobroker-authservice [4].  
Now, both Python executables can fork themselves to background.

Also, I split up x2gobroker-agent from x2gobroker (and also sub  
packaged x2gobroker-daemon, x2gobroker-wsgi and python-x2gobroker). I  
recommend doing the same on OpenSuSE. Find my x2gobroker.spec shipped  
in upstream x2gobroker.git [5].

Thanks,
Mike

[1] http://code.x2go.org/gitweb?p=x2gobroker.git;a=blob;f=rpm/x2gobroker.init
[2]  
http://code.x2go.org/gitweb?p=x2gobroker.git;a=blob;f=rpm/x2gobroker-authservice.init
[3]  
http://code.x2go.org/gitweb?p=x2gobroker.git;a=blob;f=man/man1/x2gobroker.1#l75
[4]  
http://code.x2go.org/gitweb?p=x2gobroker.git;a=blob;f=man/man8/x2gobroker-authservice.8#l41
[5] http://code.x2go.org/gitweb?p=x2gobroker.git;a=blob;f=x2gobroker.spec
-- 

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/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
[Message part 2 (application/pgp-signature, inline)]

Marked Bug as done Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to 377-submit@bugs.x2go.org. (Sat, 21 Dec 2013 21:10:02 GMT) (full text, mbox, link).


Notification sent to Jan Engelhardt <jengelh@inai.de>:
Bug acknowledged by developer. (Sat, 21 Dec 2013 21:10:02 GMT) (full text, mbox, link).


Changed Bug title to 'Init scripts (for Debian) not properly working on RPM distros' from 'paramiko fails to recognize known_hosts' Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to control@bugs.x2go.org. (Sat, 21 Dec 2013 21:30:01 GMT) (full text, mbox, link).


Marked as fixed in versions 0.0.3.0. Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to control@bugs.x2go.org. (Sat, 21 Dec 2013 21:30:01 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.x2go.org> to internal_control@bugs.x2go.org. (Sun, 19 Jan 2014 06:24:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Apr 25 01:16:13 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.