-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
S3 client authentication error #484
Comments
We add the date header when signing the request and just use System.currentTimeMillis corrected for any potential clock skew error between client and service. Could you try logging the values of System.currentTimeMillis() and SDKGlobalTime.getGlobalTimeOffset() to see if they are returning sensible values? |
I'm having this issue now as well. |
Here are a few examples of the times you asked for, logged just before calling a method on the S3 client library:
|
Thanks @rehevkor5, that all looks normal. Are you configuring the client or request object before making the call? If possible could you turn on wire logging and paste a sample request, please note wire logs may contain sensitive information depending on your application so take care and review and redact if needed. http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-logging.html |
This are values returned before exception.
The code works on my machine, on remote machine which runs integration tests, but fails at development environment. |
Ok, I think I have something. The failing machine runs the code on docker container using "java:8" base image. It is open JDK 8. I see that they made some update 4 days ago, which might be problem. |
Changing openJDK docker base image from java:8 to java:8u45 fixed the issue. "java:8" currently points to openjdk-8u66-jdk so I guess there is some new bug/problem. |
Here is the diff that helped me to figure out that I should use java:8u45 |
Ahhh my memory has failed me. This appears to be related to #444. Can you check what version of joda time is being resolved in your maven dependencies? |
I'm using joda-time 2.7 |
Upgrading to at least joda-time 2.8.1 should allow you to use Java 1.8u60 and higher. If another portion of your dependency graph is causing 2.7 to be pulled in declaring a direct dependency on 2.8.1 will take precedence. |
It fixed issue. I recommend to write about it somewhere (FAQ, requirements) because I wasn't able to google it using exception message |
Will do @ppiotrow. Thanks for reporting this. |
@gibbonsj are you sure 2.8.1 is the version being used at runtime? Can you try starting your application with the "-verbose:class" option to see where the joda time classes are being loaded from? new DateTime().getClass().getProtectionDomain().getCodeSource() may also work if it's easier for you to just add a print statement in your application. |
@shorea, the work around is good. Long story short, the code was using an older joda-time from a TPS fat jar. Once the class path was fixed everything worked perfectly. Thank you again. |
Great to hear! |
I was just bitten by this defect while building a Docker image that uses the I'm building a Dropwizard 0.8.1 app, and Dropwizard has a dependency on joda-time 2.7 which is vulnerable to this issue. I pinned joda-time to 2.8.1 in my Maven pom.xml, rebuilt the image, and all is well. |
This updates joda-time to version 2.8.1. This is due to a bug in older versions of joda-time which cause it to [break when used with the AWS SDK](aws/aws-sdk-java#484).
Update JodaTime version above 2.0 and serializer your atribute
|
… versions of JDK
Hi, I get following exception while using aws-java-sdk-s3 in version 1.10.10 (had same issue on 1.9.37). The usecase works on my computer but throws exception on my development environment. Does it use something from OS configuration?
The text was updated successfully, but these errors were encountered: