Closed Bug 1628310 Opened 5 years ago Closed 5 years ago

Python: Suppress socket error in ping uploader

Categories

(Data Platform and Tools :: Glean: SDK, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdroettboom, Assigned: mdroettboom)

Details

(Whiteboard: [telemetry:glean-rs:m13][glean-py])

Attachments

(1 file)

If networking is down, we shouldn't display a crazy traceback. Just skip the uploading of that file and save it for next time.

See: Process Process-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/Users/piotrzalewa/Envs/rev/lib/python3.7/site-packages/glean/net/ping_upload_worker.py", line 105, in _process_worker
success = _process(storage_dir, configuration)
File "/Users/piotrzalewa/Envs/rev/lib/python3.7/site-packages/glean/net/ping_upload_worker.py", line 123, in _process
if not _process_file(path, configuration):
File "/Users/piotrzalewa/Envs/rev/lib/python3.7/site-packages/glean/net/ping_upload_worker.py", line 164, in _process_file
url_path, serialized_ping, configuration
File "/Users/piotrzalewa/Envs/rev/lib/python3.7/site-packages/glean/net/base_uploader.py", line 112, in do_upload
headers=self._get_headers_to_send(config),
File "/Users/piotrzalewa/Envs/rev/lib/python3.7/site-packages/glean/net/http_client.py", line 54, in upload
"POST", parsed_url.path, body=data.encode("utf-8"), headers=dict(headers),
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1414, in connect
super().connect()
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 938, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Assignee: nobody → mdroettboom
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: