Airflow stuck in scheduler (airflow is starting up!) postgres 5432 error

Running astronomer cosmos in Ubuntu 20.04.

Astronomer creates 4 default containers and shows airflow is starting up but gets stuck with project starting up.

+] Running 8/8
 ⠿ Network astroflow-tutorial_df9f66_airflow         Created                                        0.1s
 ⠿ Network astroflow-tutorial_df9f66_default         Created                                        0.1s
 ⠿ Volume "astroflow-tutorial_df9f66_postgres_data"  Created                                        0.0s
 ⠿ Volume "astroflow-tutorial_df9f66_airflow_logs"   Created                                        0.0s
 ⠿ Container astroflow-tutorial_df9f66-postgres-1    Started                                        0.8s
 ⠿ Container astroflow-tutorial_df9f66-scheduler-1   Started                                        2.1s
 ⠿ Container astroflow-tutorial_df9f66-triggerer-1   Started                                        2.1s
 ⠿ Container astroflow-tutorial_df9f66-webserver-1   Started                                        3.0s

Airflow is starting up!

Error: there might be a problem with your project starting up. The webserver health check timed out after 1m0s but your project will continue trying to start. Run 'astro dev logs --webserver | --scheduler' for details.

Upon checking the logs, the error logs show

 Waiting for host: postgres 5432

Tried increasing the wait times 4x but doesn’t work.
Mentioning requirements and Dockerfile contents.

This is the requirements.txt

astronomer-cosmos[dbt-bigquery]==1.0.3 #install google + cosmos + dbt

This is the Dockerfile.


# install soda into a virtual environment
RUN python -m venv soda_venv && source soda_venv/bin/activate && \
    pip install --no-cache-dir soda-core-bigquery==3.0.45 &&\
    pip install --no-cache-dir soda-core-scientific==3.0.45 && deactivate

RUN python -m venv dbt_venv && source dbt_venv/bin/activate && \
    pip install --no-cache-dir dbt-bigquery==1.5.3 && deactivate

Methods tried that didn’t work -
Uninstalling and installing docker again to clean containers
Changing postgres port in config.yml
changing astro-runtime in dockerfile

Hey @sam

Could you please confirm if none of the containers start and are in running state ? Please share the final status of all the containers and if possible, the log of postgres container.