Closed Bug 1470389 Opened 8 years ago Closed 5 years ago

Intermittent ConnectionError: HTTPSConnectionPool(host='cloud-mirror-production-us-west-1.s3-us-west-1.amazonaws.com', port=443): Max retries exceeded with url:

Categories

(Taskcluster :: General, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure)

Filed by: archaeopteryx [at] coole-files.de https://treeherder.mozilla.org/logviewer.html#?job_id=184195693&repo=autoland https://queue.taskcluster.net/v1/task/NwlKw1LKTPCoVL-Rqv0bTw/runs/0/artifacts/public/logs/live_backing.log [task 2018-06-21T15:58:56.419Z] 15:58:56 INFO - Creating global state directory from environment variable: /builds/worker/.mozbuild [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - Error running mach: [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - ['artifact', 'toolchain', '-v', '--retry', '4', '--artifact-manifest', '/builds/worker/workspace/build/src/toolchains.json', 'public/build/clang.tar.xz@Qcz67MwYTy-75fx03JRsCA', 'public/build/gcc.tar.xz@VvkgBFjBTO63e-xOjrpi9g', 'public/build/sccache2.tar.xz@H2LGXvAyR5WH4ZbkKWTA2Q', 'public/build/rustc.tar.xz@cBrY-6UiT3WCvN8J-GB0uA', 'public/build/rust-size.tar.xz@BVQ87LCmQB65HWADbFpKRA'] [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - The error occurred in code that was called by the mach command. This is either [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - a bug in the called code itself or in the way that mach is calling it. [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - You should consider filing a bug for this issue. [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - If filing a bug, please include the full output of mach, including this error [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - message. [task 2018-06-21T16:01:04.584Z] 16:01:04 INFO - The details of the failure are as follows: [task 2018-06-21T16:01:04.585Z] 16:01:04 INFO - ConnectionError: HTTPSConnectionPool(host='cloud-mirror-production-us-west-1.s3-us-west-1.amazonaws.com', port=443): Max retries exceeded with url: /https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Ftaskcluster-public-artifacts%2FQcz67MwYTy-75fx03JRsCA%2F0%2Fpublic%2FchainOfTrust.json.asc (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fa7dc5cd3d0>: Failed to establish a new connection: [Errno 110] Connection timed out',)) [task 2018-06-21T16:01:04.585Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/mach_commands.py", line 1435, in artifact_toolchain [task 2018-06-21T16:01:04.585Z] 16:01:04 INFO - record = ArtifactRecord(task_id, name) [task 2018-06-21T16:01:04.585Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/mach_commands.py", line 1328, in __init__ [task 2018-06-21T16:01:04.585Z] 16:01:04 INFO - get_artifact_url(task_id, 'public/chainOfTrust.json.asc')) [task 2018-06-21T16:01:04.585Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/third_party/python/requests/requests/sessions.py", line 480, in get [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - return self.request('GET', url, **kwargs) [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/third_party/python/requests/requests/sessions.py", line 468, in request [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - resp = self.send(prep, **send_kwargs) [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/third_party/python/requests/requests/sessions.py", line 597, in send [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - history = [resp for resp in gen] if allow_redirects else [] [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/third_party/python/requests/requests/sessions.py", line 195, in resolve_redirects [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - **adapter_kwargs [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/third_party/python/requests/requests/sessions.py", line 576, in send [task 2018-06-21T16:01:04.586Z] 16:01:04 INFO - r = adapter.send(request, **kwargs) [task 2018-06-21T16:01:04.587Z] 16:01:04 INFO - File "/builds/worker/workspace/build/src/third_party/python/requests/requests/adapters.py", line 437, in send [task 2018-06-21T16:01:04.587Z] 16:01:04 INFO - raise ConnectionError(e, request=request) [task 2018-06-21T16:01:04.605Z] 16:01:04 ERROR - Return code: 1 [task 2018-06-21T16:01:04.605Z] 16:01:04 ERROR - 1 not in success codes: [0] [task 2018-06-21T16:01:04.605Z] 16:01:04 WARNING - setting return code to 2 [task 2018-06-21T16:01:04.605Z] 16:01:04 FATAL - Halting on failure while running ['/usr/bin/python2.7', '-u', '/builds/worker/workspace/build/src/mach', 'artifact', 'toolchain', '-v', '--retry', '4', '--artifact-manifest', '/builds/worker/workspace/build/src/toolchains.json', 'public/build/clang.tar.xz@Qcz67MwYTy-75fx03JRsCA', 'public/build/gcc.tar.xz@VvkgBFjBTO63e-xOjrpi9g', 'public/build/sccache2.tar.xz@H2LGXvAyR5WH4ZbkKWTA2Q', 'public/build/rustc.tar.xz@cBrY-6UiT3WCvN8J-GB0uA', 'public/build/rust-size.tar.xz@BVQ87LCmQB65HWADbFpKRA'] [task 2018-06-21T16:01:04.606Z] 16:01:04 FATAL - Running post_fatal callback... [task 2018-06-21T16:01:04.606Z] 16:01:04 FATAL - Exiting 2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Status: REOPENED → RESOLVED
Closed: 8 years ago → 7 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---

