question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ajenti not working in Debian Jessie

See original GitHub issue

Problem with gevent support…

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766867

I installed gevent with easy install, following the instructions to solve the similar ubuntu issue: https://github.com/Eugeny/ajenti/issues/618

Did not work. Now ajenti is not starting:

08.04.2015 08:51 ajenti-panel:105              INFO  Using config file /etc/ajenti/config.json
08.04.2015 08:51 ajenti-panel:130              INFO  Ajenti starting in foreground
Traceback (most recent call last):
  File "/usr/bin/ajenti-panel", line 137, in <module>
    from ajenti import core
  File "/usr/lib/pymodules/python2.7/ajenti/core.py", line 18, in <module>
    import ajenti.licensing
  File "/usr/lib/pymodules/python2.7/ajenti/licensing.py", line 8, in <module>
    from ajenti.ipc import IPCHandler
  File "/usr/lib/pymodules/python2.7/ajenti/ipc.py", line 2, in <module>
    from gevent.pywsgi import WSGIServer, WSGIHandler
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.0.1-py2.7-linux-x86_64.egg/gevent/pywsgi.py", line 12, in <module>
    from gevent import socket
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.0.1-py2.7-linux-x86_64.egg/gevent/socket.py", line 659, in <module>
    from gevent.ssl import sslwrap_simple as ssl, SSLError as sslerror, SSLSocket as SSLType
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.0.1-py2.7-linux-x86_64.egg/gevent/ssl.py", line 386, in <module>
    def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
NameError: name 'PROTOCOL_SSLv3' is not defined

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:36 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
flavio-pessoacommented, Sep 20, 2015

To fix problem, execute the commands below.

  1. Install python tools and dev $ install python-setuptools python-dev

  2. Install gevent, in version 1.1b3 $ easy_install -U gevent==1.1b3

  3. Downgrade ssl version of protocol $ sed -i -e s/ssl_version=PROTOCOL_SSLv3/ssl_version=PROTOCOL_SSLv23/ /usr/local/lib/python2.7/dist-packages/gevent-1.1b3-py2.7-linux-x86_64.egg/gevent/ssl.py

  4. Restart ajenti $ service ajenti restart

4reactions
pfzcommented, May 3, 2015

+1. @hydrosIII The patch actually works. Here what I did, replacing gevent from debian/jessie by gevent from easy_install (like you did), and doing this;

aptitude install python-setuptools python-dev
easy_install -U gevent
sed -i -e s/ssl_version=PROTOCOL_SSLv3/ssl_version=PROTOCOL_SSLv23/ /usr/local/lib/python2.7/dist-packages/gevent-1.
0.1-py2.7-linux-x86_64.egg/gevent/ssl.py
service ajenti restart

It works fine.

Here the original ajenti.log before that :

2015-05-03 22:47:19,186 INFO     core.run(): Ajenti 1.2.22.19 running on platform: debian
2015-05-03 22:47:19,186 INFO    : Ajenti 1.2.22.19 running on platform: debian
 manager: org.freedesktop.DBus.Error.ServiceUnknown: The name com.ubuntu.Upstart was not provided by any .service files
2015-05-03 22:47:19,194 INFO    : Disabling Upstart service manager: org.freedesktop.DBus.Error.ServiceUnknown: The name com.ubuntu.Upstart was not provided by any .service files
2015-05-03 22:47:19,236 INFO    : Disabling systemd service manager: global name 'SystemdService' is not defined
2015-05-03 22:47:19,241 WARNING :  *** [elements] Plugin error: format error
2015-05-03 22:47:19,633 INFO    : Starting server on (u'0.0.0.0', 8000)
2015-05-03 22:47:19,635 INFO    : SSL enabled: /etc/ajenti/ajenti.pem
2015-05-03 22:47:19,640 INFO    : Starting new HTTP connection (1): meta.ajenti.org
", 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 382, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 84, in __init__
    ctx = SSLContext(ssl_version)
NameError: global name 'SSLContext' is not defined
<Greenlet at 0x7f197ffd92d0: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0x7f1980002c50 fileno=8 address=0.0.0.0:8000>>(<socket at 0x7f19807b2d10 fileno=13 sock=127.0.0.1, ('127.0.0.1', 39861))> failed with NameError

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 382, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 84, in __init__
    ctx = SSLContext(ssl_version)
NameError: global name 'SSLContext' is not defined
<Greenlet at 0x7f197ffd92d0: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0x7f1980002c50 fileno=8 address=0.0.0.0:8000>>(<socket at 0x7f19807b2d10 fileno=13 sock=127.0.0.1, ('127.0.0.1', 39862))> failed with NameError
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ajenti Port Not Working on Debian - DigitalOcean
In a fresh Debian 8 (Jessie) install, Ajenti would timeout when I tried to connect through HTTP. I only had to disable SSL...
Read more >
Cannot access Ajenti on port 8000
I'm running Apache 2 on Raspbian and even though Ajenti installed and is running I cannot access it on the default port as...
Read more >
Cannot Access Ajenti Panel on Debian Jessie? Try This
Trying to install Ajenti in Debian 8 (Jessie), but problem occurs: cannot access to panel. It just because SSL problem. ... Add ""...
Read more >
How To Install Ajenti Control Panel on Debian 8 - idroot
Using Ajenti, you can set up applications written in PHP (PHP-FPM), Python (WSGI), Ruby, and Node.js in no time. Exim 4 and Courier...
Read more >
How to Install Ajenti Control Panel in Debian and ... - Tecmint
The following output shows that Ajenti is running as expected. Start Ajenti Service. The Ajenti service can be started, stopped, and restarted ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found