ropensci / weathercan

R package for downloading weather data from Environment and Climate Change Canada
https://docs.ropensci.org/weathercan
GNU General Public License v3.0
102 stars 29 forks source link

Evaluation error: server certificate verification failed #86

Closed steffilazerte closed 4 years ago

steffilazerte commented 4 years ago

another question: we're not able to use both function weather_dl and station_dl on our linux server. We are getting that message:

kam <- weather_dl(station_ids = 51423,

  • start = "2016-01-01", end = "2016-02-15") Error: Evaluation error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none.

s <- stations_dl() Error: Evaluation error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none.

It's working on all the windows and mac computers on the same network. Other packages that get remote data are still working. Have you ever seen this? Any idea?

Thanks, E.

Le lun. 30 sept. 2019 à 13:11, Steffi LaZerte notifications@github.com a écrit :

Ahh, I see your problem. Well, I'm glad the package is working for you at least! Any specific questions regarding the data itself are best sent to ECCC, good luck!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/weathercan/issues/59?email_source=notifications&email_token=AGNA6HQ6V5YMCHJ4TMCQRN3QMIQMPA5CNFSM4FOYENR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD76GL7Y#issuecomment-536634879, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNA6HVPNMM7APMEHOPX3O3QMIQMPANCNFSM4FOYENRQ .

Originally posted by @ebourlon in https://github.com/ropensci/weathercan/issues/59#issuecomment-537025429

steffilazerte commented 4 years ago

I suspect it isn't a weathercan issue but rather a problem with the certificates on your server. For example: https://stackoverflow.com/questions/21181231/server-certificate-verification-failed-cafile-etc-ssl-certs-ca-certificates-c. If you want to pursue this further as a weathercan problem, open a new issue and we can troubleshoot from there.

Originally posted by @steffilazerte in #59 (comment)

steffilazerte commented 4 years ago

Package is working again on our ubuntu servers. Adding climate.weather.gc.ca security certificate to our ca-certificates file fixed the "Error: Evaluation error: server certificate verification failed" issue.

Originally posted by @ebourlon in #59 (comment)

ebourlon commented 4 years ago

On our ubuntu linux servers, here is the commands I used (sudo if needed):

1- Get the climate.weather.gc.ca certificate and save it into climate.weather.gc.ca.crt in the ca-certificate folder of the server (/usr/local/share/ca-certificates/ is the usual folder): echo -n | openssl s_client -showcerts -connect climate.weather.gc.ca:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /usr/local/share/ca-certificates/climate.weather.gc.ca.crt

2- Update the ca-certificates: update-ca-certificates

Et voilà! It worked for us that way.

rajeshroy402 commented 3 years ago

You can try to reinstall the certificates:

Make sure first that you have certificates installed on your Debian in /etc/ssl/certs.

If not, reinstall them:

sudo apt-get install --reinstall ca-certificates

Since that package does not include root certificates, add:

sudo mkdir /usr/local/share/ca-certificates/cacert.org
sudo wget -P /usr/local/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt
sudo update-ca-certificates

Make sure your git does reference those CA:

git config --global http.sslCAinfo /etc/ssl/certs/ca-certificates.crt