David Krantz wrote:
I found a solution that so far seems to work. The culprit was that the machine had python-openssl and python3-openssl installed. After removing them I have so far not seen any error.
It turns out that unbeknown to me I had the same issue. I manage MM 3 installations at lists.mailman3.org and mail.python.org/mm3. I support django-allauth OAuth2 authentication using GitHub, GitLab, Google and Facebook on both. On lists.mailman3.org everything was working fine. On mail.python.org/mm3 all OAuth2 login attempts produced a 500 server error and a traceback in the mailman-web log similar to
ERROR 2017-04-23 18:51:39,501 base 3673 139978913507072 Internal Server Error: /mm3/accounts/google/login/callback/ Traceback (most recent call last): File "/opt/mailman/mailman-bundler/eggs/Django-1.8.13-py2.7.egg/django/core/handlers/base.py", line 149, in get_response response = self.process_exception_by_middleware(e, request) File "/opt/mailman/mailman-bundler/eggs/Django-1.8.13-py2.7.egg/django/core/handlers/base.py", line 147, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/mailman-bundler/venv/lib/python2.7/site-packages/django_allauth-0.27.0-py2.7.egg/allauth/socialaccount/providers/oauth2/views.py", line 62, in view return self.dispatch(request, *args, **kwargs) File "/opt/mailman/mailman-bundler/venv/lib/python2.7/site-packages/django_allauth-0.27.0-py2.7.egg/allauth/socialaccount/providers/oauth2/views.py", line 120, in dispatch access_token = client.get_access_token(request.GET['code']) File "/opt/mailman/mailman-bundler/venv/lib/python2.7/site-packages/django_allauth-0.27.0-py2.7.egg/allauth/socialaccount/providers/oauth2/client.py", line 74, in get_access_token auth=auth) File "/opt/mailman/mailman-bundler/venv/lib/python2.7/site-packages/requests/api.py", line 56, in request return session.request(method=method, url=url, **kwargs) File "/opt/mailman/mailman-bundler/venv/lib/python2.7/site-packages/requests/sessions.py", line 488, in request resp = self.send(prep, **send_kwargs) File "/opt/mailman/mailman-bundler/venv/lib/python2.7/site-packages/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/opt/mailman/mailman-bundler/venv/lib/python2.7/site-packages/requests/adapters.py", line 497, in send raise SSLError(e, request=request) SSLError: bad handshake: SysCallError(0, None)
I only discovered this because I saw the ERROR entries in the log while looking for something else. In any case, it turned out that python-openssl was installed on mail.python.org and not on lists.mailman3.org. Removing it from mail.python.org allowed OAuth2 logins to work.
We'll see if its removal broke something else that depended on it :(
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan