You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ace Haidrey (JIRA)" <ji...@apache.org> on 2018/01/19 18:55:00 UTC

[jira] [Commented] (AIRFLOW-1735) Log files do not show up for unscheduled dags

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

Ace Haidrey commented on AIRFLOW-1735:
--------------------------------------

Closing the PR because I believe it's now obsolete. Other changes to parse the datetime have gone in:

https://github.com/apache/incubator-airflow/pull/2704

> Log files do not show up for unscheduled dags
> ---------------------------------------------
>
>                 Key: AIRFLOW-1735
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1735
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Ace Haidrey
>            Assignee: Ace Haidrey
>            Priority: Major
>              Labels: www
>         Attachments: Screen Shot 2017-06-21 at 10.53.28 PM.png
>
>
> I created a new dag with a schedule of {{@once}} and left it unscheduled.  I ran different tasks a few times from the UI but the logs never showed up.  Instead I'd see messages like the following:
> {code}
> *** Log file isn't local.
> *** Fetching here: http://al-tools2.savagebeast.com:18700/log/analytics_kochava_import_dag/kopandoraradioandroid1134523b395684da7_request/2017-06-21
> *** Failed to fetch log file from worker.
> {code}
> There is a log file for this task, but it seems to be at a slightly different path on the machine:
> {code}
> (airflow)hadoop@al-tools2:~/.virtualenvs/airflow$ ls -lth ./airflow_home/logs/analytics_kochava_import_dag/kopandoraradioandroid1134523b395684da7_request/2017-06-21T00\:00\:00
> -rw-rw-rw- 1 hadoop hadoop 5.2K Jun 21 21:57 ./airflow_home/logs/analytics_kochava_import_dag/kopandoraradioandroid1134523b395684da7_request/2017-06-21T00:00:00
> {code}
> And indeed, when I change the URL to WEB_SERVER/admin/airflow/log?task_id=TASK_ID_request&dag_id=DAG_ID&execution_date=2017-06-21T00:00:00, I see the actual log:
> {code}
> *** Reading local log.
> [2017-06-21 21:57:20,931] {models.py:172} INFO - Filling up the DagBag from ~/analytics_kochava_import_dag.py
> [2017-06-21 21:57:21,307] {analytics_kochava_import_dag.py:139} INFO - Kochava app IDs 
> ...
> [2017-06-21 21:57:26,400] {jobs.py:2083} INFO - Task exited with return code 0
> {code}
> I've added a screen shot of it below.
> *FIX:*
> I have noticed in www/view.py the issue is not have the time component 00:00:00 and we can get that quite easily if it doesnt have it. You can see in this PR I made, but basically if we set
> {code}
> dttm = dateutil.parser.parse(request.args.get('execution_date'))
> execution_date = dttm.isoformat()
> {code}
> This will fix it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)