【发布时间】:2020-01-21 00:25:21
【问题描述】:
我正在用 python 编写一个不和谐的机器人。每当我尝试在运行 Amazon Linux 2 的 EC2 实例上连接到特定站点时,脚本都会返回以下错误:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientConnectorSSLError: Cannot connect to host secure.site.here:443 ssl:None [[SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1076)]
(实际网址被截断。)
机器人本身是 dockerized,运行 python:3.7.4-slim-buster。使用镜像python:3.7.4-slim-stretch构建时不存在该错误。
我还在 MacOS 和 GCP Compute Engine 实例上测试了使用基本映像 -buster 构建的相同脚本,两者都没有错误。
我错过了什么?欢迎任何提示。
【问题讨论】:
-
你的问题在这里得到解答:serverfault.com/questions/984926/…
-
这是另一个解决方案github.com/psf/requests/issues/4775
标签: python docker amazon-ec2 openssl