[SOLVED] Certificate errors on startup

Python 3 Server Controller for Trackmania and Shootmania for script-only modes.

Moderators: TheM, toffe, NADEO

User avatar
Posts: 53
Joined: 16 Apr 2013, 12:11

[SOLVED] Certificate errors on startup

Post by ramires » 28 Nov 2019, 15:25


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,...


I went a little bit deeper into the code,... there seems to be problems with the CApath,... :shock:

for exmaple:

Code: Select all

Cannot connect to host api.github.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED]
if I use

Code: Select all

openssl s_client -CApath /etc/ssl/certs/ -connect api.github.com:443
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

Code: Select all

/home/tmserveruser/.pyenv/versions/3.7.0/bin/python3.7 -c"import ssl; print(ssl.get_default_verify_paths().openssl_cafile)"
/usr/lib/ssl/ Take this dir, and copy the python3 certifi cacert to this directry as cert.pem

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
That's all,.. wohooo,... pyplanet is starting without ssl errors, log is not spammed anymore, any function is working correctly,..

greetz,... can be closed,...
«ramires»«[PUB[RPG.PL4YGROUND]]» / JOIN

For contact & suggestions find me on Discord JOIN

race on,... ;-)


Return to “PyPlanet”

Who is online

Users browsing this forum: No registered users and 1 guest