Python log importer fails to run (ssl error?)


(Josh Mountain) #1

When running the following command:

sudo python /home/forge/mysite.com/piwik/misc/log-analytics/import_logs.py --url=https://mysite.com/piwik --idsite=1 --recorders=4 --enable-http-errors --enable-http-redirects --enable-static --enable-bots /var/log/nginx/mysite.com-access.log

I get the following error:

[INFO] Error when connecting to Piwik: <urlopen error [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error>
[INFO] Retrying request, attempt number 2

This looks like some sort of SSL error to me but I’m not well versed enough to figure it out. My site is only served over SSL and it seems to be having trouble connecting to Piwik. Any help is greatly appreciated!


(Josh Mountain) #2

This was solved by using Python 2.7.10, the problem was that 2.7.6 doesn’t support SNI.