Search code examples
airflowairflow-2.xairflow-webserverairflow-taskflow

Airflow Dag isn't completing its execution. [heartbeat] error


I am trying to take baby steps with Airflow. I was able to test the task successfully via VS Terminal. However, when I trigger the Dag trough UI it just stay in 'running' stage forever.

When I forcefully mark as failed and review logs. I see it as below. This happens soon the http endpoint was called-

[2023-07-19, 22:25:17 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:25:17 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:25:37 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:25:37 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:25:57 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:25:57 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:26:17 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:26:17 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:26:37 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:26:37 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:26:57 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:26:57 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:27:17 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:27:17 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:27:37 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:27:37 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:27:57 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:27:57 UTC] {job.py:210} DEBUG - [heartbeat]
    [2023-07-19, 22:28:18 UTC] {taskinstance.py:789} DEBUG - Refreshing TaskInstance <TaskInstance: dag1.task1 manual__2023-07-19T22:24:54.060770+00:00 [running]> from DB
    [2023-07-19, 22:28:18 UTC] {job.py:210} DEBUG - [heartbeat]

Could you please help resolved this :) Thank you!!!!

I tried to follow various knowledge articles on solving this but anything did not help.

Updated to MYSQL db and using LocalExecutor


Solution

  • I found solution to my own problem. Insted of passing header value in the code. I have provided the header values as JSON in http connection(Admin>>connections) 'Extra' field. That solved it.