Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL end of file reached (EOFError) using streaming library #466

Closed
dtuite opened this issue Oct 12, 2013 · 1 comment
Closed

OpenSSL end of file reached (EOFError) using streaming library #466

dtuite opened this issue Oct 12, 2013 · 1 comment

Comments

@dtuite
Copy link

dtuite commented Oct 12, 2013

I have a super simple streaming app using 5.0.0.rc1 on ruby 2.0.0p247.

require 'rubygems' 
require 'bundler/setup'

require 'twitter'

client = Twitter::Streaming::Client.new do |config|
  config.consumer_key        = "KEY"
  config.consumer_secret     = "SECRET"
  config.access_token        = "TOKEN"
  config.access_token_secret = "SECRET"
end

client.sample do |tweet|
  puts tweet
end

When I run it I get the following error:

{:status_code=>401, :header=>{"WWW-Authenticate"=>"OAuth realm=\"Firehose\"", "Content-Type"=>"text/html", "Cache-Control"=>"must-revalidate,no-cache,no-store", "Content-Length"=>"1244", "Connection"=>"close"}}
/Users/davidtuite/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/openssl/buffering.rb:121:in `sysread': end of file reached (EOFError)
    from /Users/davidtuite/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/openssl/buffering.rb:121:in `readpartial'
    from /Users/davidtuite/dev/ruby/relationizer/vendor/bundle/bundler/gems/twitter-a5aaf321fcdf/lib/twitter/streaming/connection.rb:15:in `stream'
    from /Users/davidtuite/dev/ruby/relationizer/vendor/bundle/bundler/gems/twitter-a5aaf321fcdf/lib/twitter/streaming/client.rb:59:in `request'
    from /Users/davidtuite/dev/ruby/relationizer/vendor/bundle/bundler/gems/twitter-a5aaf321fcdf/lib/twitter/streaming/client.rb:26:in `sample'
    from app.rb:24:in `<main>'

I've tried changing the adapter to typheous (as suggested in #369 ) using the method described in the readme but middleware= isn't defined on Client instances anymore apparently.

I'll try to diagnose more if someone can point me in the right direction.

@tliff
Copy link

tliff commented Nov 4, 2013

I just spent an hour on this. Have you checked your system clock?
For me it was set 10 minutes to the future which seems to cause issues.

@sferik sferik closed this as completed Nov 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants