Limess opened a new issue #17828:
URL: https://github.com/apache/airflow/issues/17828


   <!--
   Welcome to Apache Airflow!
   
   Please complete the next sections or the issue will be closed.
   -->
   
   **Apache Airflow version**:
   
   <!-- AIRFLOW VERSION IS MANDATORY -->
   2.1.3
   
   **Deployment**:
   
   <!-- e.g. Virtualenv / VM / Docker-compose / K8S / Helm Chart / Managed 
Airflow Service -->
   
   <!-- Please include your deployment tools and versions: docker-compose, k8s, 
helm, etc -->
   
   ECS, docker-compose
   
   **What happened**:
   
   A redis connection URL of the form: 
   
   ```
   redis://<host>:6379/1
   ```
   
   is parsed incorrectly by this pattern: 
https://github.com/apache/airflow/blob/2.1.3/scripts/in_container/prod/entrypoint_prod.sh#L96
 - the host is determined to be `localhost` as there is no `@` character.
   
   Adding an `@` character, e.g. 
`redis://@redis-analytics-airflow.signal:6379/1` results in correct parsing, 
but cannot connect to redis as auth fails.
   
   Logs:
   
   ```
   BACKEND=redis
   DB_HOST=localhost
   DB_PORT=6379
   ```
   
   and eventually
   
   ```
   ERROR! Maximum number of retries (20) reached.
   Last check result:
   $ run_nc 'localhost' '6379'
   (UNKNOWN) [127.0.0.1] 6379 (?) : Connection refused
   sent 0, rcvd 0
   ```
   
   **How to reproduce it**:
   
   Run airflow with an official docker image and `  
AIRFLOW__CELERY__BROKER_URL: redis://<ANY_REDIS_HOSTNAME>:6379/1` and observe 
that it parses the host as `localhost`.
   
   **Anything else we need to know**:
   
   This was working without issue in Airflow 2.1.2 - weirdly I cannot see 
changes to the entrypoint, but we have not changed the URL 
`AIRFLOW__CELERY__BROKER_URL: redis://redis-analytics-airflow.signal:6379/1`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to