ssl connexion crash server with error global name 'SSLContext' is not defined

Bug #1386049 reported by Yann on 2014-10-27
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Ajenti
Undecided
Unassigned

Bug Description

Hi,
i've recently upgraded my ubuntu server to 14.10 and now i can't start ajenti in my browser in ssl (with no ssl it works).
It seems to be a problem with gevent.py and SSLCONTEXT class overrides.

See logs attached.

Thanks.

Yann (yann-domise-h) wrote :
description: updated
fonix232 (fonix232) wrote :

Same issue on Debian Jessie. It seems to be a problem with the 2.7.8 python-gevent:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766867

Alejandro (aledons) wrote :

I solved the problem with the following:

1:sudo apt-get install python-dev python-greenlet python-gevent python-vte python openssl python-crypto python-appindicator
2:sudo apt-get install python-setuptools
3:easy_install -U gevent

Then insert the line to /usr/lib/python2.7/dist-packages/gevent/ssl.py
"import ssl"

enjoy!

Diego Betto (loi-studios) wrote :

Thank you Alejandro, it works!

(in new release you can skip changes at ssl.py, "import ssl" it's yet included)

Eno (eno-c) wrote :

Hey there,

tried that, and finally get my login via SSL working. Only when I am logged in via Chrome, I get a blank page apart from the top bar of the admin interface. When I login via Firefox and confirm a security exception, the page keeps loading almost forever until I get to the login screen, and then again when I entered my credentials. Finally, it is trying to reconnect afterwards.
If I disable SSL for Ajenti, I can login without any hassle. Is there something I could do about this?

Thanks in advance

Eno

I encountered the same problem, and fixed it by editing the python gevent-socketio source by hand. I've also made a PR for this on github: https://github.com/abourget/gevent-socketio/pull/221/.

In conclusing, just edit:
- /usr/lib/python2.7/dist-packages/socketio/handler.py
- /usr/lib/python2.7/dist-packages/socketio/transports.py
and add "" around the 3600.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.