Closed aYukiSekiguchi closed 1 month ago
We are running 6 instances with this plugin for about 1 month. We faced this bug in 3 out of 6 instances. Therefore, this isn't rare problem.
It is happening the same to me with the same plugin version
@ashie san, Could you please confirm if there's any update for this issue?
This is similar to #110 , we are experiencing the same issue. In our case, once in a while there is a network timeout in some regions while connecting to sts for the aws token, which raises the error that stops the timer, with no option to recover other than manually restarting the pods.
FYI: My quick and dirty fix https://github.com/aYukiSekiguchi/fluent-plugin-opensearch/commits/dont_stop_refresh_aws_credentials/
You can build and install like the following
$ fluent-gem build fluent-plugin-opensearch.gemspec
$ sudo fluent-gem install fluent-plugin-opensearch
Hi @aYukiSekiguchi, Could you send your patch as a PR? It seems it's one of the good workaround to mitigate this issue.
Sure. I created a PR: https://github.com/fluent/fluent-plugin-opensearch/pull/142
This should be fixed in #142.
(check apply)
Steps to replicate
There is no reliable steps to replicate.
When it failed to refresh
@_aws_credentials
like the following error log:It stopped to refresh with dumping the following log:
Therefore, it will fail to flush the buffer with
The security token included in the request is expired
error message in the future.FYI: The following is my config, but I don't think this depends on config.
Expected Behavior or What you need to ask
I'm not sure whether this is bug, but I want fluent-plugin-opensearch to refresh
@_aws_credentials
at the nextrefresh_credentials_interval
. I guessAssumeRoleCredentials.new()
failes if a network is unstable. If this happens, fluent-plugin-opensearch stops sending logs. I'm not happy with this.The reason why fluent-plugin-opensearch stops to refresh
@_aws_credentials
is thattimer_execute()
removes the timer if its block raises an exeption. https://github.com/fluent/fluentd/blob/2b4ca5d2927b706c3bdc98ffd0a0b66232bc0b65/lib/fluent/plugin_helper/timer.rb#L84-L85Using Fluentd and OpenSearch plugin versions