Skip to content
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

data2: wget cannot verify knb.ecoinformatics.org's certificate but curl does #35

Closed
mamelara opened this issue Jan 25, 2022 · 1 comment

Comments

@mamelara
Copy link
Contributor

When attempting to retrieve the bin tarball from the knb.ecoinformatics.org/software/dist repository on data2.ess-dive.lbl.gov, wget fails with the following command in build.sh:

 # Get the metacat distribution
  if [ ! -f  "$DIR/${ARCHIVE}" ];
  then
      wget http://knb.ecoinformatics.org/software/dist/${ARCHIVE} -O $DIR/${ARCHIVE}

  fi

This results in this output:

INFO: Metacat major:2 minor:16
--2022-01-25 09:48:05--  http://knb.ecoinformatics.org/software/dist/metacat-bin-2.16.2.tar.gz
Resolving knb.ecoinformatics.org (knb.ecoinformatics.org)... 128.111.85.211
Connecting to knb.ecoinformatics.org (knb.ecoinformatics.org)|128.111.85.211|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://knb.ecoinformatics.org/software/dist/metacat-bin-2.16.2.tar.gz [following]
--2022-01-25 09:48:05--  https://knb.ecoinformatics.org/software/dist/metacat-bin-2.16.2.tar.gz
Connecting to knb.ecoinformatics.org (knb.ecoinformatics.org)|128.111.85.211|:443... connected.
ERROR: cannot verify knb.ecoinformatics.org's certificate, issued by '/C=US/O=Let's Encrypt/CN=R3':
  Issued certificate has expired.
To connect to knb.ecoinformatics.org insecurely, use `--no-check-certificate'.

However, the LE cert for knb has not expired and curl validates the cert properly:

curl -v https://knb.ecoinformatics.org/software/dist/metacat-bin-2.16.2.tar.gz -o metacat-bin-2.16.2.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* About to connect() to knb.ecoinformatics.org port 443 (#0)
*   Trying 128.111.85.211...
* Connected to knb.ecoinformatics.org (128.111.85.211) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* NSS: client certificate not found (nickname not specified)
* SSL connection using TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
* Server certificate:
* 	subject: CN=knb.ecoinformatics.org
* 	start date: Jan 15 13:25:49 2022 GMT
* 	expire date: Apr 15 13:25:48 2022 GMT
* 	common name: knb.ecoinformatics.org
* 	issuer: CN=R3,O=Let's Encrypt,C=US
> GET /software/dist/metacat-bin-2.16.2.tar.gz HTTP/1.1
> User-Agent: curl/7.29.0
> Host: knb.ecoinformatics.org
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 25 Jan 2022 18:47:01 GMT
< Server: Apache/2.4.52 (Ubuntu)
< Last-Modified: Wed, 12 Jan 2022 18:49:43 GMT
< ETag: "1bae765b-5d56708738ce6"
< Accept-Ranges: bytes
< Content-Length: 464418395
< X-Frame-Options: sameorigin
< Access-Control-Allow-Origin:
< Access-Control-Allow-Headers: Authorization, Content-Type, Origin, Cache-Control
< Access-Control-Allow-Methods: GET, POST, PUT, OPTIONS
< Access-Control-Allow-Credentials: true
< Content-Type: application/x-gzip
<
{ [data not shown]
100  442M  100  442M    0     0  63.7M      0  0:00:06  0:00:06 --:--:-- 61.5M
* Connection #0 to host knb.ecoinformatics.org left intact

It may be that the root certificate that wget uses is outdated, so this may need to be updated, or we change the command to use curl instead.

To replicate, run the essdive-appstack build_failover.sh script and it should fail when attempting to retrieve the 2.16.2 tarball.

@mamelara
Copy link
Contributor Author

Note: This seems to only be the case for data2. The NCEAS VM seems to work fine with wget.

@mamelara mamelara changed the title wget cannot verify knb.ecoinformatics.org's certificate but curl does data2: wget cannot verify knb.ecoinformatics.org's certificate but curl does Jan 26, 2022
@vchendrix vchendrix closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants