Ask Your Question
0

Can't get s3curl to work

asked 2011-11-04 04:50:18 -0600

akapadia-usa gravatar image

I installed the s3 API on my swift cluster.

I can successfully connect to it via Cyberduck and Python boto library. But not with s3curl. I can't figure out what I'm doing wrong. Help appreciated.

Error below:

akapadia@ubuntu:~/s3-curl$ ./s3curl.pl --id personal --head -- -k -v -s https://ec2-184-73-4-50.compute-1.amazonaws.com (https://ec2-184-73-4-50.compute-1.ama...) * About to connect() to http://ec2-184-73-4-50.compute-1.amazonaws.com port 443 (#0) * Trying 10.113.35.108... connected * Connected to http://ec2-184-73-4-50.compute-1.amazonaws.com (10.113.35.108) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSL connection using AES256-SHA * Server certificate: * subject: C=US; ST=CA; L=San Jose; O=OpenStack Consulting; OU=Swift; http://CN=ec2-184-73-4-50.compute-1.amazonaws.com (CN=ec2-184-73-4-50.compute-1.amazonaw...) ; emailAddress=bitnami@ec2-184-73-4-50.... * start date: 2011-11-04 04:26:58 GMT * expire date: 2011-12-04 04:26:58 GMT * common name: http://ec2-184-73-4-50.compute-1.amazonaws.com (matched) * issuer: C=US; ST=CA; L=San Jose; O=OpenStack Consulting; OU=Swift; http://CN=ec2-184-73-4-50.compute-1.amazonaws.com (CN=ec2-184-73-4-50.compute-1.amazonaw...) ; emailAddress=bitnami@ec2-184-73-4-50.... * SSL certificate verify result: self signed certificate (18), continuing anyway.

HEAD / HTTP/1.1 User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 Host: http://ec2-184-73-4-50.compute-1.amazonaws.com Accept: / Date: Fri, 04 Nov 2011 04:40:41 +0000 Authorization: AWS test:tester:shoi7Ubs/hYe2VGucf5YesElDMI=

< HTTP/1.1 400 Bad Request HTTP/1.1 400 Bad Request < Content-Type: text/xml; charset=UTF-8 Content-Type: text/xml; charset=UTF-8 < Content-Length: 142 Content-Length: 142 < Date: Fri, 04 Nov 2011 04:40:42 GMT Date: Fri, 04 Nov 2011 04:40:42 GMT

< * Connection #0 to host http://ec2-184-73-4-50.compute-1.amazonaws.com left intact * Closing connection #0 * SSLv3, TLS alert, Client hello (1):

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2011-11-08 05:58:45 -0600

akapadia-usa gravatar image

The problem is solved. Please ignore the previous comment. I had put in the IP address in "my @endpoints = ..." of s3curl.pl. I replaced it with the hostname and the problem is solved. Thank you so much for helping!!

edit flag offensive delete link more
0

answered 2011-11-08 02:17:26 -0600

HEAD operation is not permitted on the service. It can be used on objects.

Try GET on the service instead:

./s3curl.pl --id personal --get -- -k -v -s https://ec2-184-73-4-50.compute-1.amazonaws.com (https://ec2-184-73-4-50.compute-1.ama...)

You should get a list of all buckets.

edit flag offensive delete link more
0

answered 2011-11-08 05:42:36 -0600

akapadia-usa gravatar image

Still getting an error. Things work fine with python boto & cyberduck...

================== akapadia@ubuntu:~/s3-curl$ ./s3curl.pl --id 'test:tester' --key 'testing' --get -- -k -v -s https://ec2-184-73-4-50.compute-1.amazonaws.com (https://ec2-184-73-4-50.compute-1.ama...) Unknown option: get WARNING: It isn't safe to put your AWS secret access key on the command line! The recommended key management system is to store your AWS secret access keys in a file owned by, and only readable by you.

For example:

%awsSecretAccessKeys = ( # personal account personal => { id => '1ME55KNV6SBTR7EXG0R2', key => 'zyMrlZUKeG9UcYpwzlPko/+Ciu0K2co0duRM3fhi', },

# corporate account
company => {
    id => '1ATXQ3HHA59CYF1CVS02',
    key => 'WQY4SrSS95pJUT95V6zWea01gBKBCL6PI0cdxeH8',
},

);

$ chmod 600 /home/akapadia/.s3curl

Will sleep and continue despite this problem. Please set up /home/akapadia/.s3curl for future requests. * About to connect() to http://ec2-184-73-4-50.compute-1.amazonaws.com port 443 (#0) * Trying 10.113.35.108... connected * Connected http://toec2-184-73-4-50.compute-1.amazonaws.com (toec2-184-73-4-50.compute-1.amazonaws...) (10.113.35.108) port 443 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSL connection using AES256-SHA * Server certificate: * subject: C=US; ST=CA; L=San Jose; O=OpenStack Consulting; OU=Swift; http://CN=ec2-184-73-4-50.compute-1.amazonaws.com (CN=ec2-184-73-4-50.compute-1.amazonaw...) ; emailAddress=bitnami@ec2-184-73-4-50.... * start date: 2011-11-04 04:26:58 GMT * expire date: 2011-12-04 04:26:58 GMT * common name: http://ec2-184-73-4-50.compute-1.amazonaws.com (matched) * issuer: C=US; ST=CA; L=San Jose; O=OpenStack Consulting; OU=Swift; http://CN=ec2-184-73-4-50.compute-1.amazonaws.com (CN=ec2-184-73-4-50.compute-1.amazonaw...) ; emailAddress=bitnami@ec2-184-73-4-50.... * SSL certificate verify result: self signed certificate (18), continuing anyway.

GET / HTTP/1.1 User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 Host: http://ec2-184-73-4-50.compute-1.amazonaws.com Accept: / Date: Tue, 08 Nov 2011 05:35:53 +0000 Authorization: AWS test:tester:C70BTwoJg0MnuqUo8nWYCpIoJ80=

< HTTP/1.1 403 Forbidden < Content-Type: text/xml; charset=UTF-8 < Content-Length: 124 < X-Trans-Id: txd1d929f8c60b4fd5bb8803de444ffb13 < Date: Tue, 08 Nov 2011 05:35:54 GMT < <error> AccessDeniedAccess denied * Connection #0 to host http://ec2-184-73-4-50.compute-1.amazonaws.com left intact * Closing connection #0

* SSLv3, TLS alert, Client hello (1):

Proxy server logs show: Nov 8 05:35:54 ip-10-245-82-78 proxy-server - - 08/Nov/2011/05/35/54 GET /v1/AUTH_.auth/test/tester HTTP/1.0 200 - Swauth - - - - - - 0.0052

Nov 8 05:35:54 ip-10-245-82-78 proxy-server - - 08/Nov/2011/05/35/54 HEAD /v1/AUTH_.auth/test HTTP/1.0 204 - Swauth - - - - - - 0.0045

edit flag offensive delete link more
0

answered 2011-11-08 05:58:56 -0600

akapadia-usa gravatar image

Thanks FUJITA Tomonori, that solved my question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-11-04 04:50:18 -0600

Seen: 596 times

Last updated: Nov 08 '11