通过SSL失败的Curl请求

2024-09-28 15:23:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将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

我相信这是通过SSL失败,但我不确定。以前是否有人遇到过此问题,或者有关于此错误的更多信息?你知道吗


Tags: 工具infocomlog信息httpsslenable
1条回答
网友
1楼 · 发布于 2024-09-28 15:23:26

问题是该站点使用的是使用SNI的CloudFlare SSL。直到2.7.7,对SNI的支持才被添加到python中。升级到2.7.10修复了这个问题!你知道吗

相关问题 更多 >