You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "inkerinmaa (via GitHub)" <gi...@apache.org> on 2025/04/24 14:27:42 UTC
[I] Tasks get stuck when using Airflow base url parameter [airflow]
inkerinmaa opened a new issue, #49725:
URL: https://github.com/apache/airflow/issues/49725
### Apache Airflow version
3.0.0
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
Hi. I use docker-compose and want to run Airflow with subpath, like
`AIRFLOW__API__BASE_URL: ' http://mycompany.com/airflow'`
UI is loading fine, with subpath provided, but when I trigger any dag it stucks in queued state. Worker logs are empty - just info that it is ready
`2025-04-24 14:12:55.240510 [info ] celery@00da0db4ba2e ready. [celery.apps.worker]`
Then after a while it gets ServerResponseError: Not Found
```
err = ServerResponseError('Not Found')
response = <Response [404 Not Found]>
ServerResponseError: Not Found
```

### What you think should happen instead?
_No response_
### How to reproduce
Use official docker compose and add `AIRFLOW__API__BASE_URL: ' http://mycompany.com/airflow'` env variable
### Operating System
Debian
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### 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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "davidavdav (via GitHub)" <gi...@apache.org>.
davidavdav commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-3239082177
For any human or LLM that might stumble upon this thread, I think I finally managed to get the the setup working. In the airflow 3.0.2 `docker-compose.yaml`:
```yaml
x-airflow-common:
environment:
AIRFLOW__CORE__EXECUTION_API_SERVER_URL: http://airflow-apiserver:8080/airflow/execution/
AIRFLOW__API__BASE_URL: https://ourdomain.org/airflow
```
Also, the airflow authentication URL is `http://airflow-apiserver:8080/airflow/auth/token`, so the external path selection `/airflow` crept in both the local execution api url and authentication url.
The relevant nginx part at `https://ourdomain.org` reads:
```nginx
server {
server_name ourdomain.org;
resolver 127.0.0.11 valid=15s;
listen 443 ssl;
add_header 'Access-Control-Allow-Methods' "GET, POST, OPTIONS, PUT, DELETE, PATCH";
add_header 'Access-Control-Allow-Origin' * always;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
location ~ ^/airflow/(.*)$ {
proxy_set_header Host $http_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 https;
proxy_set_header X-Forwarded-Host $host;
set $backend http://airflow-apiserver:8080;
proxy_pass $backend/airflow/$1$is_args$args;
proxy_redirect off;
}
}
```
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2832043046
Thanks for the feedback. Yes this is a different issue https://github.com/apache/airflow/issues/49495 you should not experience this, there's already a patch for it, maybe wait for 3.0.1 or you can apply the patch to your image and see if the issue persists. (more info in the https://github.com/apache/airflow/issues/49495 thread)
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "davidavdav (via GitHub)" <gi...@apache.org>.
davidavdav commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-3234778249
I have exactly the same issue as described by @inkerinmaa : I have airflow 3.0.2 behind an nginx reverse proxy redirecting `https://ourdomain.org/airflow/(.*)` to `http://airflow-apiserver:8080/$1` with all headers etc correct, leading to a fine airflow web interface experience. However, the tasks don't run with error logs as described above.
Setting `AIRFLOW__CORE__EXECUTION_API_SERVER_URL: 'http://airflow-apiserver:8080/execution/` does not help, perhaps it needs to be set to another value?
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2827992422
aah yes, we need the `AIRFLOW__CORE__EXECUTION_API_SERVER_URL`!!
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "inkerinmaa (via GitHub)" <gi...@apache.org>.
inkerinmaa commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2832144241
@pierrejeambrun I tried to explain what's going on in Slack https://apache-airflow.slack.com/archives/CCQ7EGB1P/p1745657909554469?thread_ts=1745657909.554469&cid=CCQ7EGB1P
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2829586132
@inkerinmaa can you provide more context please this is not expected. Do you still see the same type of logs in the task sdk ?
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2828156784
Closing, feel free to reopen if needed.
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "inkerinmaa (via GitHub)" <gi...@apache.org>.
inkerinmaa commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2829397758
> Closing, feel free to reopen if needed.
I reopen it since provided solution doesn't work
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "inkerinmaa (via GitHub)" <gi...@apache.org>.
inkerinmaa commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2831960349
@pierrejeambrun During my experiments with official docker compose I've got to the point when sign in goes to infinite loop, but this is another issue already registered here. So, I stopped using base url for now, but without base url I also see some unconsistent behavior - sometimes dag runs without any problems, sometimes - stuck in queued state and sometimes "Clear run" helps, sometimes - not. But I will ask in Slack first, maybe, I am doing sth wrong. Thanks
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2827963426
Is 404 seen for all API calls? What is the value of `conf.get("core", "execution_api_server_url")` in airflow configuration?
https://github.com/apache/airflow/blob/ed06d99c226c92bd7251048686b0ea44cc26b715/providers/celery/src/airflow/providers/celery/executors/celery_executor_utils.py#L161-L169
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #49725:
URL: https://github.com/apache/airflow/issues/49725#issuecomment-2828155986
As mentioned by Kaxil, indeed, when you set `AIRFLOW__API__BASE_URL` you'll also want to set `AIRFLOW__CORE__EXECUTION_API_SERVER_URL`. Because execution api and core api are not necessarily served together.
--
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] Tasks get stuck when using Airflow base url parameter [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed issue #49725: Tasks get stuck when using Airflow base url parameter
URL: https://github.com/apache/airflow/issues/49725
--
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