-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExpiredTokenException #49
Comments
Hmm... I think this can be attributed to clock drift. Closing it. |
Now it has happened again on a production system, and it was definitely not clock drift:
It doesn't recover even after a few hours. As said earlier, we're using the Is this really supported well enough? |
bump. happens in 0.12.1 with DefaultCredentialsProvider |
I also see this in 0.12.1 with the DefaultCredentialsProvider, while including the STS libs in the classpath. |
Thanks for reporting this. It appears that when the credentials are being refreshed those aren't making into the client. @jeremysears do you mean the DefaultAWSCredentialsProviderChain? My suspicion is that the code that handles sending the credentials to the native component isn't seeing the credential change, allowing the credentials to expire. I still need to investigate this some more. Can everyone who is seeing this tell me what type of credentials are you using:
|
Yes, the DefaultAWSCredentialsProviderChain. I'm not sure if this is related, but I included the STS libs so that I could run some utilities locally w/ the role we use on our servers. However, I see the error on our servers, where we're using EC2 Container Credentials (no STS, but the libs are now available). W/o the STS lib available in the classpath we don't see this issue on our servers, w/ no other code changes. |
I think I have an idea of the cause. Both the ECS Credentials, and the STS Credentials have the possibility of throwing an exception if something goes wrong on their remote side. If my suspicion is correct the credential update thread is getting killed when an unhandled exception occurs. From the reports it sounds like this doesn't happen all the time, but does happen occasionally. I'll see about adding some checks around around the credential retrieval, and providing some type of auto restart should the thread be killed. |
I also see this when the STS libs are not included in the classpath. |
@jeremysears If my guess is correct it's not related to the STS credentials, but to any credentials that can throw an exception on retrieval. Regardless of whether this is the cause, strengthening the credential refresh thread would be beneficial. Could those affected please comment, or add a reaction to assist us in prioritizing the change. Thanks |
We just experienced this in Production yesterday, in 2 of 6 servers in our data center using KPL 0.12.3 with STSAssumeRoleSessionCredentialsProvider. They both started at about the same time. Unfortunately we hadn't noticed until 16 hours after it started :-( and by then the KPL had ballooned from 15M to 3.5G. +1 for addressing this issue! |
Facing a similar issue with InstanceProfileCredentials |
Also experiencing with InstanceProfileCredentials |
Runtime exceptions while updating credentials will no longer kill the credential update thread. Interrupted exceptions can be thrown while a thread pool/executor is being shutdown. This now handles that case without a message. Mitigates/Fixes awslabs#49
Runtime exceptions while updating credentials will no longer kill the credential update thread. Interrupted exceptions can be thrown while a thread pool/executor is being shutdown. This now handles that case without a message. Mitigates/Fixes #49
I have setup the KPL to post to Kinesis using an assumed role by using
STSAssumeRoleSessionCredentialsProvider
as credentials provider.Now, this worked well for some time, but I ended up after a few hours with these errors:
Does the Java code renew credentials often enough and hand them over to the native daemon?
The text was updated successfully, but these errors were encountered: