[ 
https://issues.apache.org/jira/browse/AIRFLOW-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16139692#comment-16139692
 ] 

David Howell commented on AIRFLOW-1305:
---------------------------------------

I have had this exact same problem. Scheduler was running, new dag .py file 
placed into the dags folder, and the UI shows "This DAG seems to be existing 
only locally. The master scheduler doesn't seem to be aware of its existence."

That tooltip comes from here:
 if dag_id not in orm_dags
https://github.com/apache/incubator-airflow/blob/master/airflow/www/templates/airflow/dags.html#L83

I checked the Meta DB and the there is no entry in the dag table for this dag. 
I tried deleting the dag.py and dag.pyc file, and after a while of refreshing, 
the dag disappeared from the UI. 
I added the dag.py file back and the same situation occurred.

After reading the previous comment here, I tried killing the Scheduler PID ( I 
ran ps -eaf | grep airflow ) and just killed all the ones related to Scheduler 
- it felt a bit brutal. Then I restarted the scheduler. Straight away the 
scheduler picked up the dag correctly, and there is an entry in the database. 
I'm not sure about why, but I think the Scheduler was in some weird state.

I have been playing with airflow, starting with the Sequential Exectutor / 
sqlite mode, but I've switched it to an external MySQL MetaDB and using 
LocalExecutor. Perhaps in that process the Scheduler has not picked up the new 
MetaDB connection in order to write to the dag table. I'm going to switch to 
using systemd to control the daemons, which should make scheduler / webserver 
restarts less brutal, maybe some kind of init / upstart / systemd should be 
part of the default installation. 

> This DAG seems to be exists locally.
> ------------------------------------
>
>                 Key: AIRFLOW-1305
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1305
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Ting
>            Priority: Critical
>         Attachments: 702EE4FC-4E15-490C-AB2B-E2BFAFEB36D7.png
>
>
> All DAGs I created after tutorial show like this, and I can not make it on or 
> off in UI.
> Restart webserver, no use to this.
> Also, the dags are not scheduled. 
> Hope for useful help.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to