osm-in / osm-tasking-manager2

2.0 version of the Tasking Manager
http://tasks.openstreetmap.in
Other
2 stars 0 forks source link

Login failing #10

Closed batpad closed 6 years ago

batpad commented 6 years ago

Here is what a traceback looks like from the logs:

2018-08-08 14:37:38,336 http://tasks.openstreetmap.in/login?came_from=http%3A%2F%2Ftasks.openstreetmap.in%2Fuser%2Ffoo
Traceback (most recent call last):
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/pyramid_exclog-0.7-py2.7.egg/pyramid_exclog/__init__.py", line 111, in exclog_tween
    return handler(request)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/pyramid_tm-0.11-py2.7.egg/pyramid_tm/__init__.py", line 94, in tm_tween
    reraise(*exc_info)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/pyramid_tm-0.11-py2.7.egg/pyramid_tm/__init__.py", line 75, in tm_tween
    response = handler(request)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/pyramid-1.6a1-py2.7.egg/pyramid/router.py", line 145, in handle_request
    view_name
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/pyramid-1.6a1-py2.7.egg/pyramid/view.py", line 527, in _call_view
    response = view_callable(context, request)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/pyramid-1.6a1-py2.7.egg/pyramid/config/views.py", line 384, in viewresult_to_response
    result = view(context, request)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/pyramid-1.6a1-py2.7.egg/pyramid/config/views.py", line 506, in _requestonly_view
    response = view(request)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/osmtm/views/osmauth.py", line 46, in login
    resp, content = client.request(url, "GET")
  File "build/bdist.linux-x86_64/egg/oauth2/__init__.py", line 682, in request
    connection_type=connection_type)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/httplib2-0.9.1-py2.7.egg/httplib2/__init__.py", line 1608, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/httplib2-0.9.1-py2.7.egg/httplib2/__init__.py", line 1403, in _request
    redirections=redirections - 1)
  File "build/bdist.linux-x86_64/egg/oauth2/__init__.py", line 682, in request
    connection_type=connection_type)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/httplib2-0.9.1-py2.7.egg/httplib2/__init__.py", line 1608, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/httplib2-0.9.1-py2.7.egg/httplib2/__init__.py", line 1350, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/httplib2-0.9.1-py2.7.egg/httplib2/__init__.py", line 1272, in _conn_request
    conn.connect()
  File "/var/www/tasks.openstreetmap.in/osm-tasking-manager2/env/lib/python2.7/site-packages/httplib2-0.9.1-py2.7.egg/httplib2/__init__.py", line 1059, in connect
    raise SSLHandshakeError(e)
SSLHandshakeError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I tried quite a few things that the internet said might fix the error, to no avail - upgrading the requests library, certifi, etc. Essentially, the python libraries are some-how a bit borked and being unable to make SSL connections - it's definitely silly, but I can't figure a fix.

One option is probably to reinstall the virtualenv. I can try doing that now. If anyone has any ideas, would be much appreciated.

cc @geohacker

geohacker commented 6 years ago

I just caught master up with upstream. I think we should try reinstalling the virtualenv.

geohacker commented 6 years ago

@batpad and I managed to fix this now: