1

I'm coding a discord bot in python. Whenever I try to connect to a specific site, on my EC2 instance running Amazon Linux 2, the script returns the following error:

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)]

(actual url snipped.)

The bot itself is dockerized, running python:3.7.4-slim-buster. The error is not present when built with image python:3.7.4-slim-stretch.

I've also tested the same script built with base image -buster on MacOS and also a GCP Compute Engine instance, both are error free.

What am I missing? Any tips welcome.

mistytalon
  • 11
  • 2
  • you question is answerd here : https://serverfault.com/questions/984926/amazon-linux-2-openssl-wrong-singature-type – LinPy Sep 20 '19 at 05:18
  • and here's the another solution https://github.com/psf/requests/issues/4775 – annndrey Dec 11 '19 at 12:44

1 Answers1

0

First of all I checked the current tls version used by connection to the site. It was 1.2.

I got same error with wget so I understand that problem not in python itself, but somewhere in openssl and system settings.

On Ubuntu 20.04.1 LTS I upgrade openssl from 1.1.1f to 1.1.1g - it solves the issue for me. I followed this manual.

Etoneja
  • 1,023
  • 1
  • 8
  • 15