Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionError: HTTPSConnectionPool #3209

Closed
mvala opened this issue Jan 18, 2018 · 3 comments
Closed

ConnectionError: HTTPSConnectionPool #3209

mvala opened this issue Jan 18, 2018 · 3 comments

Comments

@mvala
Copy link

mvala commented Jan 18, 2018

2018-01-18 06:57:43,036  28e04a15777a48cb  indico.flask - ERROR errors.py:107 -- HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/indico/json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xda97a90>: Failed to establish a new connection: [Errno -2] Name or service not known',))

Traceback (most recent call last):
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/flask/util.py", line 114, in wrapper
    return obj().process()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 270, in process
    res = self._do_process()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 249, in _do_process
    return self._process()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/modules/core/controllers.py", line 205, in _process
    return jsonify(indico=self._check_version('indico', indico.__version__),
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico/modules/core/controllers.py", line 182, in _check_version
    response = requests.get('https://pypi.python.org/pypi/{}/json'.format(distribution))
  File "/opt/indico/.venv/lib/python2.7/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/indico/json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xda97a90>: Failed to establish a new connection: [Errno -2] Name or service not known',))

{u'data': {u'get': {'_': u'1516255062639'},
           u'headers': {'Accept': u'*/*',
                        'Accept-Encoding': u'gzip, deflate, br',
                        'Accept-Language': u'en-US,en;q=0.5',
                        'Content-Length': u'',
                        'Content-Type': u'',
                        'Cookie': u'indico_session=***; ajs_user_id=null; ajs_group_id=null; ajs_anonymous_id=%2200000000000000000000000000%22',
                        'Host': u'indico.openbrain.sk',
                        'Referer': u'https://indico.openbrain.sk/admin/settings/',
                        'User-Agent': u'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',
                        'X-Csrf-Token': u'***',
                        'X-Requested-With': u'XMLHttpRequest'},
           u'json': None,
           u'post': {},
           u'url': {}},
 u'endpoint': u'core.version_check',
 u'id': '28e04a15777a48cb',
 u'ip': '46.193.138.1',
 u'method': 'GET',
 u'referrer': 'https://indico.openbrain.sk/admin/settings/',
 u'rh': 'RHVersionCheck',
 u'time': '2018-01-18T06:57:43.111483',
 u'url': u'https://indico.openbrain.sk/admin/version-check?_=1516255062639',
 u'user': {u'email': u'mvala@saske.sk', u'id': 1, u'name': u'Martin Vala'},
 u'user_agent': u'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0'}
@pferreir
Copy link
Member

Ugh. Sounds like PyPI was down. But we should silently ignore that.

@ThiefMaster
Copy link
Member

We already ignore it as in "we don't show the error dialog if the AJAX request fails. I think this was from one of the error emails.

While there is probably not much benefit in having it in the log either, there is one advantage: There was someone else recently (I think in the forums) who had to configure an HTTP proxy so Indico could make outgoing HTTP requests. He might not have noticed this that early were it not for the failing version check request - and when a request then only fails e.g. when getting an image to convert an abstract to PDF, there wouldn't be a log message at all, and users would wonder why their image fails...


BTW, please make sure to never include your indico_session token when posting error emails. Having this token would allow someone to hijack your session (you might want to logout and login again to invalidate the token you posted here)

@pferreir
Copy link
Member

I'm just wondering if this won't be too noisy. Maybe we could turn it into a warning instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants