From jan.bromberger at gmx.de Wed May 28 10:37:40 2008 From: jan.bromberger at gmx.de (Jan Bromberger) Date: Wed, 28 May 2008 16:37:40 +0200 Subject: [s3-dev] Cannot access EU buckets, although specifying given endpoint as :server Message-ID: <16E6806D-D059-42F3-A04B-FE26A9BF8CDC@gmx.de> Hi everybody, while I can access US buckets fine, I fail to access Europe buckets. After I found out that I have to use subdomain instead of path to specify my bucket, I changed the :server parameter of establish_connection! accordingly, but still get the same error message response: Can anybody tell what I'm doing wrong? Cheers from Munich Jan AWS::S3::Base.establish_connection!(:server => 'platinnetzd.s3.amazonaws.com', :access_key_id => 'AAAAAAAA', :secret_access_key => 'BBBBBBBBBBBBB') => #, @options = {:access_key_id = > "AAAAAAAA ", :port = > 80 , :secret_access_key = > "BBBBBBBBBBBBB ", :persistent=>true, :server=>"platinnetzd.s3.amazonaws.com"}, @secret_access_key= BBBBBBBBBBBBB", @access_key_id="AAAAAAAA"> AWS::S3::Bucket.find('platinnetzd') => AWS::S3::PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. PermanentRedirect The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. 728FC98925062009 platinnetzd.s3.amazonaws.com iTBibbLybjDmq2bXCGZpZ9FjQjUq4/0GQ1A/axf +AbaVXsZ2b6n6xLbUq1r5cBhi platinnetzd From hosiawak at gmail.com Wed May 28 10:54:58 2008 From: hosiawak at gmail.com (Karol Hosiawa) Date: Wed, 28 May 2008 15:54:58 +0100 Subject: [s3-dev] Cannot access EU buckets, although specifying given endpoint as :server In-Reply-To: <16E6806D-D059-42F3-A04B-FE26A9BF8CDC@gmx.de> References: <16E6806D-D059-42F3-A04B-FE26A9BF8CDC@gmx.de> Message-ID: <20080528155458.6a114a78.hosiawak@gmail.com> On Wed, 28 May 2008 16:37:40 +0200 Jan Bromberger wrote: > Hi everybody, > > while I can access US buckets fine, I fail to access Europe buckets. > > After I found out that I have to use subdomain instead of path to > specify my bucket, I changed the :server parameter of > establish_connection! accordingly, but still get the same error > message response: > > Can anybody tell what I'm doing wrong? > > Cheers from Munich > Jan Currently the aws/s3 Ruby library doesn't handle European buckets at all. You can either use US buckets or write your own library. More about aws/s3 problems I encountered and how I solved them: http://www.blik.it/2008/5/15/aws-s3-eoferror-sysread-error-and-ruby-threads Cheers from Sheffield, UK -- Karol Hosiawa From jan.bromberger at gmx.de Wed May 28 13:39:14 2008 From: jan.bromberger at gmx.de (Jan Bromberger) Date: Wed, 28 May 2008 19:39:14 +0200 Subject: [s3-dev] Cannot access EU buckets, although specifying given endpoint as :server In-Reply-To: <20080528155458.6a114a78.hosiawak@gmail.com> References: <16E6806D-D059-42F3-A04B-FE26A9BF8CDC@gmx.de> <20080528155458.6a114a78.hosiawak@gmail.com> Message-ID: On 28. 05.2008, at 16:54, Karol Hosiawa wrote: > On Wed, 28 May 2008 16:37:40 +0200 > Jan Bromberger wrote: > >> Hi everybody, >> >> while I can access US buckets fine, I fail to access Europe buckets. >> >> After I found out that I have to use subdomain instead of path to >> specify my bucket, I changed the :server parameter of >> establish_connection! accordingly, but still get the same error >> message response: >> >> Can anybody tell what I'm doing wrong? >> >> Cheers from Munich >> Jan > > Currently the aws/s3 Ruby library doesn't handle European buckets at > all. You can either use US buckets or write your own library. > > More about aws/s3 problems I encountered and how I solved them: > > http://www.blik.it/2008/5/15/aws-s3-eoferror-sysread-error-and-ruby-threads > > Cheers from Sheffield, UK There's not much to be found on the web on using European buckets with ruby. I thought it was as easy as specifying the right server, so the plugin doesn't have to know how to handle it at all. But I guess that's not the case. Thanks for your response! From mdchaney at michaelchaney.com Wed May 28 15:03:08 2008 From: mdchaney at michaelchaney.com (Michael Chaney) Date: Wed, 28 May 2008 14:03:08 -0500 Subject: [s3-dev] Cannot access EU buckets, although specifying given endpoint as :server In-Reply-To: References: <16E6806D-D059-42F3-A04B-FE26A9BF8CDC@gmx.de> <20080528155458.6a114a78.hosiawak@gmail.com> Message-ID: <3b456edd0805281203h2723279avc443c834a1c7f301@mail.gmail.com> > There's not much to be found on the web on using European buckets with ruby. > I thought it was as easy as specifying the right server, so the plugin > doesn't have to know how to handle it at all. > But I guess that's not the case. What is the difference, besides the server name? Michael -- Michael Darrin Chaney, Sr. mdchaney at michaelchaney.com http://www.michaelchaney.com/ From jan.bromberger at gmx.de Wed May 28 16:56:23 2008 From: jan.bromberger at gmx.de (Jan Bromberger) Date: Wed, 28 May 2008 22:56:23 +0200 Subject: [s3-dev] Cannot access EU buckets, although specifying given endpoint as :server In-Reply-To: <3b456edd0805281203h2723279avc443c834a1c7f301@mail.gmail.com> References: <16E6806D-D059-42F3-A04B-FE26A9BF8CDC@gmx.de> <20080528155458.6a114a78.hosiawak@gmail.com> <3b456edd0805281203h2723279avc443c834a1c7f301@mail.gmail.com> Message-ID: <6D6AA41A-6CE6-453A-AF7C-0A61AC9F9319@gmx.de> On 28. 05.2008, at 21:03, Michael Chaney wrote: >> There's not much to be found on the web on using European buckets >> with ruby. >> I thought it was as easy as specifying the right server, so the >> plugin >> doesn't have to know how to handle it at all. >> But I guess that's not the case. > > What is the difference, besides the server name? Well, I still don't know. But I set the server name to the "endpoint" stated in the PermanentRedirect and it still doesn't work. So there must be something else. -- Jan From jan.bromberger at gmx.de Thu May 29 08:39:49 2008 From: jan.bromberger at gmx.de (Jan Bromberger) Date: Thu, 29 May 2008 14:39:49 +0200 Subject: [s3-dev] Cannot access EU buckets, although specifying given endpoint as :server In-Reply-To: <6D6AA41A-6CE6-453A-AF7C-0A61AC9F9319@gmx.de> References: <16E6806D-D059-42F3-A04B-FE26A9BF8CDC@gmx.de> <20080528155458.6a114a78.hosiawak@gmail.com> <3b456edd0805281203h2723279avc443c834a1c7f301@mail.gmail.com> <6D6AA41A-6CE6-453A-AF7C-0A61AC9F9319@gmx.de> Message-ID: <1C264BE5-DA9F-48D3-B83F-93EA9FA3C5E3@gmx.de> On 28. 05.2008, at 22:56, Jan Bromberger wrote: > On 28. 05.2008, at 21:03, Michael Chaney wrote: > >>> There's not much to be found on the web on using European buckets >>> with ruby. >>> I thought it was as easy as specifying the right server, so the >>> plugin >>> doesn't have to know how to handle it at all. >>> But I guess that's not the case. >> >> What is the difference, besides the server name? > > Well, I still don't know. But I set the server name to the > "endpoint" stated in the PermanentRedirect and it still doesn't work. > > So there must be something else. > > -- Jan It looks like even when you connect to the correct server, the gem still sends relative paths. After I took out the bucket prefixing of paths, it started working. maybe something like this should be done: # bucket.rb, lines 177ff def path(name, options = {}) if name.is_a?(Hash) options = name name = nil end "/#{bucket_name(name) unless bucket_name(name) == connection.subdomain}#{RequestOptions.process(options).to_query_string}" end But I have only started to dig into this, so this is only a first idea. I wonder... why isn't there just a server like s3eu.amazonaws.com that takes pathbs like s3.amazonaws.com does for US buckets? Or alternatively they could just live with a path if it is to the same bucket or a bucket in the same realm... this really sucks. ;-) Cheers Jan From jan.bromberger at gmx.de Thu May 29 09:07:27 2008 From: jan.bromberger at gmx.de (Jan Bromberger) Date: Thu, 29 May 2008 15:07:27 +0200 Subject: [s3-dev] Connection.subdomain wrong pattern Message-ID: By the way, the subdomain pattern is wrong, as the period '.' character is actually allowed in bucket names. See: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ # connection.rb, line 69 def subdomain http.address[/^([^.]+).#{DEFAULT_HOST}$/, 1] end should be: http.address[/^(.+)\.#{DEFAULT_HOST}$/, 1] or something fancy like http.address[/^([a-z0-9][a-z0-9._-]{0;61}[a-z0-9]) \.#{DEFAULT_HOST}$/, 1] (but what's the point in restricting this when the connect has succeeded...) Also notice the \. instead of the . before DEFAULT_HOST. Cheers Jan P.S.: I would like to report this, but RubyForge gives me a nice and warm Error Permission: User Not Found