trlopes1974 commented on issue #40119:
URL: https://github.com/apache/airflow/issues/40119#issuecomment-2162676657
@vatsrahul1001 , that is exactly the problem.
on_failure_callback is defined in the DAG default args:
default_args = {
'owner' : 'ttauto',
'on_success_callback':success_callback,
'on_failure_callback':failure_callback,
'depends_on_past': False,
'start_date': datetime(2021, 1, 1),
'email': Variable.get("DAG_FAILURE_EMAIL",deserialize_json=True),
'email_on_failure': True,
'email_on_retry': False,
'retries': 0,
'retry_delay' : timedelta(seconds=20),
'max_retry_delay' : timedelta(seconds=60),
'retry_exponential_backoff': True
}
Kill_Session_Oracle = DAG(dag_id='Kill_Session_Oracle',
default_args=default_args,
catchup=False,
schedule_interval=None,
schedule=None,
start_date=datetime(2024, 2, 5),
doc_md=doc_md_DAG,
description='Efetua o KillSession em BD Oracle',
max_active_tasks=1,
max_active_runs=1,
params={
"WORKORDERID": Param(default="",description="O Número da workorder
(Workorder ID)" , type=["null", "string"]),
"ISDEBUG": Param(default=False,title="Modo Debug",description="Testa
o dag com os valores indicados em DEBUG_DATA" , type="boolean"),
"DEBUG_DATA": Param(default=None,description="WO_DATA" ,
type=["null", "object"])
},
render_template_as_native_obj=True,
tags=['CS00000026','SSH']
)
We have also upgraded airflow to the latest version.:
(env_airflow) [ttauto@slautop03 airflow]$ pip freeze | grep -i airflow
apache-airflow==2.9.2
apache-airflow-providers-celery==3.7.2
apache-airflow-providers-common-io==1.3.2
apache-airflow-providers-common-sql==1.14.0
apache-airflow-providers-fab==1.1.1
apache-airflow-providers-ftp==3.9.1
apache-airflow-providers-hashicorp==3.7.1
apache-airflow-providers-http==4.11.1
apache-airflow-providers-imap==3.6.1
apache-airflow-providers-postgres==5.11.1
apache-airflow-providers-sftp==4.10.1
apache-airflow-providers-smtp==1.7.1
apache-airflow-providers-sqlite==3.8.1
apache-airflow-providers-ssh==3.11.1
and the behavior is the same, no callback is called...
[2024-06-12, 11:30:40 WEST] {transport.py:1909} DEBUG - Sending global
request "[email protected]"
[2024-06-12, 11:30:45 WEST] {taskinstance.py:441} ▼ Post task execution logs
[2024-06-12, 11:30:45 WEST] {taskinstance.py:2905} ERROR - Task failed with
exception
Traceback (most recent call last):
File
"/opt/tkapp/env_airflow/lib64/python3.9/site-packages/airflow/models/taskinstance.py",
line 465, in _execute_task
result = _execute_callable(context=context, **execute_callable_kwargs)
File
"/opt/tkapp/env_airflow/lib64/python3.9/site-packages/airflow/models/taskinstance.py",
line 432, in _execute_callable
return execute_callable(context=context, **execute_callable_kwargs)
File
"/opt/tkapp/env_airflow/lib64/python3.9/site-packages/airflow/models/baseoperator.py",
line 401, in wrapper
return func(self, *args, **kwargs)
File
"/opt/tkapp/env_airflow/lib64/python3.9/site-packages/airflow/providers/ssh/operators/ssh.py",
line 191, in execute
result = self.run_ssh_client_command(ssh_client, self.command,
context=context)
File
"/opt/tkapp/env_airflow/lib64/python3.9/site-packages/airflow/providers/ssh/operators/ssh.py",
line 176, in run_ssh_client_command
exit_status, agg_stdout, agg_stderr = self.hook.exec_ssh_client_command(
File
"/opt/tkapp/env_airflow/lib64/python3.9/site-packages/airflow/providers/ssh/hooks/ssh.py",
line 554, in exec_ssh_client_command
raise AirflowException("SSH command timed out")
airflow.exceptions.AirflowException: SSH command timed out
[2024-06-12, 11:30:45 WEST] {taskinstance.py:562} DEBUG - Task Duration set
to 91.352166
[2024-06-12, 11:30:45 WEST] {taskinstance.py:584} DEBUG - Clearing
next_method and next_kwargs.
[2024-06-12, 11:30:45 WEST] {taskinstance.py:1206} INFO - Marking task as
FAILED. dag_id=Kill_Session_Oracle, task_id=ssh_command_operator,
run_id=manual__2024-06-12T11:28:43+01:00, execution_date=20240612T102843,
start_date=20240612T102913, end_date=20240612T103045
[2024-06-12, 11:30:45 WEST] {cli_action_loggers.py:88} DEBUG - Calling
callbacks: []
[2024-06-12, 11:30:45 WEST] {standard_task_runner.py:110} ERROR - Failed to
execute job 91871 for task ssh_command_operator (SSH command timed out; 151149)
[2024-06-12, 11:30:45 WEST] {local_task_job_runner.py:240} INFO - Task
exited with return code 1
[2024-06-12, 11:30:45 WEST] {local_task_job_runner.py:222} ▲▲▲ Log group end
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]