SSLError
Closed this issue · 2 comments
MyNameIsTroll commented
Bonjour,
Parfois je reçois ce type d'erreurs, il semble que cela vienne des certificats SSL, peut-être que mes logs peuvent vous aider a identifier le problème:
Traceback (most recent call last):
File "/home/admin/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/admin/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/home/admin/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
conn.connect()
File "/home/admin/.local/lib/python3.5/site-packages/urllib3/connection.py", line 364, in connect
_match_hostname(cert, self.assert_hostname or server_hostname)
File "/home/admin/.local/lib/python3.5/site-packages/urllib3/connection.py", line 374, in _match_hostname
match_hostname(cert, asserted_hostname)
File "/usr/lib/python3.5/ssl.py", line 305, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname 'eur1.fr' doesn't match either of 'prod.europe1.fr', 'europe1.fr', '*.prod.europe1.fr', '*.europe1.fr', 'prod.lejdd.fr', 'lejdd.fr', '*.prod.lejdd.fr', '*.lejdd.fr', '*.prod.europe1.lanmedia.fr', '*.prod.lejdd.lanmedia.fr', '*.lanmedia.fr'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/admin/.local/lib/python3.5/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/admin/.local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/admin/.local/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='eur1.fr', port=443): Max retries exceeded with url: /nADpaKA (Caused by SSLError(CertificateError("hostname 'eur1.fr' doesn't match either of 'prod.europe1.fr', 'europe1.fr', '*.prod.europe1.fr', '*.europe1.fr', 'prod.lejdd.fr', 'lejdd.fr', '*.prod.lejdd.fr', '*.lejdd.fr', '*.prod.europe1.lanmedia.fr', '*.prod.lejdd.lanmedia.fr', '*.lanmedia.fr'",),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/admin/tootbot/tootbot.py", line 88, in <module>
r = requests.get(l, allow_redirects=False)
File "/home/admin/.local/lib/python3.5/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/home/admin/.local/lib/python3.5/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/home/admin/.local/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/admin/.local/lib/python3.5/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/admin/.local/lib/python3.5/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='eur1.fr', port=443): Max retries exceeded with url: /nADpaKA (Caused by SSLError(CertificateError("hostname 'eur1.fr' doesn't match either of 'prod.europe1.fr', 'europe1.fr', '*.prod.europe1.fr', '*.europe1.fr', 'prod.lejdd.fr', 'lejdd.fr', '*.prod.lejdd.fr', '*.lejdd.fr', '*.prod.europe1.lanmedia.fr', '*.prod.lejdd.lanmedia.fr', '*.lanmedia.fr'",),))
cquest commented
tootbot semble chercher à se connecter à https://eur1.fr qui n'est pas un serveur mastodon...
MyNameIsTroll commented
C'est étrange. J'ai mis en place un bot pour dupliquer les tweets de l'AFPfr et il toot des news avec des liens vers eur1.fr apparemment. Je me demande si c'est peut-être mon DNS qui bloque certaines adresses du coup.