+3
Under review

Build for Raspberry Pi (rasbian)

Adrian Noß 11 years ago updated by Eugene Pankov (Project coordinator) 10 years ago 12

Hello! Are there any plans for a Ajenti Version that runs on a raspberry. There are a few how tos online and the installation performs successfull, but the service will not start and there is no error msg or something. Only this : 


$ sudo /usr/bin/ajenti-panel -vv

04.11.2013 18:02 ajenti-panel:71               INFO  Using config file /etc/ajenti/config.json

04.11.2013 18:02 ajenti-panel:90               INFO  Ajenti starting in foreground

04.11.2013 18:02 registry.py:247               INFO  registered crypt handler 'sha512_crypt':

04.11.2013 18:02 core.py:95                    INFO  Ajenti 1.2.3 running on platform: debian

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin hddtemp

04.11.2013 18:02 __init__.py:249               DEBUG Preloading plugin dependency: main

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin main

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin hddtemp

04.11.2013 18:02 __init__.py:249               DEBUG Preloading plugin dependency: dashboard

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin dashboard

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin hddtemp

04.11.2013 18:02 __init__.py:309               WARN   *** [hddtemp] skipping due to BinaryDependency (hddtemp)

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin bind9

04.11.2013 18:02 __init__.py:249               DEBUG Preloading plugin dependency: services

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin services

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin bind9

04.11.2013 18:02 __init__.py:309               WARN   *** [bind9] skipping due to BinaryDependency (named)

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin nginx

04.11.2013 18:02 __init__.py:249               DEBUG Preloading plugin dependency: webserver_common

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin webserver_common

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin nginx

04.11.2013 18:02 __init__.py:309               WARN   *** [nginx] skipping due to BinaryDependency (nginx)

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin ltfs

04.11.2013 18:02 __init__.py:303               WARN   *** [ltfs] Plugin error: format error

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin memcache

04.11.2013 18:02 __init__.py:309               WARN   *** [memcache] skipping due to BinaryDependency (memcached)

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin smartctl

04.11.2013 18:02 __init__.py:309               WARN   *** [smartctl] skipping due to BinaryDependency (smartctl)

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin users

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin configurator

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin netatalk

04.11.2013 18:02 __init__.py:309               WARN   *** [netatalk] skipping due to BinaryDependency (afpd)

04.11.2013 18:02 __init__.py:260               DEBUG Loading plugin fstab


Hi Adrian,


What happens when you try to access the panel? Any errors on the console / crashes?

Accessing the panel is not possible. The Server returns to the shell after the last debug msg.

This looks like architecture mismatch. Please replace python-gevent and python-greenlet with the versions from the corresponding raspbian repo. Let me know if this works.

Ok. I will try it tomorrow.

Hi Eugeny,


i replaced every python module with the versions from the rasbian repo or with the pip version and reinstalled ajenti after a full system cleanup. But without succsess. I got the same result:


admin@bondsmsgateway / $ sudo /usr/bin/ajenti-panel -v

05.11.2013 12:20 ajenti-panel:71               INFO  Using config file /etc/ajenti/config.json

05.11.2013 12:20 ajenti-panel:90               INFO  Ajenti starting in foreground

05.11.2013 12:20 registry.py:247               INFO  registered crypt handler 'sha512_crypt': <class 'passlib.handlers.sha2_crypt.sha512_crypt'>

05.11.2013 12:20 core.py:95                    INFO  Ajenti 1.2.3 running on platform: debian

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin hddtemp

05.11.2013 12:20 __init__.py:249               DEBUG Preloading plugin dependency: main

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin main

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin hddtemp

05.11.2013 12:20 __init__.py:249               DEBUG Preloading plugin dependency: dashboard

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin dashboard

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin hddtemp

05.11.2013 12:20 __init__.py:309               WARN   *** [hddtemp] skipping due to BinaryDependency (hddtemp)

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin bind9

05.11.2013 12:20 __init__.py:249               DEBUG Preloading plugin dependency: services

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin services

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin bind9

05.11.2013 12:20 __init__.py:309               WARN   *** [bind9] skipping due to BinaryDependency (named)

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin nginx

05.11.2013 12:20 __init__.py:249               DEBUG Preloading plugin dependency: webserver_common

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin webserver_common

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin nginx

05.11.2013 12:20 __init__.py:309               WARN   *** [nginx] skipping due to BinaryDependency (nginx)

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin ltfs

05.11.2013 12:20 __init__.py:303               WARN   *** [ltfs] Plugin error: format error

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin memcache

