docker-composeairflowairflow-api

Airflow 3.0.0 Docker Compose UI endlessly refreshing on external IP:port, works on localhost:8080


I am setting up Apache Airflow 3.0.0 using the official Docker Compose file (https://airflow.apache.org/docs/apache-airflow/3.0.0/docker-compose.yaml) on a Linux server (Ubuntu 22.04).

I have successfully brought up all the containers, and they show as healthy (docker compose ps output is OK, and initial errors like permissions or missing secrets seem resolved).

Problem:

When I access the Airflow UI from my local machine using the server's public IP and the mapped port (http://22.193.38.155:8080/), First it asks me to login and the page loads briefly but then continuously refreshes. However, when I access the UI from the server itself using http://localhost:8080, it works perfectly and I can see the DAGs, log in, etc. Observed Behavior (from logs): Checking the logs for the airflow-apiserver container (docker compose logs airflow-apiserver), I see repetitive entries like the following when trying to access from the external IP:

Configuration:

What could be causing the repeated 401 Unauthorized errors for API calls like /ui/config when accessing externally via http://22.193.38.155:8080/ and the resulting refreshing UI? Are there any other Airflow or Docker configurations necessary for external access in Airflow 3.0.0 that I might be missing?


Solution

  • The issue was indeed related to the apache-airflow-providers-fab package, as suggested by @bcincy's comment.

    Solution

    x-airflow-common:
      &airflow-common
      # ... other common settings ...
      environment:
        &airflow-common-env
        # ... existing environment variables (including AIRFLOW__CORE__BASE_URL) ...
    
        # Modified this line to add the FAB provider package:
        _PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-} apache-airflow-providers-fab==2.0.2
    
        # ... rest of environment variables ...
    
    docker compose down
    docker compose up -d