I'm running an airflow server and worker on different AWS machines. I've synced that dags folder between them, ran airflow initdb
on both, and checked that the dag_id's are the same when I run airflow list_tasks <dag_id>
When I run the scheduler and worker, I get this error on the worker:
airflow.exceptions.AirflowException: dag_id could not be found: . Either the dag did not exist or it failed to parse. [...] Command ...--local -sd /home/ubuntu/airflow/dags/airflow_tutorial.py'
What seems to be the problem is that the path there is wrong (/home/ubuntu/airflow/dags/airflow_tutorial.py) since the correct path is /home/hadoop/...
On the server machine the path is with ubuntu, but on both config files it's simply ~/airflow/...
What makes the worker look in this path and not the correct one?
How do I tell it to look in it's own home dir?
edit:
- It's unlikely a config problem. I've ran
grep -R ubuntu
and the only occurrences are in the logs - When I run the same on a computer with
ubuntu
as a user everything works. Which leads me to believe that for some reason airflow provides the worker with the full path of the task