Airflow: New DAG is not found by webserver

Ollie Glass picture Ollie Glass · Apr 28, 2017 · Viewed 9.8k times · Source

In Airflow, how should I handle the error "This DAG isn't available in the webserver DagBag object. It shows up in this list because the scheduler marked it as active in the metadata database"?

I've copied a new DAG to an Airflow server, and have tried:

The scheduler log shows it being processed and no errors occurring, I can interact with it and view it's state through the CLI, but it still does not appear in the web UI.

Edit: the webserver and scheduler are running on the same machine with the same airflow.cfg. They're not running in Docker.

They're run by Supervisor, which runs them both as the same user (airflow). The airflow user has read, write and execute permission on all of the dag files.

Answer

viru picture viru · Dec 2, 2017

This helped me...

pkill -9 -f "airflow scheduler"

pkill -9 -f "airflow webserver"

pkill -9 -f "gunicorn"

then restart the airflow scheduler and webserver.