Actions
Bug #18308
closedrudder package throws exceptions when the connection timeouts
Bug #18308:
rudder package throws exceptions when the connection timeouts
Pull Request:
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',)))
Updated by Félix DALLIDET about 5 years ago
- Status changed from New to In progress
- Assignee set to Félix DALLIDET
Updated by Félix DALLIDET about 5 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
Updated by Félix DALLIDET about 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|ba4a8e244bdc1076812269116aa944bbe63e5233.
Updated by Alexis Mousset about 5 years ago
- Subject changed from rudder package throws exceptions when the connection timeout to rudder package throws exceptions when the connection timeouts
Updated by Alexis Mousset about 5 years ago
- Name check changed from To do to Reviewed
Updated by Alexis Mousset about 5 years ago
- Fix check changed from To do to Checked
Updated by Vincent MEMBRÉ about 5 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