[SOLVED] Certificate errors on startup
Posted: 28 Nov 2019, 15:25
Aloha,...
I set up an installation on a Ubuntu 16.04 vhost, according to the installation steps,... When I start it on the console I get some errors, which I can't handle,.. ^^
I copied the console output to this file https://pl4yground.de/pyplanet_certificate_errors.txt. Maybe someone can help me with that,...
would be great,...
thx an greetz,...
EDIT:
I went a little bit deeper into the code,... there seems to be problems with the CApath,...
for exmaple:
if I use
with the CApath everythings work fine, without it throws the error " Verify return code: 20 (unable to get local issuer certificate)"
maybe anyone has an idea for that,..
EDIT2: Found the solution
In my case it was a problem with the python3 cacert. This have to be in the right place of your user cert lib. I post here my solution for that, maybe someone can need it in future, taking same problems,... Two commans are nessecary:
1. Find out where the openssl ca files are lying
in my case
/usr/lib/ssl/ Take this dir, and copy the python3 certifi cacert to this directry as cert.pem
That's all,.. wohooo,... pyplanet is starting without ssl errors, log is not spammed anymore, any function is working correctly,..
greetz,... can be closed,...
I set up an installation on a Ubuntu 16.04 vhost, according to the installation steps,... When I start it on the console I get some errors, which I can't handle,.. ^^
I copied the console output to this file https://pl4yground.de/pyplanet_certificate_errors.txt. Maybe someone can help me with that,...

would be great,...
thx an greetz,...
EDIT:
I went a little bit deeper into the code,... there seems to be problems with the CApath,...

for exmaple:
Code: Select all
Cannot connect to host api.github.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED]
Code: Select all
openssl s_client -CApath /etc/ssl/certs/ -connect api.github.com:443
maybe anyone has an idea for that,..

EDIT2: Found the solution
In my case it was a problem with the python3 cacert. This have to be in the right place of your user cert lib. I post here my solution for that, maybe someone can need it in future, taking same problems,... Two commans are nessecary:
1. Find out where the openssl ca files are lying
in my case
Code: Select all
/home/tmserveruser/.pyenv/versions/3.7.0/bin/python3.7 -c"import ssl; print(ssl.get_default_verify_paths().openssl_cafile)"
Code: Select all
cp /home/tmserveruser/.pyenv/versions/3.7.0/envs/rpgserver/lib/python3.7/site-packages/certifi/cacert.pem /usr/lib/ssl/cert.pem
greetz,... can be closed,...