Search code examples
airflow

Airflow - Could not read served logs - 503 Service Unavailable


After some changes logs are not visible in Web-UI, but log-file in log-catalog in worker container is OK

Airflow 2.7.3, installed in Docker (Portainer) with containers (and with proxy), CeleryExecutor

Error

f2ad1c31c101 *** Could not read served logs: Server error '503 Service Unavailable' for url 'http://f2ad1c31c101:8793/log/dag_id=run_one_model_DAG/run_id=manual__2024-05-15T17:18:04.870528+00:00/task_id=one_model.model1_run/attempt=1.log'

worker_log_server_port = 8793 (in config, default)

Port 8793 was not in old version of docker-compose, but worked.

Where to find why 503? Seems, all other modules in Airflow are working

Restart of Stack in Portainer not helped


Solution

  • "volumes" indicated in docker-compose in two blocks - first in "airflow-common" for include, second in "webserver" as is

    x-airflow-common:
      &airflow-common
      volumes:
      - ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs
    ...
    airflow-webserver:
        <<: *airflow-common
        ...
        volumes:
        ...
    

    And second dosn't contain volume with logs... So after adding volume with logs in webserver section - all OK, logs are visible in UI

    Something strange, why error is like logs are remote and code 503...