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.

Airflow 1.10.15 : The CSRF session token is missing when i try to trigger a new dag

See original GitHub issue

Apache Airflow version: 1.10.15 https://raw.githubusercontent.com/apache/airflow/constraints-1.10.15/constraints-3.6.txt

Kubernetes version: Client Version: v1.16.2 Server Version: v1.14.8-docker-1

Environment: python 3.6.8 + celeryExecutor + rbac set to false

  • OS (e.g. from /etc/os-release): CentOS Linux 7 (Core)
  • Kernel (e.g. uname -a): 3.10.0-1127.19.1.el7.x86_64

What happened: I have upgraded from 1.10.12 to 1.10.15, when i trigger a dag i have the exception below image

What you expected to happen: trigger a dag without exceptions

How to reproduce it: use airflow 1.10.15 and try to trigger an example dag example_bash_operator

Anything else we need to know:

How often does this problem occur: Every time i trigger a dag

Any relevant logs to include? Put them here in side a detail tag:

webserver.log [2021-04-26 15:03:06,611] {__init__.py:50} INFO - Using executor CeleryExecutor [2021-04-26 15:03:06,612] {dagbag.py:417} INFO - Filling up the DagBag from /home/airflow/dags 175.62.58.93 - - [26/Apr/2021:15:03:10 +0000] "GET /health HTTP/1.1" 200 187 "-" "kube-probe/1.14+" 175.62.58.93 - - [26/Apr/2021:15:03:11 +0000] "GET /health HTTP/1.1" 200 187 "-" "kube-probe/1.14+" 175.62.58.93 - - [26/Apr/2021:15:03:15 +0000] "GET /health HTTP/1.1" 200 187 "-" "kube-probe/1.14+" 175.62.58.93 - - [26/Apr/2021:15:03:16 +0000] "GET /health HTTP/1.1" 200 187 "-" "kube-probe/1.14+" [2021-04-26 15:03:17,401] {csrf.py:258} INFO - The CSRF session token is missing. 10.30.180.137 - - [26/Apr/2021:15:03:17 +0000] "POST /admin/airflow/trigger?dag_id=example_bash_operator&origin=https://xxxxxx/admin/ HTTP/1.1" 400 150 "https://xxxxxxxxxxxx/admin/airflow/trigger?dag_id=example_bash_operator&origin=https://xxxxxxxxxxxx/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36" 175.62.58.93 - - [26/Apr/2021:15:03:20 +0000] "GET /health HTTP/1.1" 200 187 "-" "kube-probe/1.14+" 175.62.58.93 - - [26/Apr/2021:15:03:21 +0000] "GET /health HTTP/1.1" 200 187 "-" "kube-probe/1.14+"

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kaxilcommented, Apr 27, 2021

@chakir-alaoui When you use more than 1 Webservers, make sure [webserver] secret_key is set same across both of them.

If you don’t set it by it will generate a random ones and since both webserver will have different keys, one of them will error.

0reactions
chakir-alaouicommented, Apr 27, 2021

thank you for your help, it’s working now 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSRF session token is missing in AIRFLOW - Stack Overflow
This works fine on my laptop but when I uploaded to the server, I kept getting error message when I browse around on...
Read more >
[GitHub] [airflow] chakir-alaoui opened a new issue #15532
**How to reproduce it**: use airflow 1.10.15 and try to trigger an example dag ... {csrf.py:258} INFO - The CSRF session token is...
Read more >
Release Notes — Airflow Documentation
New to this release of Airflow is the concept of Datasets to Airflow, and with it a new way of scheduling dags: data-aware...
Read more >
Configuration Reference — Airflow Documentation
Configuration Reference¶. This page contains the list of all the available Airflow configurations that you can set in airflow.cfg file or using environment ......
Read more >
Changelog — Airflow Documentation - Apache Airflow
[AIRFLOW-3607] Only query DB once per DAG run for TriggerRuleDep (#4751) ... [AIRFLOW-2866] Fix missing CSRF token head when using RBAC UI ...
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