-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow version
3.0.1
If "Other Airflow 2 version" selected, which one?
No response
What happened?
I ran into an issue with the Docker image slim-3.0.1-python3.12. After changing the logging_level to DEBUG, I consistently received "invalid credentials" errors when trying to log into the webserver via localhost:8080/.
Upon reviewing the logs from the airflow-init container, I saw the message: "Skipping user creation as auth manager different from Fab is used." This was despite explicitly setting AIRFLOW__CORE__AUTH_MANAGER to airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager.
Additionally, the logs showed a BrokenPipeError:
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
After some investigation, I discovered the problem stemmed from the entrypoint, specifically within the condition if airflow config get-value core auth_manager | grep -q "FabAuthManager"; then.
The Broken Pipe:
- airflow, running through log.debug, starts writing output.
- If
grep -qfinds 'FabAuthManager' early on in the output stream (or processes enough to know it won't find it, though less common for a broken pipe), it exits. - When grep exits, the receiving end of the pipe is closed.
- If airflow tries to write more data (e.g., more log.debug messages) to that now-closed pipe, the operating system sends a SIGPIPE signal leading to
BrokenPipeError. - The condition never gets true.
- The user is not created.
After removing -q from grep the problem was gone.
What you think should happen instead?
User must be created regardless logging_level value. grep command should not exit immediately.
How to reproduce
- Download the docker-compose.yaml provided by airflow
- Adjust the env variables to setup the containers
- set AIRFLOW__LOGGING__LOGGING_LEVEL=DEBUG, _AIRFLOW_WWW_USER_CREATE=True, _AIRFLOW_WWW_USER_USERNAME=airflow and _AIRFLOW_WWW_USER_PASSWORD=airflow
- run the containers
- Try to log in the webserver
Operating System
Ubuntu 24.04.2 LTS
Versions of Apache Airflow Providers
apache-airflow-providers-common-compat==1.6.1
apache-airflow-providers-common-io==1.5.4
apache-airflow-providers-common-sql==1.27.0
apache-airflow-providers-smtp==2.0.3
apache-airflow-providers-standard==1.1.0
Deployment
Docker-Compose
Deployment details
docker compose version
Docker Compose version v2.34.0
docker version
Client: Docker Engine - Community
Version: 28.0.4
API version: 1.48
Go version: go1.23.7
Git commit: b8034c0
Built: Tue Mar 25 15:07:16 2025
OS/Arch: linux/amd64
Context: defaultServer: Docker Engine - Community
Engine:
Version: 28.0.4
API version: 1.48 (minimum version 1.24)
Go version: go1.23.7
Git commit: 6430e49
Built: Tue Mar 25 15:07:16 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.27
GitCommit: 05044ec0a9a75232cad458027ca83437aae3f4da
runc:
Version: 1.2.5
GitCommit: v1.2.5-0-g59923ef
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Anything else?
No response
Are you willing to submit PR?
- [ ]
Code of Conduct
- I agree to follow this project's Code of Conduct