0
0
AirflowDebug / FixBeginner · 4 min read

How to Fix Worker Not Picking Task in Airflow

If an Airflow worker is not picking up tasks, check that the worker is properly connected to the message broker and the scheduler is running. Also, verify the executor type and ensure the worker has access to the DAG files and correct permissions.
🔍

Why This Happens

This issue happens when the Airflow worker cannot receive or recognize tasks to execute. Common root causes include misconfigured executors, disconnected message brokers, or workers not syncing DAG files.

ini
[core]
executor = SequentialExecutor

[celery]
broker_url = redis://localhost:6379/0

# Worker command
airflow celery worker
Output
INFO - No tasks received, worker idle...
🔧

The Fix

Change the executor to CeleryExecutor for distributed task execution, ensure the message broker URL is correct, and start the scheduler and worker properly. Also, confirm DAG files are accessible to the worker.

ini
[core]
executor = CeleryExecutor

[celery]
broker_url = redis://localhost:6379/0

# Start scheduler
airflow scheduler

# Start worker
airflow celery worker
Output
INFO - Worker started and picking up tasks successfully
🛡️

Prevention

Always verify your airflow.cfg executor setting matches your deployment style. Use monitoring tools to check worker connectivity and task queue status. Keep DAG files synchronized across all workers and use proper permissions.

⚠️

Related Errors

  • Scheduler not running: Tasks stay in queued state because no scheduler is dispatching them.
  • Broker connection errors: Workers cannot receive tasks if the message broker is down or misconfigured.
  • DAG import errors: Workers skip tasks if DAG files have syntax errors or are missing.

Key Takeaways

Ensure the executor in airflow.cfg matches your deployment (e.g., CeleryExecutor for distributed workers).
Verify the message broker URL and connectivity for task communication.
Start both the scheduler and worker processes to enable task dispatch and execution.
Keep DAG files synchronized and accessible to all workers with correct permissions.
Monitor worker logs and broker status to catch connectivity or configuration issues early.