Docker-airflow: https redirect issue behind ALB

Created on 4 Jul 2017  路  7Comments  路  Source: puckel/docker-airflow

Having an issue running this on AWS (ECS) behind an ALB. Issue sounds just like this one: https://github.com/ApacheInfra/superset/issues/978

Has anyone hit an issue when running this behind ALB running https? Is there some config we can add into the config file to allow https redirects?

Most helpful comment

I am having a similar problem:
Have you found the solution yet?

I have tried:
set ENABLE_PROXY_FIX = True in superset_config,

I was encountering the same issue using tag 1.2.0 from this repository.

I think that using ENABLE_PROXY_FIX is the solution but you does not seem to declare it well.

I fixed it using the proxy fix variable in my docker-compose file as follow:

- AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX=true

Works fine and I'm happy now :+1:

All 7 comments

I'm trying to setup ELB -> nginx -> airflow web (SSL is terminated by ELB) and hit the issue.
I think this issue is related
https://github.com/apache/incubator-airflow/pull/1869
But it looks blocked by gunicorn update and got stuck for a while...

I am having a similar problem:
Have you found the solution yet?

I have tried:
set ENABLE_PROXY_FIX = True in superset_config,
and set FORWARDED_ALLOW_IPS=* as Environment variable, but not luck.

FYI, my Gunicon version is 19.7.1, superset is 0.18.5.

Thanks
Jay

For people may come across the same problem, I have found the problem. By mistake, I set protocol of target group to HTTPS. When I change it to HTTP, everything works!

@Jie-Yang Do you mean you can access airflow web via HTTPS?
In my company HTTPS is basically must, so I don't want to use HTTP for web UI external access...

@rdtr
The problem I had is from Apache Superset. But since both of us come to the same forum here, Superset and Airflow seems based on the same tech stack: flask, FAB, etc.

Anyway, my superset sits in AWS ECS, and all HTTPS is configured on AWS ELB.

I am having a similar problem:
Have you found the solution yet?

I have tried:
set ENABLE_PROXY_FIX = True in superset_config,

I was encountering the same issue using tag 1.2.0 from this repository.

I think that using ENABLE_PROXY_FIX is the solution but you does not seem to declare it well.

I fixed it using the proxy fix variable in my docker-compose file as follow:

- AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX=true

Works fine and I'm happy now :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prasanthbangs2016 picture prasanthbangs2016  路  3Comments

manishgupta24 picture manishgupta24  路  3Comments

mikonapoli picture mikonapoli  路  5Comments

hxu-lift picture hxu-lift  路  4Comments

jensenity picture jensenity  路  7Comments