fwiw, I'm seeing similar errors attempting to download logs though the apparent cause appears different.

HTTPSConnectionPool(host='anl65viaaaawtnfrdd2fs3ze5ucy4snsjyxrhggyy6unxzlv.taskcluster-worker.net', port=32773): Max retries exceeded with url: /log/goPGe24nSMqZ8yeXz3rrHA (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f53e2633320>: Failed to establish a new connection: [Errno -2] Name or service not known'))

That has to do with stateless DNS. Was that URL freshly fetched from the queue when you accessed it? Those hostnames only last a little while (they point to EC2 spot instances that also only last a little while).

Not freshly fetched I don't think which was redirected from the queue. It was from fetching artifacts from a mozilla-central build from Mon, Mar 25, 02:51:53. Fuller details in:

WARNING:root:utils.download_file: https://queue.taskcluster.net/v1/task/RO5DCyjHT1ePWuZgtrh9DA/runs/0/artifacts/public/logs/live.log: Attempt 2: HTTPSConnectionPool(host='anl65viaaaawtnfrdd2fs3ze5ucy4snsjyxrhggyy6unxzlv.taskcluster-worker.net', port=32773): Max retries exceeded with url: /log/goPGe24nSMqZ8yeXz3rrHA (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f53e2633320>: Failed to establish a new connection: [Errno -2] Name or service not known'))

According to dustin on irc, my issue was do to the fact that the worker had crashed and took its logs with it and that I should have been trying to get live_backing.log instead.

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=236925616&repo=mozilla-central&lineNumber=6120

[task 2019-03-29T15:59:53.809Z] 15:59:53 INFO - BUILD SUCCESSFUL in 5s
[task 2019-03-29T15:59:53.809Z] 15:59:53 INFO - 103 actionable tasks: 2 executed, 101 up-to-date
[task 2019-03-29T15:59:54.163Z] 15:59:54 INFO - make[1]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/mobile/android/base'
[task 2019-03-29T15:59:54.163Z] 15:59:54 INFO - make package-langpack-son
[task 2019-03-29T15:59:54.165Z] 15:59:54 INFO - make[1]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/mobile/android/locales'
[task 2019-03-29T15:59:54.167Z] 15:59:54 INFO - /builds/worker/workspace/build/src/obj-firefox/_virtualenvs/init/bin/python /builds/worker/workspace/build/src/config/nsinstall.py -D ../../../dist/android-arm/xpi/
[task 2019-03-29T15:59:54.205Z] 15:59:54 INFO - /builds/worker/workspace/build/src/obj-firefox/_virtualenvs/init/bin/python -m mozbuild.action.langpack_manifest --locales son --min-app-ver 68.0a1 --max-app-ver 68.0a1 --app-name "Firefox Nightly" --l10n-basedir "/builds/worker/workspace/build/l10n-central" --defines /builds/worker/workspace/build/l10n-central/son/toolkit/defines.inc /builds/worker/workspace/build/l10n-central/son/mobile/android/defines.inc --langpack-eid "langpack-son@firefox.mozilla.org" --input ../../../dist/xpi-stage/locale-son
[task 2019-03-29T16:02:01.803Z] 16:02:01 ERROR - Traceback (most recent call last):
[task 2019-03-29T16:02:01.803Z] 16:02:01 INFO - File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
[task 2019-03-29T16:02:01.803Z] 16:02:01 INFO - "main", fname, loader, pkg_name)
[task 2019-03-29T16:02:01.803Z] 16:02:01 INFO - File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
[task 2019-03-29T16:02:01.803Z] 16:02:01 INFO - exec code in run_globals
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/action/langpack_manifest.py", line 490, in <module>
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - main(sys.argv[1:])
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/action/langpack_manifest.py", line 484, in main
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - chrome_entries
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/action/langpack_manifest.py", line 431, in create_webmanifest
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - 'version': get_timestamp_for_locale(os.path.join(l10n_basedir, loc)),
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/action/langpack_manifest.py", line 100, in get_timestamp_for_locale
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - dt = get_dt_from_hg(path)
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/action/langpack_manifest.py", line 70, in get_dt_from_hg
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - raise Exception(msg)
[task 2019-03-29T16:02:01.804Z] 16:02:01 INFO - Exception: Failed to retrieve push timestamp using https://hg.mozilla.org/l10n-central/son/json-rev/a5ea5e400858495176c90cb41b7ae0e928ba53f3
[task 2019-03-29T16:02:01.805Z] 16:02:01 INFO - Error: HTTPSConnectionPool(host='hg.mozilla.org', port=443): Max retries exceeded with url: /l10n-central/son/json-rev/a5ea5e400858495176c90cb41b7ae0e928ba53f3 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7c8ad45390>: Failed to establish a new connection: [Errno 110] Connection timed out',))
[task 2019-03-29T16:02:01.813Z] 16:02:01 INFO - /builds/worker/workspace/build/src/toolkit/locales/l10n.mk:220: recipe for target 'package-langpack-son' failed
[task 2019-03-29T16:02:01.813Z] 16:02:01 ERROR - make[1]: *** [package-langpack-son] Error 1
[task 2019-03-29T16:02:01.813Z] 16:02:01 INFO - make[1]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/mobile/android/locales'
[task 2019-03-29T16:02:01.814Z] 16:02:01 INFO - Makefile:81: recipe for target 'installers-son' failed
[task 2019-03-29T16:02:01.814Z] 16:02:01 INFO - make: *** [installers-son] Error 2
[task 2019-03-29T16:02:01.814Z] 16:02:01 ERROR - Return code: 2
[task 2019-03-29T16:02:01.814Z] 16:02:01 ERROR - son failed in make installers-son!
[task 2019-03-29T16:02:01.814Z] 16:02:01 ERROR - # TBPL FAILURE #

Fwiw I find that when using requests, implementing a retry when requests.exceptions.HTTPError/status_code == 503 Server Error or requests.exceptions.ConnectionError works around these issues. You would need to find the various locations and wrap the calls in a loop. This would include third-party code such as dlmanager.

This bug appears to have become a dumping ground for anything involving "HTTPSConnectionPool", meaning that something in Python is talking to something via HTTPS, and it didn't work. In general, yeah, retries are good -- but some of these failures are in hg, some are in mozharness, etc.

Cloud-mirror has been disabled for a loooong time now.

Status: REOPENED → RESOLVED
Closed: 7 years ago → 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.