气流问题:ssl.SSLError:[SSL:证书验证失败]证书验证失败(_ssl.c:852)

nom7f22z  于 2022-11-14  发布在  其他
关注(0)|答案(1)|浏览(216)

我正在使用Airflow,并尝试按照此post中提到的指导原则访问Tableau API。
然而,我在localhost:8080上得到了以下错误信息。我尝试了在Stack Overflow的不同帖子中提到的多个操作,如设置requests.get('https://site_name.com', verify=False)或在verify "C:\\Program Files\\Git\\usr\\ssl\\certs"中指定证书的路径,然后我得到了一个不同的错误信息,说路径无效。
我是新的SSL和不知道这一切是如何工作的。所以,我盲目拍摄没有了解实际问题是什么。我会感激如果你能建议我一些资源学习,沿着指出我如何可以解决这个问题。

错误消息

Broken DAG: \[/opt/airflow/dags/ExceltoDB.py\] Traceback (most recent call last):
File "/usr/local/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/airflow/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 446, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='analytics', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/airflow/.local/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='analytics', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))
b09cbbtk

b09cbbtk1#

尝试将extra_options={"verify":False}添加到SimpleHttpOperator

相关问题