title: Airflow docker compose stuck
body: <p>I am trying to run Airflow on my local machine. I am using docker compose file from official Apache Airflow webstiste <a href="https://airflow.apache.org/docs/apache-airflow/2.0.1/docker-compose.yaml" rel="nofollow noreferrer">https://airflow.apache.org/docs/apache-airflow/2.0.1/docker-compose.yaml</a></p>
  <pre><code># Licensed to the Apache Software Foundation (ASF) under one
  # or more contributor license agreements.  See the NOTICE file
  # distributed with this work for additional information
  # regarding copyright ownership.  The ASF licenses this file
  # to you under the Apache License, Version 2.0 (the
  # &quot;License&quot;); you may not use this file except in compliance
  # with the License.  You may obtain a copy of the License at
  #
  #   http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing,
  # software distributed under the License is distributed on an
  # &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  # KIND, either express or implied.  See the License for the
  # specific language governing permissions and limitations
  # under the License.
  #
  
  # Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL.
  #
  # WARNING: This configuration is for local development. Do not use it in a production deployment.
  #
  # This configuration supports basic configuration using environment variables or an .env file
  # The following variables are supported:
  #
  # AIRFLOW_IMAGE_NAME           - Docker image name used to run Airflow.
  #                                Default: apache/airflow:2.3.2
  # AIRFLOW_UID                  - User ID in Airflow containers
  #                                Default: 50000
  # Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode
  #
  # _AIRFLOW_WWW_USER_USERNAME   - Username for the administrator account (if requested).
  #                                Default: airflow
  # _AIRFLOW_WWW_USER_PASSWORD   - Password for the administrator account (if requested).
  #                                Default: airflow
  # _PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting all containers.
  #                                Default: ''
  #
  # Feel free to modify this file to suit your needs.
  ---
  version: '3'
  x-airflow-common:
    &amp;airflow-common
    # In order to add custom dependencies or upgrade provider packages you can use your extended image.
    # Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml
    # and uncomment the &quot;build&quot; line below, Then run `docker-compose build` to build the images.
    image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.3.2}
    # build: .
    environment:
      &amp;airflow-common-env
      AIRFLOW__CORE__EXECUTOR: CeleryExecutor
      AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
      # For backward compatibility, with Airflow &lt;2.3
      AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
      AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow
      AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
      AIRFLOW__CORE__FERNET_KEY: ''
      AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
      AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
      AIRFLOW__API__AUTH_BACKENDS: 'airflow.api.auth.backend.basic_auth'
      _PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-}
    volumes:
      - ./dags:/opt/airflow/dags
      - ./logs:/opt/airflow/logs
      - ./plugins:/opt/airflow/plugins
    user: &quot;${AIRFLOW_UID:-50000}:0&quot;
    depends_on:
      &amp;airflow-common-depends-on
      redis:
        condition: service_healthy
      postgres:
        condition: service_healthy
  
  services:
    postgres:
      image: postgres:13
      environment:
        POSTGRES_USER: airflow
        POSTGRES_PASSWORD: airflow
        POSTGRES_DB: airflow
      volumes:
        - postgres-db-volume:/var/lib/postgresql/data
      healthcheck:
        test: [&quot;CMD&quot;, &quot;pg_isready&quot;, &quot;-U&quot;, &quot;airflow&quot;]
        interval: 5s
        retries: 5
      restart: always
  
    redis:
      image: redis:latest
      expose:
        - 6379
      healthcheck:
        test: [&quot;CMD&quot;, &quot;redis-cli&quot;, &quot;ping&quot;]
        interval: 5s
        timeout: 30s
        retries: 50
      restart: always
  
    airflow-webserver:
      &lt;&lt;: *airflow-common
      command: webserver
      ports:
        - 8080:8080
      healthcheck:
        test: [&quot;CMD&quot;, &quot;curl&quot;, &quot;--fail&quot;, &quot;http://localhost:8080/health&quot;]
        interval: 10s
        timeout: 10s
        retries: 5
      restart: always
      depends_on:
        &lt;&lt;: *airflow-common-depends-on
        airflow-init:
          condition: service_completed_successfully
  
    airflow-scheduler:
      &lt;&lt;: *airflow-common
      command: scheduler
      healthcheck:
        test: [&quot;CMD-SHELL&quot;, 'airflow jobs check --job-type SchedulerJob --hostname &quot;$${HOSTNAME}&quot;']
        interval: 10s
        timeout: 10s
        retries: 5
      restart: always
      depends_on:
        &lt;&lt;: *airflow-common-depends-on
        airflow-init:
          condition: service_completed_successfully
  
    airflow-worker:
      &lt;&lt;: *airflow-common
      command: celery worker
      healthcheck:
        test:
          - &quot;CMD-SHELL&quot;
          - 'celery --app airflow.executors.celery_executor.app inspect ping -d &quot;celery@$${HOSTNAME}&quot;'
        interval: 10s
        timeout: 10s
        retries: 5
      environment:
        &lt;&lt;: *airflow-common-env
        # Required to handle warm shutdown of the celery workers properly
        # See https://airflow.apache.org/docs/docker-stack/entrypoint.html#signal-propagation
        DUMB_INIT_SETSID: &quot;0&quot;
      restart: always
      depends_on:
        &lt;&lt;: *airflow-common-depends-on
        airflow-init:
          condition: service_completed_successfully
  
    airflow-triggerer:
      &lt;&lt;: *airflow-common
      command: triggerer
      healthcheck:
        test: [&quot;CMD-SHELL&quot;, 'airflow jobs check --job-type TriggererJob --hostname &quot;$${HOSTNAME}&quot;']
        interval: 10s
        timeout: 10s
        retries: 5
      restart: always
      depends_on:
        &lt;&lt;: *airflow-common-depends-on
        airflow-init:
          condition: service_completed_successfully
  
    airflow-init:
      &lt;&lt;: *airflow-common
      entrypoint: /bin/bash
      # yamllint disable rule:line-length
      command:
        - -c
        - |
          function ver() {
            printf &quot;%04d%04d%04d%04d&quot; $${1//./ }
          }
          airflow_version=$$(gosu airflow airflow version)
          airflow_version_comparable=$$(ver $${airflow_version})
          min_airflow_version=2.2.0
          min_airflow_version_comparable=$$(ver $${min_airflow_version})
          if (( airflow_version_comparable &lt; min_airflow_version_comparable )); then
            echo
            echo -e &quot;\033[1;31mERROR!!!: Too old Airflow version $${airflow_version}!\e[0m&quot;
            echo &quot;The minimum Airflow version supported: $${min_airflow_version}. Only use this or higher!&quot;
            echo
            exit 1
          fi
          if [[ -z &quot;${AIRFLOW_UID}&quot; ]]; then
            echo
            echo -e &quot;\033[1;33mWARNING!!!: AIRFLOW_UID not set!\e[0m&quot;
            echo &quot;If you are on Linux, you SHOULD follow the instructions below to set &quot;
            echo &quot;AIRFLOW_UID environment variable, otherwise files will be owned by root.&quot;
            echo &quot;For other operating systems you can get rid of the warning with manually created .env file:&quot;
            echo &quot;    See: https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#setting-the-right-airflow-user&quot;
            echo
          fi
          one_meg=1048576
          mem_available=$$(($$(getconf _PHYS_PAGES) * $$(getconf PAGE_SIZE) / one_meg))
          cpus_available=$$(grep -cE 'cpu[0-9]+' /proc/stat)
          disk_available=$$(df / | tail -1 | awk '{print $$4}')
          warning_resources=&quot;false&quot;
          if (( mem_available &lt; 4000 )) ; then
            echo
            echo -e &quot;\033[1;33mWARNING!!!: Not enough memory available for Docker.\e[0m&quot;
            echo &quot;At least 4GB of memory required. You have $$(numfmt --to iec $$((mem_available * one_meg)))&quot;
            echo
            warning_resources=&quot;true&quot;
          fi
          if (( cpus_available &lt; 2 )); then
            echo
            echo -e &quot;\033[1;33mWARNING!!!: Not enough CPUS available for Docker.\e[0m&quot;
            echo &quot;At least 2 CPUs recommended. You have $${cpus_available}&quot;
            echo
            warning_resources=&quot;true&quot;
          fi
          if (( disk_available &lt; one_meg * 10 )); then
            echo
            echo -e &quot;\033[1;33mWARNING!!!: Not enough Disk space available for Docker.\e[0m&quot;
            echo &quot;At least 10 GBs recommended. You have $$(numfmt --to iec $$((disk_available * 1024 )))&quot;
            echo
            warning_resources=&quot;true&quot;
          fi
          if [[ $${warning_resources} == &quot;true&quot; ]]; then
            echo
            echo -e &quot;\033[1;33mWARNING!!!: You have not enough resources to run Airflow (see above)!\e[0m&quot;
            echo &quot;Please follow the instructions to increase amount of resources available:&quot;
            echo &quot;   https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#before-you-begin&quot;
            echo
          fi
          mkdir -p /sources/logs /sources/dags /sources/plugins
          chown -R &quot;${AIRFLOW_UID}:0&quot; /sources/{logs,dags,plugins}
          exec /entrypoint airflow version
      # yamllint enable rule:line-length
      environment:
        &lt;&lt;: *airflow-common-env
        _AIRFLOW_DB_UPGRADE: 'true'
        _AIRFLOW_WWW_USER_CREATE: 'true'
        _AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
        _AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}
        _PIP_ADDITIONAL_REQUIREMENTS: ''
      user: &quot;0:0&quot;
      volumes:
        - .:/sources
  
    airflow-cli:
      &lt;&lt;: *airflow-common
      profiles:
        - debug
      environment:
        &lt;&lt;: *airflow-common-env
        CONNECTION_CHECK_MAX_COUNT: &quot;0&quot;
      # Workaround for entrypoint issue. See: https://github.com/apache/airflow/issues/16252
      command:
        - bash
        - -c
        - airflow
  
    # You can enable flower by adding &quot;--profile flower&quot; option e.g. docker-compose --profile flower up
    # or by explicitly targeted on the command line e.g. docker-compose up flower.
    # See: https://docs.docker.com/compose/profiles/
    flower:
      &lt;&lt;: *airflow-common
      command: celery flower
      profiles:
        - flower
      ports:
        - 5555:5555
      healthcheck:
        test: [&quot;CMD&quot;, &quot;curl&quot;, &quot;--fail&quot;, &quot;http://localhost:5555/&quot;]
        interval: 10s
        timeout: 10s
        retries: 5
      restart: always
      depends_on:
        &lt;&lt;: *airflow-common-depends-on
        airflow-init:
          condition: service_completed_successfully
  
  volumes:
    postgres-db-volume:
  </code></pre>
  <p>Unfortunately when trying to run docker-compose file execution stuck on the following line and run it again and again:</p>
  <pre><code>airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:21:52 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:22:02 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:22:12 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:22:23 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:22:33 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:22:43 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:22:53 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:23:03 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:23:13 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:23:24 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:23:34 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:23:44 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:23:54 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-scheduler_1  | [2022-07-04 22:24:04,122] {scheduler_job.py:1221} INFO - Resetting orphaned tasks for active dag runs
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:24:04 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:24:14 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:24:24 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:24:35 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  airflow-webserver_1  | 127.0.0.1 - - [04/Jul/2022:22:24:45 +0000] &quot;GET /health HTTP/1.1&quot; 200 187 &quot;-&quot; &quot;curl/7.74.0&quot;
  
  </code></pre>
  <p>Do you know what this line means? What could be the potential issue?</p>
  <p>I am running this on Ubuntu 22.04 LTS.</p>