05.11.2013 12:20 __init__.py:309               WARN   *** [memcache] skipping due to BinaryDependency (memcached)

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin smartctl

05.11.2013 12:20 __init__.py:309               WARN   *** [smartctl] skipping due to BinaryDependency (smartctl)

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin users

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin configurator

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin netatalk

05.11.2013 12:20 __init__.py:309               WARN   *** [netatalk] skipping due to BinaryDependency (afpd)

05.11.2013 12:20 __init__.py:260               DEBUG Loading plugin fstab

admin@bondsmsgateway / $


These are the installed versions:


Mako==0.9.0

MarkupSafe==0.18

PIL==1.1.7

ajenti==1.2.3

argparse==1.2.1

chardet==2.1.1

gevent==0.13.8

gevent-socketio==0.3.5-rc2

gevent-websocket==0.3.6

greenlet==0.4.1

lockfile==0.8

lxml==2.3.2

numpy==1.6.2

oauthlib==0.1.2

passlib==1.5.3

psutil==0.6.1

pycrypto==2.6

python-catcher==0.1.3

python-daemon==1.5.5

python-exconsole==0.1.4

python-ldap==2.4.10

reconfigure==0.1.36

requests==2.0.1

six==1.1.0

wsgiref==0.1.2


Could you please run ajenti under strace and supply the last lines of the log?


strace ajenti-panel

I got it. It is the to old version of psutil. The rasbian repo version is 0.6.1. I upgrade with pip to version 1.1.2 an ajenti starts.


Here are the last strace lines : 


open("/usr/lib/python2.7/dist-packages/PIL/_psutil_posixmodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

open("/usr/lib/python2.7/dist-packages/PIL/_psutil_posix.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

open("/usr/lib/python2.7/dist-packages/PIL/_psutil_posix.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

stat64("/usr/lib/pymodules/python2.7/_psutil_posix", 0xbec48158) = -1 ENOENT (No such file or directory)

open("/usr/lib/pymodules/python2.7/_psutil_posix.so", O_RDONLY|O_LARGEFILE) = 12

fstat64(12, {st_mode=S_IFREG|0644, st_size=5480, ...}) = 0

open("/usr/lib/pymodules/python2.7/_psutil_posix.so", O_RDONLY) = 13

read(13, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\7\0\0004\0\0\0"..., 512) = 512

lseek(13, 4480, SEEK_SET)               = 4480

read(13, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1000) = 1000

lseek(13, 4216, SEEK_SET)               = 4216

read(13, "A4\0\0\0aeabi\0\1*\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 53) = 53

fstat64(13, {st_mode=S_IFREG|0644, st_size=5480, ...}) = 0

mmap2(NULL, 36988, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 13, 0) = 0xb6118000

mprotect(0xb6119000, 28672, PROT_NONE)  = 0

mmap2(0xb6120000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 13, 0) = 0xb6120000

close(13)                               = 0

mprotect(0xb6120000, 4096, PROT_READ)   = 0

--- SIGILL (Illegal instruction) @ 0 (0) ---

+++ killed by SIGILL +++


But there comes the next problem. stunnel4 and ajenti produce 100% cpu load and the webinterface need nearly 2 minutes to show up the login-screen.

Looks like a bad psutil module. Are you sure that you have installed python-psutil from raspbian? Other option is to run 'pip install psutil' - this will build a 100% native ARM psutil just for your Pi.

The pip Version works well. But the CPU Load is a problem. It took 1:56 Min until the loginscreen appears and another 2 and a half minutes until the dashboard is loaded. after that the performance is ok. Is there any option to speed up this a little bit ? 

I have poked around a bit and it seems that setting TCP_CORK significantly improves transfer speeds on low-end hardware.

Could you please either pull 'next' branch from git or add these 4 lines manually to ajenti/core.py?

Many thanks for testing!


https://github.com/Eugeny/ajenti/commit/e49edeabdf074ffac299800413e8d1a92568fe36#diff-7de08fa6ecf1414e2734d7c6fb054e53R136

Hello,
Just installed Ajenti on Raspberry Pi Model B+ and I can't get it working. I have python-psutil package. When I try to launch ajenti-panel I get this:

root@proc:/var/www# ajenti-panel -v
18.02.2015 21:01 ajenti-panel:105 INFO Using config file /etc/ajenti/config.json
18.02.2015 21:01 ajenti-panel:130 INFO Ajenti starting in foreground
Illegal instruction
root@proc:/var/www#

any ideas how to fix this? :)
+1
Under review
That's typically caused by incorrect arch of packages with native extensions, i.e. python-gevent and python-greenlet