Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-4922

If a task crashes, host name is not committed to the database so logs aren't able to be seen in the UI

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.10.3
    • Fix Version/s: None
    • Component/s: logging
    • Labels:
      None

      Description

      Sometimes when a task fails, the log show the following

      *** Log file does not exist: /usr/local/airflow/logs/my_dag/my_task/2019-07-07T09:00:00+00:00/1.log*** 
      Fetching from: http://:8793/log/my_dag/my_task/2019-07-07T09:00:00+00:00/1.log*** 
      Failed to fetch log file from worker. Invalid URL 'http://:8793/log/my_dag/my_task/2019-07-07T09:00:00+00:00/1.log': No host supplied
      

      I believe this is due to the fact that the row is not committed to the database until after the task finishes. https://github.com/apache/airflow/blob/a1f9d9a03faecbb4ab52def2735e374b2e88b2b9/airflow/models/taskinstance.py#L857

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andrewhharmon Andrew Harmon
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: