Subject: Re: daemon fails to create shell session with --daemon Followup-For: Bug #608340 Package: ajaxterm Version: 0.10-11
Hello, I can provide additional information for this bug. I experience it if I configure ajaxterm to start in daemon mode with uid root so that ajaxterm uses /bin/login. It occurs if I start it via the init script and if I start it manually with the following command line: ajaxterm --daemon --port=8022 --serverport=22 --uid=root The first time after the start of the daemon, I can login but already the motd is shown only with a long hang. If I list then the content of my homedir via ls -l, it crashs and shows me the connection lost timeout message Tzafir has already posted. The second time, it doesn't event show the login prompt and quits with the connection lost timeout message immediately. The daemon itselfs does not crash nor does it display anything to stderr, even if I enable the -l option (which is normal, because it's forked). I've then tried to start it in the non-daemon mode with ajaxterm --port=8022 --serverport=22 --uid=root -l The result is the following: I can login as before (with hang) and write "ls -l". Then it hangs and an exception is being thrown. The complete output of the ajaxterm process is as follows (from the start, my login and the attempt to write "ls -l"). AjaxTerm at http://localhost:8022/ 127.0.0.1 - - [10/Aug/2011 14:41:36] "GET / HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:36] "GET /ajaxterm.css HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:36] "GET /utf8-escape.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:36] "GET /sarissa.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:36] "GET /ajaxterm.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:36] "GET /sarissa_dhtml.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:36] "GET /ajaxterm_config.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:37] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:37] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:37] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:38] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:38] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:38] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:39] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:39] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:39] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:39] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:39] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:40] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:40] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:40] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:42] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:42] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:42] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:43] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:44] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:44] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:44] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:45] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:45] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:46] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:46] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:46] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:46] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:47] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:47] "POST /u HTTP/1.0" 200 - Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner self.run() File "/usr/lib/python2.6/threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs) File "/usr/share/ajaxterm/ajaxterm.py", line 502, in loop self.proc_read(fd) File "/usr/share/ajaxterm/ajaxterm.py", line 377, in __call__ r=self.orig(*l) File "/usr/share/ajaxterm/ajaxterm.py", line 477, in proc_read t.write(os.read(fd,65536)) File "/usr/share/ajaxterm/ajaxterm.py", line 310, in write for i in utf8decoder.decode(s): File "/usr/lib/python2.6/codecs.py", line 296, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode byte 0xd6 in position 451: invalid continuation byte 127.0.0.1 - - [10/Aug/2011 14:41:47] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:47] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:41:48] "POST /u HTTP/1.0" 200 - (continues with this line infinitely) If I try to re-login in this state, it simply displays a black window without login prompt while this is being output by ajaxterm on the console: 127.0.0.1 - - [10/Aug/2011 14:46:41] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "GET / HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "GET /sarissa.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "GET /ajaxterm.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "GET /ajaxterm.css HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "GET /sarissa_dhtml.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "GET /ajaxterm_config.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "GET /utf8-escape.js HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "POST /u HTTP/1.0" 200 - 127.0.0.1 - - [10/Aug/2011 14:47:04] "POST /u HTTP/1.0" 200 - (continues with this line infinitely) Because of the unicode error message, I should perhaps add my browser version Firefox 5.0 on Windows 7. I accessed the ajaxterm remotely via squid 2.7.STABLE9-4. By the way, I can confirm the problem that ajaxterm does not react on Ctrl+C when in non-daemon mode: ^CTraceback (most recent call last): File "/usr/share/ajaxterm/ajaxterm.py", line 652, in main g_server.serve_forever() File "/usr/lib/python2.6/SocketServer.py", line 224, in serve_forever r, w, e = select.select([self], [], [], poll_interval) KeyboardInterrupt Hope I could help resolving the bug because ajaxterm is really great if working. Regards, Christoph -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.39 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages ajaxterm depends on: ii adduser 3.113 add and remove users and groups ii python 2.6.7-1 interactive high-level object-orie Versions of packages ajaxterm recommends: ii apache2 2.2.19-1 Apache HTTP Server metapackage ii apache2-mpm-prefork [httpd] 2.2.19-1 Apache HTTP Server - traditional n ii openssh-server 1:5.5p1-6 secure shell (SSH) server, for sec ii python-psyco 1.6-2 Python specializing compiler Versions of packages ajaxterm suggests: ii openssl 1.0.0d-3 Secure Socket Layer (SSL) binary a -- Configuration Files: /etc/default/ajaxterm changed [not included] -- no debconf information
PGP.sig
Description: PGP signature