0
0
Apache Airflowdevops~5 mins

Log inspection and troubleshooting in Apache Airflow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the primary purpose of log inspection in Airflow?
Log inspection helps you understand what happened during a task run, identify errors, and find clues to fix issues.
Click to reveal answer
beginner
Where can you find task logs in the Airflow web UI?
In the Airflow web UI, click on a DAG run, then select a task instance, and click the 'Log' tab to see the logs for that task.
Click to reveal answer
intermediate
What does a 'Task instance failed' message in logs usually indicate?
It means the task did not complete successfully, often due to an error in the code, missing resources, or external system failures.
Click to reveal answer
intermediate
How can you access Airflow logs from the command line?
You can access logs by navigating to the logs folder on the Airflow server, usually under AIRFLOW_HOME/logs, or use the CLI command: airflow tasks logs <dag_id> <task_id> <execution_date>.
Click to reveal answer
advanced
Why is it important to check both scheduler and worker logs when troubleshooting Airflow?
Scheduler logs show DAG scheduling and triggering info, while worker logs show task execution details. Checking both helps find where the problem lies.
Click to reveal answer
Where do you find task logs in the Airflow web UI?
AUnder the task instance's 'Log' tab
BIn the DAG details page only
CIn the Airflow configuration file
DIn the database directly
What does a 'Task instance failed' log message usually mean?
AThe task completed successfully
BThe task encountered an error during execution
CThe task did not run at all
DThe task was skipped intentionally
Which Airflow component's logs help you understand DAG scheduling issues?
AWorker logs
BDatabase logs
CWebserver logs
DScheduler logs
How can you view Airflow task logs from the command line?
AUsing 'airflow tasks logs <dag_id> <task_id> <execution_date>'
BUsing 'airflow webserver start'
CUsing 'airflow scheduler status'
DUsing 'airflow db check'
Why check both scheduler and worker logs when troubleshooting?
AScheduler logs show task execution details
BWorker logs show DAG scheduling info
CBoth logs together help locate the problem source
DOnly worker logs are useful
Explain how to find and interpret task logs in Airflow for troubleshooting.
Think about both UI and command line ways to see logs.
You got /4 concepts.
    Describe why checking both scheduler and worker logs is important when troubleshooting Airflow issues.
    Consider the roles of scheduler and worker in Airflow.
    You got /4 concepts.