Actions
Bug #18308
closedrudder 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',)))
Actions