You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "amanchaudhary-95 (via GitHub)" <gi...@apache.org> on 2025/05/05 07:41:03 UTC
[I] base_url gives state mismatch and task fail error. [airflow]
amanchaudhary-95 opened a new issue, #50191:
URL: https://github.com/apache/airflow/issues/50191
### Apache Airflow version
3.0.0
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
Recently, I upgraded Airflow from 2.10 to 3.0. I've deployed Airflow behind Nginx. I was able to migrate successfully, except I'm getting `state mismatch` error if I'm setting `base_url` in `airflow.cfg`.
`airflow.cfg` setting:
```
[api]
base_url = http://localhost:8080/MLOps
```
Nginx configuration:
```
server {
listen 80;
server_name <server_name>;
location /MLOps/ {
proxy_pass http://localhost:8080;
proxy_set_header X-Forwarded-Prefix /MLOps;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```
This was working fine in `Airflow 2.10` but right now I'm getting `state mismatch` if I'm trying to access the airflow web server using `http://<server IP>/MLOps` . Below is the screenshot.

Also, it is working fine if I disable `base_url` and access the airflow web server locally using `http://localhost:8080`. The same DAG is running successfully without any error but in that case, I'm not able to access the Airflow web server on `http://<server IP>/MLOps`. Below is the screenshot for the successful run:

### What you think should happen instead?
_No response_
### How to reproduce
Run any DAG with and without `base_url` behind nginx. Previously, it was working when `base_url` was under `[webserver]`
### Operating System
Ubuntu server 24.04 LTS
### Versions of Apache Airflow Providers
_No response_
### Deployment
Virtualenv installation
### Deployment details
Python 3.12.7
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] base_url gives state mismatch and task fail error. [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #50191:
URL: https://github.com/apache/airflow/issues/50191#issuecomment-2850162820
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] base_url gives state mismatch and task fail error. [airflow]
Posted by "amanchaudhary-95 (via GitHub)" <gi...@apache.org>.
amanchaudhary-95 commented on issue #50191:
URL: https://github.com/apache/airflow/issues/50191#issuecomment-2859700270
Thanks for the help, this solved the issue.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] base_url gives state mismatch and task fail error. [airflow]
Posted by "amanchaudhary-95 (via GitHub)" <gi...@apache.org>.
amanchaudhary-95 commented on issue #50191:
URL: https://github.com/apache/airflow/issues/50191#issuecomment-2855446960
Yes, that is correct. `ERROR - DAG 'xyz' for task instance <xxxxxxxxxx manual__2025-05-06T17:43:56.001406+00:00 [queued]> not found in serialized_dag table` is there. I even tried the official tutorial on Airflow [link](https://airflow.apache.org/docs/apache-airflow/stable/howto/run-behind-proxy.html), but the issue is still the same. Even tried to run it without nginx, just by putting a route on `base_url` as `base_url = http://localhost:8080/airflow`, still getting the same error. The issue seems to be with the airflow itself, or maybe someone can help us resolve the issue.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] base_url gives state mismatch and task fail error. [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed issue #50191: base_url gives state mismatch and task fail error.
URL: https://github.com/apache/airflow/issues/50191
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] base_url gives state mismatch and task fail error. [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #50191:
URL: https://github.com/apache/airflow/issues/50191#issuecomment-2858738470
The executino API is not reachable because you did not specify `execution_api_server_url` in your config.
When you update `base_url` you also need to set `execution_api_server_url`, in you case (supposing you are not deploying the execution api in standalone mode)
- `http://localhost:8080/MLOps/execution`
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] base_url gives state mismatch and task fail error. [airflow]
Posted by "dlira-sf (via GitHub)" <gi...@apache.org>.
dlira-sf commented on issue #50191:
URL: https://github.com/apache/airflow/issues/50191#issuecomment-2855029710
I am encountering the same situation. Using Python 3.12.10, Ubuntu 24.04 (Heroku-24), Airflow 3.0.0, Postgres 17 database. Have you noticed the logs for failing tasks not being found with a "No host supplied" error? The 'not found in serialized_dag table` error occurs for me, although I can query the database and find the dag in the table.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org