BACKEND: Unbound Variable issue in docker entrypoint
See original GitHub issueThis is NOT a bug in Airflow, I’m writing this issue for documentation should someone come across this same issue and need to identify how to solve it. Please tag as appropriate.
Apache Airflow version: Docker 2.0.1rc2
Kubernetes version (if you are using kubernetes) (use kubectl version
): N/A
Environment: Dockered
- Cloud provider or hardware configuration: VMWare VM
- OS (e.g. from /etc/os-release): Ubuntu 18.04.5 LTS
- Kernel (e.g.
uname -a
): 4.15.0-128-generic - Install tools: Just docker/docker-compose
- Others:
What happened: Worker, webserver and scheduler docker containers do not start, errors:
/entrypoint: line 71: BACKEND: unbound variable
af_worker | /entrypoint: line 71: BACKEND: unbound variable af_worker | /entrypoint: line 71: BACKEND: unbound variable af_worker exited with code 1 af_webserver | /entrypoint: line 71: BACKEND: unbound variable af_webserver | /entrypoint: line 71: BACKEND: unbound variable af_webserver | /entrypoint: line 71: BACKEND: unbound variable af_webserver | /entrypoint: line 71: BACKEND: unbound variableWhat you expected to happen:
Docker containers to start
How to reproduce it: What ever docker-compose file I was copying, has a MySQL Connection String not compatible with: https://github.com/apache/airflow/blob/bc026cf6961626dd01edfaf064562bfb1f2baf42/scripts/in_container/prod/entrypoint_prod.sh#L58 – Specifically, the connection string in the docker-compose did not have a password, and no : separator for a blank password.
Original Connection String: mysql://root@mysql/airflow?charset=utf8mb4
Anything else we need to know:
The solution is to use a password, or at the very least add the : to the user:password section
Fixed Connection String: mysql://root:@mysql/airflow?charset=utf8mb4
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I encountered a similar error on Airflow 2.0.2. We are using a postgres from azure, and azure gives you a username with ‘@’ in it, and it breaks the regex:
the value for my connection string is similar to:
postgresql+psycopg2://user@team:password@airflow-host-db/airflow
EDIT: For reference: I was able to fix it encoding
@
as%40
👍Yep. this is correct fix.