I installed Airflow 1.10.12 using Anaconda in one of my environments.
But when I tried to follow the Quick Start Guide (at https://airflow.apache.org/docs/stable/start.html) I got the following error after accessing http://localhost:8080/admin/
Traceback (most recent call last):
File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 1953, in full_dispatch_request
return self.finalize_request(rv)
File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 1970, in finalize_request
response = self.process_response(response)
File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 2269, in process_response
self.session_interface.save_session(self, ctx.session, response)
File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/sessions.py", line 379, in save_session
response.set_cookie(
File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/werkzeug/wrappers/base_response.py", line 468, in set_cookie
dump_cookie(
File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/werkzeug/http.py", line 1217, in dump_cookie
raise ValueError("SameSite must be 'Strict', 'Lax', or 'None'.")
ValueError: SameSite must be 'Strict', 'Lax', or 'None'.
I tried to set the cookie_samesite
variable at the default_airflow.cfg
file to either None, Lax or Strict but the error persists.
Some details of my airflow environment:
I installed Apache airflow in my workspace using the conda install -c anaconda airflow
After that I create an environment on Anaconda and installed the airflow package within this environment. Then I opened the terminal and run airflow initdb
and airflow webserver -p 8080
. Then I went to webpage and saw the error.
Thanks in advance for any help.
Use the same configuration across all the Airflow components. While each component does not require all, some configurations need to be same otherwise they would not work as expected. A good example for that is secret_key which should be same on the Webserver and Worker to allow Webserver to fetch logs from Worker.
This topic describes how to configure Airflow to secure your webserver. Using Airflow in a web frame is enabled by default. To disable this (and prevent click jacking attacks) set the below: Variable values that are deemed “sensitive” based on the variable name will be masked in the UI automatically. See Masking sensitive data for more details.
When nonzero, airflow periodically refreshes webserver workers by bringing up new ones and killing old ones. Number of seconds to wait before refreshing a batch of workers. New in version 1.10.8. Was this entry helpful?
The base url of your website as airflow cannot guess what domain or cname you are using. This is used in automated emails that airflow sends to point links to the right web server New in version 1.10.3. New in version 1.10.3. Default DAG view.
Bump werkzeug
version to the following:
pip install 'werkzeug<1.0.0'
For Airflow >=2.0.0 change the config (airflow.cfg) [webserver] cookie_samesite
to use Lax
(https://github.com/apache/airflow/blob/2.0.1/UPDATING.md#the-default-value-for-webserver-cookie_samesite-has-been-changed-to-lax).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With