Project

General

Profile

Actions

Bug #18308

closed

rudder package throws exceptions when the connection timeouts

Added by Félix DALLIDET over 3 years ago. Updated over 3 years ago.

Status:
Released
Priority:
N/A
Category:
Plugins integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

Description

If the connection timeout when contacting the repository, rudder-package throws multiple exceptions.
It should instead catch it and yield a simple error message.

root@server:~# rudder package update
^[^[Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 588, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 803, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 291, in connect
    self._tunnel()
  File "/usr/lib/python3.5/http/client.py", line 832, in _tunnel
    message.strip()))
OSError: Tunnel connection failed: 503 Service Unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 643, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 363, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='download.rudder.io', port=443): Max retries exceeded with url: /plugins/rpkg.index (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Service Unavailable',)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/rudder/share/python/rudder-pkg/rudderPkg.py", line 344, in update
    utils.download(utils.URL + "/" + "rpkg.index", quiet=quiet)
  File "/opt/rudder/share/python/rudder-pkg/rudderPkgUtils.py", line 135, in download
    r = requests.get(completeUrl, auth=(USERNAME, PASSWORD), stream=True)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 70, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 485, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='download.rudder.io', port=443): Max retries exceeded with url: /plugins/rpkg.index (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Service Unavailable',)))
HTTPSConnectionPool(host='download.rudder.io', port=443): Max retries exceeded with url: /plugins/rpkg.index (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Service Unavailable',)))

Actions #1

Updated by Félix DALLIDET over 3 years ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
Actions #2

Updated by Félix DALLIDET over 3 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/3248
Actions #3

Updated by Félix DALLIDET over 3 years ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Alexis Mousset over 3 years ago

  • Subject changed from rudder package throws exceptions when the connection timeout to rudder package throws exceptions when the connection timeouts
Actions #5

Updated by Alexis Mousset over 3 years ago

  • Name check changed from To do to Reviewed
Actions #6

Updated by Alexis Mousset over 3 years ago

  • Fix check changed from To do to Checked
Actions #7

Updated by Vincent MEMBRÉ over 3 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.6 and 6.2.0~beta1 which were released today.

Actions

Also available in: Atom PDF