-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL error when attempting to use data.nextstrain.org aligned files (north-america) #774
Comments
Thanks for the report. I can confirm that the certificates for https://data.nextstrain.org are ok. There's two things I suspect to be the issue. Either:
|
Good morning @tsibley, |
@jacaravas Well those are certainly new enough, so it's likely not situation 1. Can you run
and report the output? |
@tsibley After a long pause, I got:
|
@tsibley I just tried the same command on a different machine and got a different response. This may be a machine config issue.
|
@jacaravas Thank you for troubleshooting. Yes, this is a machine/network configuration issue. Your second response shows that your network operations team at CDC is MITMing connections (ostensibly for security). Note that the certificate reported is:
You'll need to contact the network team ([email protected] is listed on the cert) or internal IT support to resolve this. |
@tsibley Thank you very much for your help! |
Updating with resolution if anyone else encounters this error.
See: |
This information is a distillation of guidance and assistance I've provided to CDC and other downstream users over the years. I extracted it from my various notes and recollections and verified some specific behaviour anew. An official reference page will be useful for pointing users to in the future, and serves as a collection point for future recommendations/information uncovered in troubleshooting sessions. Related-to: <nextstrain/ncov#774> Related-to: <nextstrain/ncov#1055> Related-to: <nextstrain/nextclade#726>
This information is a distillation of guidance and assistance I've provided to CDC and other downstream users over the years. I extracted it from my various notes and recollections and verified some specific behaviour anew. An official reference page will be useful for pointing users to in the future, and serves as a collection point for future recommendations/information uncovered in troubleshooting sessions. Related-to: <nextstrain/ncov#774> Related-to: <nextstrain/ncov#1055> Related-to: <nextstrain/nextclade#726>
When attempting to include a remote input in the builds.yaml file, an SSL certificate error occurs.
It is not clear to me whether the error is due to a code bug, error in my builds.yaml file, configuration error on my end, an actual SSL certificate, firewall issue, etc... Can you verify that this is working as intended and give some troubleshooting tips if it is?
Builds.yaml inputs block (simplified):
`
inputs:
aligned: https://data.nextstrain.org/files/ncov/open/north-america/aligned.fasta.xz
metadata: https://data.nextstrain.org/files/ncov/open/north-america/metadata.tsv.xz
`
When this input is included, the analysis fails with
requests.exceptions.SSLError: HTTPSConnectionPool(host='data.nextstrain.org', port=443): Max retries exceeded with url: /files/ncov/open/north-america/aligned.fasta.xz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))
When that input and associated subsampling references are removed, the builds.yaml file works as intended.
Full error log below.
`>Building DAG of jobs...
WARNING: No valid subsampling scheme is defined for build 'basic'. Skipping subsampling and using all available samples.
Traceback (most recent call last):
File "home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn
conn.connect()
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/connection.py", line 416, in connect
self.sock = ssl_wrap_socket(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/home/my_conda_envs/nextstrain/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/home/my_conda_envs/nextstrain/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/home/my_conda_envs/nextstrain/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='data.nextstrain.org', port=443): Max retries exceeded with url: /files/ncov/open/north-america/aligned.fasta.xz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/init.py", line 699, in snakemake
success = workflow.execute(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/workflow.py", line 763, in execute
dag.init()
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 179, in init
job = self.update([job], progress=progress, create_inventory=True)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 874, in update_
selected_job = self.update(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 759, in update
self.update_(
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/dag.py", line 863, in update_
if not res.file.exists:
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/io.py", line 453, in exists
return self.exists_remote
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/io.py", line 247, in wrapper
v = func(self, *args, **kwargs)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/io.py", line 474, in exists_remote
return self.remote_object.exists()
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/remote/HTTP.py", line 159, in exists
with self.httpr(verb="HEAD") as httpr:
File "/home/my_conda_envs/nextstrain/lib/python3.9/contextlib.py", line 119, in enter
return next(self.gen)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/snakemake/remote/HTTP.py", line 152, in httpr
r = requests.head(url, *args_to_use, **kwargs_to_use)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/requests/api.py", line 102, in head
return request('head', url, **kwargs)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/my_conda_envs/nextstrain/lib/python3.9/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='data.nextstrain.org', port=443): Max retries exceeded with url: /files/ncov/open/north-america/aligned.fasta.xz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))`
The text was updated successfully, but these errors were encountered: