question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BACKEND: Unbound Variable issue in docker entrypoint

See original GitHub issue

This 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 variable

What 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
alete89commented, May 7, 2021

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:

([^:]*)://([^:@]*):?([^@]*)@?([^/:]*):?([0-9]*)/([^\?]*)\??(.*)

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 👍

0reactions
potiukcommented, May 7, 2021

For reference: I was able to fix it encoding @ as %40

Yep. this is correct fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

user unbound variable on docker run - Stack Overflow
While running docker image, I am receiving the following error: /entrypoint.sh: line 7: USER: unbound variable. Code of entrypoint.sh.
Read more >
BACKEND: Unbound Variable issue in docker entrypoint
... issue #14104: BACKEND: Unbound Variable issue in docker entrypoint · GitBox Fri, 07 May 2021 07:50:31 -0700. alete89 commented on issue ...
Read more >
DB_ADDR unbound variable error - Keycloak Discourse
Hello, I am trying to connec keycloak to a PostgreSqL database. ... /opt/jboss/tools/docker-entrypoint.sh: line 156: DB_ADDR: unbound ...
Read more >
unbound variable error trying to run inputoutput/cardano-node ...
Hello all, I have been trying to set up a docker container running the latest release of Cardano Node in order to be...
Read more >
Keycloak Docker server DB_ADDR is not optional - Red Hat Jira
... or do not specify with docker run, you'd run into the issue: /opt/jboss/tools/docker-entrypoint.sh: line 165: DB_ADDR: unbound variable
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found