You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "csp33 (via GitHub)" <gi...@apache.org> on 2025/08/14 09:12:53 UTC
[I] Exception in remote logging if connection doesn't exist [airflow]
csp33 opened a new issue, #54498:
URL: https://github.com/apache/airflow/issues/54498
### Apache Airflow version
3.0.4
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
After upgrading our Airflow deployment from version 3.0.3 to 3.0.4, all tasks started to fail with a RuntimeError: generator didn't yield. Our Airflow instance is deployed on Kubernetes and is configured to use S3 for remote logging.
The error occurred because a missing `aws_default` connection caused a failure during the logging setup phase for tasks. This seems to be a new requirement in version 3.0.4 that wasn't present in 3.0.3, or a regression that causes a critical failure when the connection is absent.
Worker logs traceback:
```
2025-08-14 09:02:05.978736 [warning ] Server error [airflow.sdk.api.client] detail={'detail': {'reason': 'not_found', 'message': 'Connection with ID aws_default not found'}}
2025-08-14 09:02:05.979060 [error ] Connection not found [airflow.sdk.api.client] conn_id=aws_default detail={'detail': {'reason': 'not_found', 'message': 'Connection with ID aws_default not found'}} status_code=404
2025-08-14 09:02:05.985273 [error ] Task execute_workload[fe7b5051-82c5-4dec-880d-e4e7c37b3ef2] raised unexpected: RuntimeError("generator didn't yield") [celery.app.trace]
```
The traceback points to this line in the code:
https://github.com/apache/airflow/blob/3.0.4/task-sdk/src/airflow/sdk/execution_time/supervisor.py#L1700
```
│ /app/.venv/lib/python3.11/site-packages/airflow/sdk/execution_time/supervisor.py:1700 in │
│ _configure_logging │
│ │
│ ❱ 1700 with _remote_logging_conn(client): │
...
RuntimeError: generator didn't yield
```
### What you think should happen instead?
Tasks should execute successfully. If a connection is required for remote logging, Airflow should either:
- Use a different, non-critical logging path if the connection is missing and warn users.
- Provide a clear, helpful error message about the missing connection instead of a cryptic RuntimeError: generator didn't yield.
- Include a warning in the release notes about the new requirement for a `aws_default` connection when using S3 remote logging.
### How to reproduce
- Deploy an Airflow instance on Kubernetes.
- Configure remote_logging to use S3 in airflow.cfg or through environment variables.
- Ensure that there is no Airflow connection named aws_default.
- Upgrade the Airflow version to 3.0.4.
- Run a DAG with one or more tasks.
- Observe the task failure and the logs.
### Operating System
Airflow in k8s
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### 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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3687199692
I think this has been already handled better in latest airflow 3.1.5 -> but I am not really sure, it should be re-verified in 3.1.5 and reported back here.
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "sagu2602 (via GitHub)" <gi...@apache.org>.
sagu2602 commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3995017594
How to fix it? We are using 3.1.7
Does that mean remote_logging with s3 won't work at all?
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "dada-engineer (via GitHub)" <gi...@apache.org>.
dada-engineer commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3776430464
> for people stumbling upon this after migrating from 2.11 to 3.1.6, setting remote_conn_id https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#remote-log-conn-id for aws (i guess but did not try) or gcp default connections fixes the issue. In my case, I wanted to remote log to a gcs bucket:
>
> remote_logging = True
> remote_base_log_folder = gs://my-bucket/my-path
> remote_log_conn_id = my-default-gcp-connection
>
> To create a default gcp connection, select create a google cloud connection type, no need for extra parameters, set a conn_id and put this conn id in remote_log_conn_id.
Actually if you create the connection you can create any no need to call this default. It just matters that the API server can find this in the DB. Interestingly enough I only face this issue in AWS not Azure...
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "dada-engineer (via GitHub)" <gi...@apache.org>.
dada-engineer commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3753311198
> I think this has been already handled better in latest airflow 3.1.5 -> but I am not really sure, it should be re-verified in 3.1.5 and reported back here.
I have deployed 3.1.6 to try this and still face the same issue @potiuk.
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "xuannguyenhehe (via GitHub)" <gi...@apache.org>.
xuannguyenhehe commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3637810542
I met the same error at 3.1.3
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "csp33 (via GitHub)" <gi...@apache.org>.
csp33 commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3187700276
Probably related: https://github.com/apache/airflow/pull/53719
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3189081495
Yeah the error should be improved, but I think an exception is the right behaviour here?
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "ginolegigot (via GitHub)" <gi...@apache.org>.
ginolegigot commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3774739101
for people stumbling upon this after migrating from 2.11 to 3.1.6, setting remote_conn_id https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#remote-log-conn-id for aws (i guess but did not try) or gcp default connections fixes the issue.
In my case, I wanted to remote log to a gcs bucket:
```cfg
remote_logging = True
remote_base_log_folder = gs://my-bucket/my-path
remote_log_conn_id = my-default-gcp-connection
```
To create a default gcp connection, select create a google cloud connection type, no need for extra parameters, set a conn_id and put this conn id in remote_log_conn_id.
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "ForeverWintr (via GitHub)" <gi...@apache.org>.
ForeverWintr commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-4008090323
We ran into this issue on 3.0.6 and I can confirm that adding an empty `aws_default` connection fixes it.
It looks to me like the [current version](https://github.com/apache/airflow/blob/7a8a1c3cb896ee66bb144ad28a2918ac9610492b/task-sdk/src/airflow/sdk/execution_time/supervisor.py#L905) of `_remote_logging_conn` shouldn't have this issue, so hopefully it is included in the next release.
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-4009941252
Closing as solved https://github.com/apache/airflow/pull/59801
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "dada-engineer (via GitHub)" <gi...@apache.org>.
dada-engineer commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3640545428
The overall problem is that the api server is called and the connection is requested via API call. This endpoint only checks if there is one in the DB. If not it returns a 404. So all the env var specified connections are ignored here. I would argue that these even should have priority. Why not check the env var created connections before calling the API server anyways? @ashb
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "dada-engineer (via GitHub)" <gi...@apache.org>.
dada-engineer commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3996426736
> How to fix it? We are using 3.1.7 Does that mean remote_logging with s3 won't work at all?
nono @sagu2602 this does not mean it is unusable. It just means you have to create the connection in the db (either via cli or UI). Depending on what you are using as aws auth mechanism (we run in EKS and can benefit from automatic identity web tokens injection into the pod based on service account IAM role, so it only needs a name), you also have to configure this then.
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-4009821930
> #59801
> I was just looking into this as well. It seems that [#59801](https://github.com/apache/airflow/pull/59801) fixes it. And it was not backported into either 3.1.6 or 3.1.7 since it wasn't the specific intention of the PR to fix that bug so no one noticed perhaps?
>
> It will be included in 3.2 of course, but we could consider backporting it for the upcoming 3.1.8 release [@vatsrahul1001](https://github.com/vatsrahul1001)
Targeting this for 3.1.9. The 3.1.8 release process has already started, and the change may require more testing.
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "Dev-iL (via GitHub)" <gi...@apache.org>.
Dev-iL commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-4009933363
https://github.com/apache/airflow/pull/62979
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3188070872
cc @ashb
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-3189206601
We could continue to log things to a local file, and in that file log that the remote log couldn't be uploaded -- I can see that perhaps being more useful than the current behaviour too
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on issue #54498:
URL: https://github.com/apache/airflow/issues/54498#issuecomment-4008376861
I was just looking into this as well. It seems that #59801 fixes it. And it was not backported into either 3.1.6 or 3.1.7 since it wasn't the specific intention of the PR to fix that bug so no one noticed perhaps?
It will be included in 3.2 of course, but we could consider backporting it for the upcoming 3.1.8 release @vatsrahul1001
--
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] Unhandled Exception in remote logging if connection doesn't exist [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal closed issue #54498: Unhandled Exception in remote logging if connection doesn't exist
URL: https://github.com/apache/airflow/issues/54498
--
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