Darren Zhang
Darren Zhang

Reputation: 11

Triggering an Airflow DAG from terminal always keep running state

I am trying to use airflow trigger_dag dag_id to trigger my dag, but it just show me running state and doesn't do anymore.

I have searched for many questions, but all people just say dag id paused. the problem is my dag is unpaused, but also keep the running state.

Note: I can use one dag to trigger another one in Web UI. But it doesn't work in command line. please see the snapshot as below

Running DAG

Upvotes: 1

Views: 508

Answers (1)

Mohammed Sherif KK
Mohammed Sherif KK

Reputation: 666

I had the same issue many times, The state of the task is not running, it is not queued either, it's stuck after we 'clear'. Sometimes I found the task is going to Shutdown state before getting into stuck. And after a large time the instance will be failed, still, the task status will be in white. I have solved it in many ways, I can't say its reason or exact solution, but try one of this:

  • Try trigger dag command again with the same Execution date and time instead of the clear option.
  • Try backfill it will run only unsuccessful instances.
  • or try with a different time within the same interval it will create another instance which is fresh and not have the issue.

Upvotes: 1

Related Questions