-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Description
Apache Airflow version
3.1.7
If "Other Airflow 3 version" selected, which one?
No response
What happened?
Using the official Docker image and docker-compose.yaml, Postgres DB. The database seems to be created correctly (airflow-init runs without any errors). However, the containers seem to have a problem to connect to the DB backend. When I try (inside the apiserver container)
airflow db migrate
I get the following error:
... File "/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 661, in connect return dialect.connect(*cargs, **cparams) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 630, in connect return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/psycopg2/__init__.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcb in position 135: invalid continuation byte
The same error appears when I try to test or trigger any dag from the CLI inside the container. All the dags triggered from the UI fail, as well.
What you think should happen instead?
No response
How to reproduce
- Install Docker version of Apache Airflow 3.1.7 (configure inside docker-compose.yml)
- Run
docker compose up airflow-init - Run
docker compose --profile server up --wait - Run
docker compose exec -u airflow airflow-apiserver sh - Run
airflow db migrateor any other airflow command that makes a DB query
One should see the error mentioned above.
Operating System
Debian GNU/Linux 12
Versions of Apache Airflow Providers
Only the providers included in the official Docker images.
Deployment
Docker-Compose
Deployment details
Docker Compose version v5.1.0
Anything else?
The problem appeared with the upgrade from Apache Airflow 3.0.3.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct