0
Answered

Ajenti troubleshooting

Kos mOS 5 years ago updated by Eugene Pankov (Project coordinator) 5 years ago 1
After installing it both with nginx and apache nothing works and error is same:

21.09.2014 00:13 core.py:99 INFO Starting server on (u'0.0.0.0', 8000)
21.09.2014 00:13 core.py:121 ERROR Could not bind to (u'0.0.0.0', 8000)
root@burnbabylon:/etc/nginx# sudo netstat -tlnp | grep 8000
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 8950/python

while process is killed I get this:

21.09.2014 00:19 core.py:99 INFO Starting server on (u'0.0.0.0', 8000)
21.09.2014 00:19 __init__.py:207 DEBUG Root context instantiated [SessionMiddleware] <ajenti.middleware.SessionMiddleware object at 0xb5193a0c>
21.09.2014 00:19 __init__.py:207 DEBUG Root context instantiated [AuthenticationMiddleware] <ajenti.middleware.AuthenticationMiddleware object at 0xb51aee6c>
21.09.2014 00:19 __init__.py:207 DEBUG Root context instantiated [CentralDispatcher] <ajenti.routing.CentralDispatcher object at 0xb51c640c>
21.09.2014 00:19 core.py:134 INFO SSL enabled: /etc/ajenti/ajenti.pem
21.09.2014 00:19 __init__.py:207 DEBUG Root context instantiated [IPCServer] <ajenti.ipc.IPCServer object at 0xb51c668c>
21.09.2014 00:19 __init__.py:207 DEBUG Root context instantiated [Licensing] <ajenti.licensing.Licensing object at 0xb51c6d0c>
21.09.2014 00:19 feedback.py:30 DEBUG Feedback >> ping ({'edition': 'vanilla', 'version': '1.2.22.10', 'os': 'debian', 'id': 73860})
21.09.2014 00:19 retry.py:155 DEBUG Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
21.09.2014 00:19 connectionpool.py:188 INFO Starting new HTTP connection (1): meta.ajenti.org
21.09.2014 00:19 connectionpool.py:362 DEBUG "POST /api/v2/ping HTTP/1.1" 200 36
21.09.2014 00:19 feedback.py:35 DEBUG Feedback << {"status": "ok"}

Now if I open the servers page, I will get this:

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/gevent/server.py", line 102, in wrap_socket_and_handle
ssl_socket = self.wrap_socket(client_socket, **self.ssl_args)
File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 383, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 85, in __init__
self._sslobj = _ssl.sslwrap(self._sock, server_side,
AttributeError: 'module' object has no attribute 'sslwrap'
<Greenlet at 0xb50df43cL: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0xb51c67ccL fileno=6 address=0.0.0.0:8000>>(<socket at 0xb485018cL fileno=11 sock=127.0.0.1:80, ('127.0.0.1', 45896))> failed with AttributeError

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/lib/python2.7/dist-packages/gevent/server.py", line 102, in wrap_socket_and_handle
ssl_socket = self.wrap_socket(client_socket, **self.ssl_args)
File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 383, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 85, in __init__
self._sslobj = _ssl.sslwrap(self._sock, server_side,
AttributeError: 'module' object has no attribute 'sslwrap'
<Greenlet at 0xb50df43cL: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0xb51c67ccL fileno=6 address=0.0.0.0:8000>>(<socket at 0xb48501ccL fileno=11 sock=127.0.0.1:80, ('127.0.0.1', 45897))> failed with AttributeError

Any help with this issue is appreciated, I am trying to setup a test environment to move into production a webhosting server with Ajenti services. But if this does not work I will stick to Plesk.

Answer

Answer
Answered
This is a Gevent bug which prevents SSL working under Python 2.7.9 (in-dev).
I've committed a patch that will fix this problem, and preparing a pull request for gevent devs. In the meanwhile, you can disable SSL, downgrade Python to 2.7.8 or run Ajenti from git source.
Answer
Answered
This is a Gevent bug which prevents SSL working under Python 2.7.9 (in-dev).
I've committed a patch that will fix this problem, and preparing a pull request for gevent devs. In the meanwhile, you can disable SSL, downgrade Python to 2.7.8 or run Ajenti from git source.