Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 290907 - Ajaxterm-0.10 fails to start
Summary: Ajaxterm-0.10 fails to start
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-28 17:30 UTC by John L. Poole
Modified: 2010-08-21 13:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
replacement /etc/init.d/ajaxterm (ajaxterm,522 bytes, text/plain)
2010-08-21 13:28 UTC, Reinhard Schu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John L. Poole 2009-10-28 17:30:13 UTC
Install ajaxterm:
 emerge  net-misc/ajaxterm

Try to start it up (how to start up is not documentated):
 /etc/init.d/ajaxterm start


Reproducible: Always

Steps to Reproduce:
1.  emerge  net-misc/ajaxterm
2.  /etc/init.d/ajaxterm start
3.

Actual Results:  
AjaxTerm at http://localhost:8022/ pid: 23551                             [ !! ]


Expected Results:  
AjaxTerm at http://localhost:8022/ pid: 23551                             [ ok ]
and
http://[myserver]:8022/
should display a console sesssion

This problem seems to be occurring with others.
http://forums.gentoo.org/viewtopic-t-793985-highlight-ajaxterm.html

Maybe this is a documentation issue?

It is suppose to be "simple to install" per the author's site:
http://antony.lesuisse.org/qweb/trac/wiki/AjaxTerm
Comment 1 Sebastian Luther (few) 2009-10-29 14:56:30 UTC
You need to find out why it doesn't start. If nothing is in /var/log/messages, you should start it directly instead of using the init script. Simply call

python /usr/share/ajaxterm/ajaxterm.py

and see what happens. Maybe add those options that the init scripts adds. It should then output some error message.
Comment 2 John L. Poole 2009-10-30 04:16:46 UTC
I found one of the problems:  I was trying to access the server from another machine -- clearly the http://localhost:8022 means localhost and one must not substitute an IP in the URL; the URL is meant to only  work from the machine where ajaxterm is running. (The web site explains how to configure Apache for an HTTPS session so you can use ajaxterm from another machine.)  I was trying this on a SheevaPlug (armv5t processor) and unfortunately my Firefox is not working on that so I can confirm on the same machine that the interface is not working.  I therefore, moved my test over to another Gentoo box (AMD64) and got the same problem.  

TOn the other Gentoo box, I noticed that the first time I tried, there was an error message suggesting a port conflict:

/etc/init.d/ajaxterm start
 * Caching service dependencies ...
 *  Cannot add provide 'net', as a service with the same name exists!     [ ok ]
 * Starting AjaxTerm on port 8022 ...
AjaxTerm at http://localhost:8022/ pid: 18149                             [ !! ]
localhost pri #

When I tried again, the "Cannot add provide 'net'..." message was ommitted on subsequent attempts:
localhost pri # /etc/init.d/ajaxterm start
 * Starting AjaxTerm on port 8022 ...
AjaxTerm at http://localhost:8022/ pid: 18312                             [ !! ]
localhost pri # /etc/init.d/ajaxterm start
 * Starting AjaxTerm on port 8022 ...
AjaxTerm at http://localhost:8022/ pid: 18397                             [ !! ]
localhost pri #

I monitoring /var/log/messages and nothing showed up.  Is there another log I should monitor?

Also tried invoking the script directly:
localhost pri # python /usr/share/ajaxterm/ajaxterm.py --daemon --port=8022 --uid=nobody
AjaxTerm at http://localhost:8022/ pid: 18441
localhost pri # python /usr/share/ajaxterm/ajaxterm.py --daemon --port=8022 --uid=nobody
AjaxTerm at http://localhost:8022/ pid: 18444
localhost pri # python /usr/share/ajaxterm/ajaxterm.py --daemon --port=8022 --uid=nobody
AjaxTerm at http://localhost:8022/ pid: 18447
localhost pri # 

When I checked ps -A, there appeared all the processes, though only run process pid was showing:

localhost pri # ls /var/run/aja*
/var/run/ajaxterm.pid
localhost pri # cat /var/run/ajaxterm.pid
18447
localhost pri #
Comment 3 John L. Poole 2009-10-30 04:46:45 UTC
I verified that 8022 was not called for:
cat /etc/services
...
soap-http       7627/udp
http-alt        8008/tcp                        # HTTP Alternate
http-alt        8008/udp
http-alt        8080/tcp        webcache        # HTTP Alternate
http-alt        8080/udp        webcache        # WWW caching service
sunproxyadmin   8081/tcp        tproxy          # Sun Proxy Admin Service
sunproxyadmin   8081/udp        tproxy          # Transparent Proxy
pichat          9009/tcp                        # Pichat Server
...

I scanned the current machine and it looks like the port is shown as having a listener:
localhost pri # nmap -sT -O localhost

Starting Nmap 4.76 ( http://nmap.org ) at 2009-10-29 21:43 PDT
[redacted]
Not shown: 997 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
53/tcp   open  domain
8022/tcp open  unknown
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.17 - 2.6.25
Network Distance: 0 hops

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 1.54 seconds
localhost pri # 

I then tried http://localhost:8022 and it worked (on the AMD64 box).
Comment 4 John L. Poole 2009-11-30 17:15:57 UTC
I also altered /etc/init.d/ajaxterm to

  DAEMON=/usr/bin/python2.6

to accommodate that I have python2.6.

Although I still cannot get Firefox to work on the SheevaPlug (problems with Pango); I was successfully able to access the SheevaPlug server via https from another server.  I configured a proxy using something along this line for my Apache configuration:

    Listen 443
    NameVirtualHost *:443

    <VirtualHost *:443>
       ServerName localhost
       SSLEngine On
       SSLCertificateKeyFile ssl/apache.pem
       SSLCertificateFile ssl/apache.pem

       ProxyRequests Off
       <Proxy *>
               Order deny,allow
               Allow from all
       </Proxy>
       ProxyPass /ajaxterm/ http://localhost:8022/
       ProxyPassReverse /ajaxterm/ http://localhost:8022/
    </VirtualHost>
Comment 5 mihai stanescu 2010-04-06 21:56:48 UTC
same problem here...although i ran the same command as the init.d script does and its working just fine
Comment 6 snIP3r 2010-05-08 18:41:49 UTC
same problem here. ajaxterm starts (as i changed DAEMON line to /usr/bin/python2.6), but no display of the shell appeared. i also get the info of my ssh daemon that a user logs in...
heres the log of my apache:

x.x.x.x - - [08/May/2010:20:37:44 +0200] "GET /ajaxterm/ HTTP/1.1" 200 631
x.x.x.x - - [08/May/2010:20:37:45 +0200] "GET /ajaxterm/ajaxterm.css HTTP/1.1" 200 1557
x.x.x.x - - [08/May/2010:20:37:45 +0200] "GET /ajaxterm/sarissa_dhtml.js HTTP/1.1" 200 4353
x.x.x.x - - [08/May/2010:20:37:45 +0200] "GET /ajaxterm/ajaxterm.js HTTP/1.1" 200 8244
x.x.x.x - - [08/May/2010:20:37:45 +0200] "GET /ajaxterm/sarissa.js HTTP/1.1" 200 27246
x.x.x.x - - [08/May/2010:20:37:47 +0200] "POST /ajaxterm/u HTTP/1.1" 200 135

i do not know what else to try...
Comment 7 Reinhard Schu 2010-08-21 13:28:28 UTC
Created attachment 243855 [details]
replacement /etc/init.d/ajaxterm

ajaxterm seems to give the wrong exit code to start-stop-daemon, so adding the --oknodo option helps.