4 replies [Last post]
aimon (Offline)
Can't create lower case bucket names with right_aws 1.10.0
Posted: Thu, 03/11/2010 - 17:36

Hi, in Euca 1.6.2 we cant create lower case bucket names with right_aws 1.10.0. It throws a cannot connect error. Have people seen this using other walrus connect methods?

Here is output from right_aws:


I, [2010-03-12T01:28:20.510723 #17206] INFO -- : Closing HTTP connection to 10.168.110.121:8773
I, [2010-03-12T01:28:20.510913 #17206] INFO -- : Opening new HTTP connection to clouds.10.168.110.121:8773
W, [2010-03-12T01:28:20.515520 #17206] WARN -- : Rightscale::HttpConnection : request failure count: 1, exception: #
I, [2010-03-12T01:28:20.515664 #17206] INFO -- : Opening new HTTP connection to clouds.10.168.110.121:8773
W, [2010-03-12T01:28:20.519482 #17206] WARN -- : Rightscale::HttpConnection : request failure count: 2, exception: #
I, [2010-03-12T01:28:20.519573 #17206] INFO -- : Opening new HTTP connection to clouds.10.168.110.121:8773
W, [2010-03-12T01:28:20.523354 #17206] WARN -- : Rightscale::HttpConnection : request failure count: 3, exception: #
I, [2010-03-12T01:28:20.523443 #17206] INFO -- : Opening new HTTP connection to clouds.10.168.110.121:8773
W, [2010-03-12T01:28:20.527106 #17206] WARN -- : Rightscale::HttpConnection : request failure count: 4, exception: #
W, [2010-03-12T01:28:20.527215 #17206] WARN -- : Rightscale::HttpConnection : re-raising same error: clouds.10.168.110.121 temporarily unavailable: (Connection refused - connect(2)) -- error count: 4, error age: 0
RightAws::AwsError: clouds.10.168.110.121 temporarily unavailable: (Connection refused - connect(2))
from /usr/lib/ruby/gems/1.8/gems/right_http_connection-1.2.4/lib/right_http_connection.rb:340:in `request'
from /usr/lib/ruby/gems/1.8/gems/right_http_connection-1.2.4/lib/right_http_connection.rb:330:in `loop'
from /usr/lib/ruby/gems/1.8/gems/right_http_connection-1.2.4/lib/right_http_connection.rb:330:in `request'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/awsbase/right_awsbase.rb:345:in `request_info_impl'
from /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/awsbase/benchmark_fix.rb:30:in `add!'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/awsbase/right_awsbase.rb:345:in `request_info_impl'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/s3/right_s3_interface.rb:169:in `request_info'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/s3/right_s3_interface.rb:201:in `create_bucket'
from (irb):12
from /usr/lib/ruby/1.8/rubygems/exceptions.rb:6

neil (Offline)
Can you post your code that
Posted: Thu, 03/11/2010 - 18:41

Can you post your code that creates the bucket? I am able to create lowercase bucket names just fine with RightAWS, so more info might help.

Are you connecting to the correct host? Is your S3_URL set correctly?

lakbu (Offline)
irb output
Posted: Fri, 03/12/2010 - 03:35

Here's a capture output from my irb console:


[kdemanawa@controller01 ~]$ irb -rrubygems
irb(main):001:0> require 'right_aws'
=> true
irb(main):002:0> w = RightAws::S3Interface.new('WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw', 'SUysobsDje30goLteac9PyOTmAfFhhMLkrUMw', :endpoint_url => 'http://10.168.110.121:8773/services/Walrus')
I, [2010-03-12T11:26:37.439689 #13260] INFO -- : New RightAws::S3Interface using single-threaded mode
=> #"http", :port=>8773, :server=>"10.168.110.121", :service=>"/services/Walrus", :multi_thread=>nil, :endpoint_url=>"http://10.168.110.121:8773/services/Walrus", :region=>nil}, @error_handler=nil, @logger=#, @level=0, @progname=nil, @logdev=#, @dev=#, @shift_size=nil, @shift_age=nil>>, @aws_secret_access_key="SUysobsDje30goLteac9PyOTmAfFhhMLkrUMw">
irb(main):003:0> w.list_all_my_buckets
I, [2010-03-12T11:26:45.463567 #13260] INFO -- : Opening new HTTP connection to 10.168.110.121:8773
=> [{:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-02-20T09:10:39.000Z", :name=>"vmlinuz-2.6.18-xenU-ec2-v1.2"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:35:05.000Z", :name=>"AutoInstallApps"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:30:09.000Z", :name=>"KennethBucket"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:22:48.000Z", :name=>"AimonBucket"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-03T07:46:41.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.5"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-09T00:42:38.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.6"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-09T05:46:40.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.7"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:28:43.000Z", :name=>"Clouds"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-09T07:05:47.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.8"}]
irb(main):004:0> w.create_bucket 'lower-case-bucket'
I, [2010-03-12T11:27:16.842199 #13260] INFO -- : Closing HTTP connection to 10.168.110.121:8773
I, [2010-03-12T11:27:16.842431 #13260] INFO -- : Opening new HTTP connection to lower-case-bucket.10.168.110.121:8773
W, [2010-03-12T11:27:16.852471 #13260] WARN -- : Rightscale::HttpConnection : request failure count: 1, exception: #
I, [2010-03-12T11:27:16.852614 #13260] INFO -- : Opening new HTTP connection to lower-case-bucket.10.168.110.121:8773
W, [2010-03-12T11:27:16.856910 #13260] WARN -- : Rightscale::HttpConnection : request failure count: 2, exception: #
I, [2010-03-12T11:27:16.857033 #13260] INFO -- : Opening new HTTP connection to lower-case-bucket.10.168.110.121:8773
W, [2010-03-12T11:27:16.861139 #13260] WARN -- : Rightscale::HttpConnection : request failure count: 3, exception: #
I, [2010-03-12T11:27:16.861258 #13260] INFO -- : Opening new HTTP connection to lower-case-bucket.10.168.110.121:8773
W, [2010-03-12T11:27:16.865383 #13260] WARN -- : Rightscale::HttpConnection : request failure count: 4, exception: #
W, [2010-03-12T11:27:16.865525 #13260] WARN -- : Rightscale::HttpConnection : re-raising same error: lower-case-bucket.10.168.110.121 temporarily unavailable: (Connection refused - connect(2)) -- error count: 4, error age: 0
RightAws::AwsError: lower-case-bucket.10.168.110.121 temporarily unavailable: (Connection refused - connect(2))
from /usr/lib/ruby/gems/1.8/gems/right_http_connection-1.2.4/lib/right_http_connection.rb:340:in `request'
from /usr/lib/ruby/gems/1.8/gems/right_http_connection-1.2.4/lib/right_http_connection.rb:330:in `loop'
from /usr/lib/ruby/gems/1.8/gems/right_http_connection-1.2.4/lib/right_http_connection.rb:330:in `request'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/awsbase/right_awsbase.rb:345:in `request_info_impl'
from /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/awsbase/benchmark_fix.rb:30:in `add!'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/awsbase/right_awsbase.rb:345:in `request_info_impl'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/s3/right_s3_interface.rb:169:in `request_info'
from /usr/lib/ruby/gems/1.8/gems/right_aws-1.10.0/lib/s3/right_s3_interface.rb:201:in `create_bucket'
from (irb):4
irb(main):005:0> w.create_bucket 'UpperCaseBucket'
I, [2010-03-12T11:27:35.365107 #13260] INFO -- : Opening new HTTP connection to 10.168.110.121:8773
=> true
irb(main):006:0> w.list_all_my_buckets
=> [{:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-02-20T09:10:39.000Z", :name=>"vmlinuz-2.6.18-xenU-ec2-v1.2"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:35:05.000Z", :name=>"AutoInstallApps"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:30:09.000Z", :name=>"KennethBucket"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:22:48.000Z", :name=>"AimonBucket"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-03T07:46:41.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.5"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T11:27:35.000Z", :name=>"UpperCaseBucket"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-09T00:42:38.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.6"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-09T05:46:40.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.7"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:28:43.000Z", :name=>"Clouds"}, {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-09T07:05:47.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.8"}]
irb(main):007:0> w.list_all_my_buckets.last
=> {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-09T07:05:47.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.8"}
irb(main):008:0> w.list_all_my_buckets[3]
=> {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T01:22:48.000Z", :name=>"AimonBucket"}
irb(main):009:0> w.list_all_my_buckets[4]
=> {:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-03T07:46:41.000Z", :name=>"Morph-CentOS-5.4-base-x86_64-v0.1.5"}
irb(main):010:0> w.list_all_my_buckets.select {|b| b[:name] == 'UpperCaseBucket'}
=> [{:owner_id=>"WKy3rMzOWPouVOxK1p3Ar1C2uRBwa2FBXnCw", :owner_display_name=>"admin", :creation_date=>"2010-03-12T11:27:35.000Z", :name=>"UpperCaseBucket"}]

As you can see, when I tried to create a bucket called: lower-case-bucket, I got an error:

[2010-03-12T11:27:16.865525 #13260] WARN -- : Rightscale::HttpConnection : re-raising same error: lower-case-bucket.10.168.110.121 temporarily unavailable: (Connection refused - connect(2)) -- error count: 4, error age: 0
RightAws::AwsError: lower-case-bucket.10.168.110.121 temporarily unavailable: (Connection refused - connect(2))

neil (Offline)
What is going on is that
Posted: Fri, 03/12/2010 - 10:26

What is going on is that RightAWS is interpreting a DNS legal bucket name (in your case "lower-case-bucket") and trying to use the virtual hosting feature of S3.


I, [2010-03-12T11:27:16.842431 #13260] INFO -- : Opening new HTTP connection to lower-case-bucket.10.168.110.121:8773

Since the subdomain "lower-case-bucket.10.168.110.121" does not exist, you are getting a connection refused.

Try changing "-" to "_" in your request. RightAWS will not attempt to use virtual hosting in that case. I'm not sure if there is a programmer configurable way to turn off virtual hosting in RightAWS without modifying/recompiling the source.

Or you can play with the DNS feature in Eucalyptus and make sure that RightAWS connects to the right subdomain (.walrus.).

neil

aimon (Offline)
Hi Neil, ya know I think you
Posted: Sat, 03/13/2010 - 19:44

Hi Neil, ya know I think you are 100% correct! Not sure why I didn't see it :) I will add a *.walrus dns entry which should take care of the issue. Yeah, it would be ideal if that feature can be disabled with a flag in right_aws. We'll do some tests and reply back our results for he benefit of other readers.

Regards,

Aimon Bustardo