Airflow-MS-Teams-Operator icon indicating copy to clipboard operation
Airflow-MS-Teams-Operator copied to clipboard

Connection aborted error after cloud composer upgrade

Open chavanatul1 opened this issue 4 years ago • 1 comments

Hi, After upgrading the cloud composer and airflow versions from v.1.10.10 to 1.10.15

Detailed logs are attached here. Can you please help ?

[2022-01-05 14:34:40,780] {base_hook.py:89} INFO - Using connection to: id: msteam-test. Host: https://XXXXXXX.webhook.office.com/webhookb2/76735d08-3051-4315-9636-09590681eb21@68283f3b-8487-4c86-adb3-a5228f18b893/IncomingWebhook/7475361be6614c4e81e9ea09e4393f4e/bebbf3a3-76c5-4a28-9802-4e734e03b60e, Port: None, Schema: https, Login: None, Password: None, extra: None [2022-01-05 14:34:40,785] {http_hook.py:136} INFO - Sending 'POST' to url: https://XXXXX.webhook.office.com/webhookb2/76735d08-3051-4315-9636-09590681eb21@68283f3b-8487-4c86-adb3-a5228f18b893/IncomingWebhook/7475361be6614c4e81e9ea09e4393f4e/bebbf3a3-76c5-4a28-9802-4e734e03b60e [2022-01-05 14:34:40,815] {http_hook.py:185} WARNING - ('Connection aborted.', OSError(0, 'Error')) Tenacity will retry to execute the operation [2022-01-05 14:34:40,816] {taskinstance.py:1152} ERROR - ('Connection aborted.', OSError(0, 'Error')) Traceback (most recent call last): File "/opt/python3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen chunked=chunked, File "/opt/python3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request self.validate_conn(conn) File "/opt/python3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn conn.connect() File "/opt/python3.6/lib/python3.6/site-packages/urllib3/connection.py", line 421, in connect tls_in_tls=tls_in_tls, File "/opt/python3.6/lib/python3.6/site-packages/urllib3/util/ssl.py", line 429, in ssl_wrap_socket sock, context, tls_in_tls, server_hostname=server_hostname File "/opt/python3.6/lib/python3.6/site-packages/urllib3/util/ssl.py", line 472, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/opt/python3.6/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session) File "/opt/python3.6/lib/python3.6/ssl.py", line 817, in init self.do_handshake() File "/opt/python3.6/lib/python3.6/ssl.py", line 1077, in do_handshake self._sslobj.do_handshake() File "/opt/python3.6/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error

Traceback (most recent call last): File "/usr/local/lib/airflow/airflow/models/taskinstance.py", line 985, in _run_raw_task result = task_copy.execute(context=context) File "/usr/local/lib/airflow/airflow/operators/python_operator.py", line 113, in execute return_value = self.execute_callable() File "/usr/local/lib/airflow/airflow/operators/python_operator.py", line 118, in execute_callable return self.python_callable(*self.op_args, **self.op_kwargs) File "/home/airflow/gcs/dags/test_ms_teams.zip/test_ms_teams.py", line 43, in ms_team_notification op1.execute(dict()) File "/home/airflow/gcs/dags/test_ms_teams.zip/msteams/ms_teams_webhook_operator.py", line 89, in execute self.hook.execute() File "/home/airflow/gcs/dags/test_ms_teams.zip/msteams/ms_teams_webhook_hook.py", line 132, in execute extra_options={'proxies': proxies}) File "/usr/local/lib/airflow/airflow/hooks/http_hook.py", line 137, in run return self.run_and_check(session, prepped_request, extra_options) File "/usr/local/lib/airflow/airflow/hooks/http_hook.py", line 186, in run_and_check raise ex File "/usr/local/lib/airflow/airflow/hooks/http_hook.py", line 178, in run_and_check allow_redirects=extra_options.get("allow_redirects", True)) File "/opt/python3.6/lib/python3.6/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/opt/python3.6/lib/python3.6/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', OSError(0, 'Error'))

chavanatul1 avatar Jan 05 '22 14:01 chavanatul1

I can't be sure but this looks like a network or SSL/socket exception. The 'connection aborted' looks like some kind of networking issue or something blocking that request. Does it work if you try a simple HTTP request to https://XXXXXXX.webhook.office.com?

mendhak avatar Jan 05 '22 17:01 mendhak