Project

General

Profile

Actions

Bug #10195

closed

s3 java jdk conn.getobject(...) (get s3 object) method fails with latest version of aws s3 java jdk

Added by Selwyn Jacobs over 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

For instance,

in the Java example ( http://docs.ceph.com/docs/master/radosgw/s3/java/ )

The example:

Download an Object (to a file)

This downloads the object perl_poetry.pdf and saves it in /home/larry/documents

conn.getObject(
        new GetObjectRequest(bucket.getName(), "perl_poetry.pdf"),
        new File("/home/larry/documents/perl_poetry.pdf")
);

Is not longer valid as of version aws-java-sdk-s3.-1.9.5 (latest version is 1.9.6).

Executing the block of code fails with "Invalid Arguments" Http Status 400.

I went through all the minor releases of the aws-java-sdk-s3 and found out reverting back to version 1.9.4 fixes this issue.

Moreover, I suspect this is a deeper rooted problem in all the Sdks as to how GET S3 Object request is constructed. Moving forward this will persist as an issue in all versions aws-java-sdk-s3 and possibly other sdks for other languages. Please investigate this bug.

Also,

Minor Enhancement request:

Specify which API/SDK version was used for the sample code in the docs. This would of been helped if the version of the jdk tested with in the documentation was explicitly stated so i didn't have to go through each minor release jar file to guess which version to revert back to.


Files

FAILED GET Request Log java SDK aws-java-sdk-s3-1.9.5 (4.76 KB) FAILED GET Request Log java SDK aws-java-sdk-s3-1.9.5 FAILED GET Request Log java SDK aws-java-sdk-s3-1.9.5 (and higher) Selwyn Jacobs, 12/03/2014 04:20 PM
SUCCESSFUL GET Request Log java SDK aws-java-sdk-s3-1.9.4 (10.9 KB) SUCCESSFUL GET Request Log java SDK aws-java-sdk-s3-1.9.4 SUCCESSFUL GET Request Log using downgraded java SDK aws-java-sdk-s3-1.9.4 Selwyn Jacobs, 12/03/2014 04:21 PM

Related issues 1 (0 open1 closed)

Related to rgw - Feature #10333: rgw: support AWS4 authenticationResolvedJavier M. Mellid12/16/2014

Actions
Actions #1

Updated by Selwyn Jacobs over 9 years ago

typo... in bug title/description anywhere you see "jdk" I meant "sdk"... it was late before thanksgiving when I composed this bug.

Actions #2

Updated by Sage Weil over 9 years ago

  • Assignee set to Yehuda Sadeh
Actions #3

Updated by Yehuda Sadeh over 9 years ago

  • Status changed from New to Need More Info

Can you provide rgw log (debug rgw = 20), for such a failed request?

Actions #6

Updated by Selwyn Jacobs over 9 years ago

Both test runs used the exact same code, same endpoint, same authentication keys, and same GET request. The only thing I changed on the client side is the jar file from 1.9.4->1.9.5 and vise versa.

GetObjectRequest gro = new GetObjectRequest("5457ead95b24af3dc53acdcb", "547f9b0032a09b7111b5efb3.0.CME_CHI_Daily_Reporting_2014.xls");
        gro.setRequestCredentials(credentials);
        //dl object to a file
        conn.getObject(
                gro,
                new File("c:/tmp/CME_CHI_Daily_Reporting_2014.xls")
        );

Looks like from the sample debug logs it's an authentication issue.

Actions #7

Updated by Yehuda Sadeh over 9 years ago

It seems that the jdk uses a new type of authentication (AWS4), that radosgw is yet to support.

Actions #8

Updated by Sage Weil about 9 years ago

  • Status changed from Need More Info to Closed

see the feature ticket #10333

Actions #9

Updated by Raunak Kumar about 8 years ago

Hi Team
I am using a Go SDK in my Go Client to access the Radosgw but am getting errors and it is due to authentication failure only.
I have a test instance in S3 and using the same code, I'm able to access S3 buckets. Kindly provide me with any solutions/updates on the same.

Actions

Also available in: Atom PDF