卷曲请求无法通过SSL

时间:2015-11-26 18:47:30

标签: python python-2.7 ssl curl matomo

我正在尝试将Piwik设置为分析工具并让它处理我的Nginx访问日志。由于某些原因,python连接到Piwik时遇到问题,我相信这是因为我的网站只通过SSL提供,但我不确定错误的含义。当我运行以下命令时:

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

我回过头来看:

[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

我相信这是Curl在SSL上失败,但我不确定。有没有人之前遇到此问题或有任何关于此错误的信息?

1 个答案:

答案 0 :(得分:1)

问题是该网站使用的是使用SNI的CloudFlare SSL。 SNI的支持直到2.7.7才被添加到python中。升级到2.7.10修复了问题!