-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow Provider(s)
slack
Versions of Apache Airflow Providers
4.0.2
Apache Airflow version
2.2.2
Operating System
Amazon Managed Airflow
Deployment
MWAA
Deployment details
No response
What happened
I am using a DAG which has sending slack notifications as TASK. I am using SlackWebHookOperator to send notifications. I create a web hook and created a connection. I am using the same connection in SlackWebHookOperator. I am getting "ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)" error. I see, slack made a mandate SSL verification from march 4,2020.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self.validate_conn(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 426, in connect
tls_in_tls=tls_in_tls,
File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl.py", line 450, in ssl_wrap_socket
sock, context, tls_in_tls, server_hostname=server_hostname
File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib64/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/lib64/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/lib64/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)
What you expected to happen
I used SlackWebHookOperator in airflow to send notifications in 2019 and I was not facing any issues earlier. Due to above error, we are unable to send notifications to slack using slack web hook
How to reproduce
Create a slack channel, create a incoming webhook for the channel. Using webhook URL, create a slack connection under connections section. Try to send notifications to slack channel using SlackWebHookOperator
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct