Invalid Excon request keys: :scheme, :host #2284

Closed
9mm opened this Issue Oct 18, 2013 · 32 comments

Projects

None yet
@9mm
9mm commented Oct 18, 2013

I am using Nokogiri to scrape my old site and upload the 400 pages of content to my new site. There are a lot of file uploads that I need to do (carrierwave), and this was working perfect before I updated fog/excon.

Now I get this error: Invalid Excon request keys: :scheme, :host

My script involves downloading and uploading 200mb files so it makes it kind of a pain to debug for my exact use-case, so I'm hoping someone has an idea before I do that.

Edit: I forgot to mention, this is for S3.

Thanks!

@JacobEvelyn

Same here. I'm not sure if this is related to #2248 or not (slightly different error message).

@ghost
ghost commented Oct 18, 2013

This has been fixed in master. They're just warnings, so your requests should still be working.

@9mm
9mm commented Oct 18, 2013

Ah I see. Here is a new one I just got recently, a minute ago. Not entirely sure if related, but it looks as if so. In this case, it aborts completely.

Excon::Errors::SocketError: getaddrinfo: nodename nor servname provided, or not known (SocketError)
from /Users/Xyz/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.27.6/lib/excon/socket.rb:138:in `getaddrinfo'
@ghost
ghost commented Oct 18, 2013

@9mm That's unrelated. Probably a DNS issue.

@mikeni
mikeni commented Oct 18, 2013

im getting too
Invalid Excon request keys: :scheme, :host

@geemus
Member
geemus commented Oct 18, 2013

With the latest version this should be a warning, rather than an error. So you should be able to safely ignore it. I'm happy to look at scripts and give you pointers about how to fix it also. Basically scheme/host can be passed to a new connection, but shouldn't be passed to subsequent requests.

@9mm as @burns said, getaddrinfo: nodename nor servname provided, or not known (SocketError) is what I would expect to see when I'm having connectivity issues, rather than something wrong with excon per se.

@kurotek
kurotek commented Oct 18, 2013

I noticed the same issue uploading to S3 after I updated my gems.

I believe I've narrowed it down to the call:

connection.directories.get("BUCKET_NAME")
Invalid Excon request keys: :scheme, :host
/Users/user_name/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.27.6/lib/excon/connection.rb:232:in `request'
/Users/user_name/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.16.0/lib/fog/xml/sax_parser_connection.rb:36:in `request'

My script is just a simple rake task to upload a folders contents to an s3 bucket. Here is everything from the rake task up to the point it fails.

connection = Fog::Storage.new({
    :provider                 => 'AWS',
    :aws_access_key_id        => ENV['AWS_ACCESS_KEY_ID'],
    :aws_secret_access_key    => ENV['AWS_SECRET_ACCESS_KEY']
})

directory = connection.directories.get("BUCKET_NAME")
@kurotek
kurotek commented Oct 18, 2013

Also, for anyone who finds this thread via google, and is trying to solve the issue quickly.
you can try and update your Gemfile to pull directly from the repo until the rubygems version is updated.

gem 'fog', :git => 'https://github.com/fog/fog.git'
@mikeni
mikeni commented Oct 18, 2013

thanks

@geemus
Member
geemus commented Oct 18, 2013

Ah, yeah. I think we fixed this just after the last release.

@karlfreeman karlfreeman referenced this issue in middleman-contrib/middleman-sync Oct 19, 2013
Closed

Error when syncing to S3 #28

@bousquet
Contributor

I'm still getting Invalid Excon request keys errors on master:

Invalid Excon request keys: :host
.../gems/excon-0.27.6/lib/excon/connection.rb:232:in `request'
.../gems/fog-588535326fde/lib/fog/xml/sax_parser_connection.rb:36:in `request'
.../gems/fog-588535326fde/lib/fog/core/deprecated/connection.rb:18:in `request'
.../gems/fog-588535326fde/lib/fog/aws/iam.rb:207:in `_request'
.../gems/fog-588535326fde/lib/fog/aws/iam.rb:202:in `request'
.../gems/fog-588535326fde/lib/fog/aws/requests/iam/list_users.rb:36:in `list_users'
@josegonzalez
Contributor

@geemus could you release a new version of fog? Would be lovely to have the excon issues fixed in prod :)

@geemus
Member
geemus commented Oct 25, 2013

Yeah, I hope to soon. There are a couple other nearly-done things relate to
jruby I want to try to get in first though. Still, hopefully quite soon.

On Thu, Oct 24, 2013 at 10:08 PM, Jose Diaz-Gonzalez <
notifications@github.com> wrote:

@geemus https://github.com/geemus could you release a new version of
fog? Would be lovely to have the excon issues fixed in prod :)


Reply to this email directly or view it on GitHubhttps://github.com/fog/fog/issues/2284#issuecomment-27054991
.

@thibaudgg

I also got Invalid Excon request keys: :scheme, :host warning with last release of fog (1.16.0) but when I try fog master I get a nastier Excon error:

Excon::Errors::SocketError: hostname "xxx.yyy.s3.amazonaws.com" does not match the server certificate (OpenSSL::SSL::SSLError)

My s3 bucket name, contains dot (yeah I know it's bad), and it seems to fail badly if host isn't sent. Any idea about how fix it? (I used fog via CarrierWave). Thanks!

@ghost
ghost commented Oct 26, 2013

@thibaudgg You might try the path_style option. See carrierwaveuploader/carrierwave#1076

@thibaudgg

@burns I'll try that thanks!

@bousquet
Contributor

I renamed by bucket to remove the dots. Not a solution for everyone, but it fixed my issue. Better if it doesn't appear to be a fqdn anyways.

@thibaudgg

@burns it works perfectly. Thanks!

@geemus
Member
geemus commented Oct 28, 2013

@burns - thanks for the help!

I'm going to close this (all the associated errors I'm aware of have been poked and prodded out on master I think).

@geemus geemus closed this Oct 28, 2013
@josegonzalez
Contributor

@geemus ping for a new release :)

@geemus
Member
geemus commented Oct 28, 2013

@josegonzalez good call. Should be quite soon, but was trying to dot i's and cross t's still. Maybe this afternoon if things go well. Sorry for the delay.

@josegonzalez
Contributor

zomg dot faster! :)

On Mon, Oct 28, 2013 at 10:56 AM, Wesley Beary notifications@github.comwrote:

@josegonzalez https://github.com/josegonzalez good call. Should be
quite soon, but was trying to dot i's and cross t's still. Maybe this
afternoon if things go well. Sorry for the delay.


Reply to this email directly or view it on GitHubhttps://github.com/fog/fog/issues/2284#issuecomment-27218408
.

@konklone

For anyone watching/finding this thread -- it's published as of today, and upgrading to 1.17.0 successfully removed all my errors/warnings.

@konklone

(Though it did add a new warning about installing an optional unf gem, which I added to my Gemfile and installed, and got that to go away.)

@jjrussell

I'm still getting this error with fog 1.18.0 when using fetching cloudwatch metrics

[excon][WARNING] Invalid Excon request keys: :host
/Users/jjrussell/.rvm/gems/ruby-1.9.3-p448/gems/excon-0.28.0/lib/excon/connection.rb:217:in `request'
/Users/jjrussell/.rvm/gems/ruby-1.9.3-p448/gems/fog-1.18.0/lib/fog/xml/sax_parser_connection.rb:36:in `request'
/Users/jjrussell/.rvm/gems/ruby-1.9.3-p448/gems/fog-1.18.0/lib/fog/core/deprecated/connection.rb:18:in `request'
/Users/jjrussell/.rvm/gems/ruby-1.9.3-p448/gems/fog-1.18.0/lib/fog/aws/cloud_watch.rb:153:in `_request'
/Users/jjrussell/.rvm/gems/ruby-1.9.3-p448/gems/fog-1.18.0/lib/fog/aws/cloud_watch.rb:148:in `request'
/Users/jjrussell/.rvm/gems/ruby-1.9.3-p448/gems/fog-1.18.0/lib/fog/aws/requests/cloud_watch/get_metric_statistics.rb:42:in `get_metric_statistics'
@ghost
ghost commented Nov 1, 2013

@jjrussell #2349 should fix it.

@jjrussell

Sweet, thanks @burns.

@geemus
Member
geemus commented Nov 1, 2013

Thanks!

@masterkain
Contributor
[excon][WARNING] Invalid Excon request keys: :host
/Users/kain/.rvm/gems/ruby-2.1.0-preview1@myapp/gems/excon-0.28.0/lib/excon/connection.rb:217:in `request'
/Users/kain/.rvm/gems/ruby-2.1.0-preview1@ myapp/gems/fog-1.18.0/lib/fog/xml/sax_parser_connection.rb:36:in `request'
/Users/kain/.rvm/gems/ruby-2.1.0-preview1@ myapp/gems/fog-1.18.0/lib/fog/core/deprecated/connection.rb:18:in `request'
/Users/kain/.rvm/gems/ruby-2.1.0-preview1@ myapp/gems/fog-1.18.0/lib/fog/aws/sqs.rb:144:in `request'
/Users/kain/.rvm/gems/ruby-2.1.0-preview1@ myapp/gems/fog-1.18.0/lib/fog/aws/requests/sqs/get_queue_attributes.rb:19:in `get_queue_attributes'
@geemus geemus added a commit that referenced this issue Nov 12, 2013
@geemus geemus [aws|sqs] remove host/port from request
see #2284
8c5ea5d
@geemus
Member
geemus commented Nov 12, 2013

@masterkain ^ that should fix it.

@smith186 smith186 added a commit to red5studios/fog that referenced this issue Jan 8, 2014
@smith186 smith186 [aws|fog] Don't pass :host to Excon request
See issue #2284
d1ea391
@therobwatson

For those who don't want to update their copy of Fog, if running your script command line, you can precede it with "ruby -W0", which ignores warnings. E.g. "ruby -W0 .\script.rb params params params blah blah"

@geemus
Member
geemus commented Jan 24, 2014

@therobwatson - good call, thanks for the tip.

@rkh rkh referenced this issue in travis-ci/fog Jan 26, 2014
Closed

sync with upstream (or drop fork) #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment