TweetStream::ReconnectError: Failed to reconnect after 7 tries #50

Closed
nateware opened this Issue Oct 29, 2011 · 14 comments

Projects

None yet

10 participants

I've been trying to use this gem, and all I ever get is:

TweetStream::ReconnectError: Failed to reconnect after 7 tries.
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/tweetstream-1.1.1/lib/tweetstream/client.rb:367:in `block (2 levels) in start'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/twitter-stream-0.1.14/lib/twitter/json_stream.rb:140:in `call'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/twitter-stream-0.1.14/lib/twitter/json_stream.rb:140:in `schedule_reconnect'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/twitter-stream-0.1.14/lib/twitter/json_stream.rb:113:in `unbind'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-0.12.10/lib/eventmachine.rb:1417:in `event_callback'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/tweetstream-1.1.1/lib/tweetstream/client.rb:310:in `start'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/tweetstream-1.1.1/lib/tweetstream/client.rb:111:in `filter'
from /Users/nwiger/.rvm/gems/ruby-1.9.2-p290/gems/tweetstream-1.1.1/lib/tweetstream/client.rb:88:in `follow'

I'm using oauth to connect. I've tried yajl based on another comment saying it helped, but in my case it does not.

On Ruby 1.9.2-p290

Can you get it to work with un:pwd instead of oauth? Just as a troubleshooting measure...

Owner
stve commented Oct 31, 2011

My first guess was that there may have been a problem on twitter's side but I didn't see anything mentioning a service interruption from them. Could you try it again? @wesnolte's suggestion to try basic auth is a good one.

jm3 commented Dec 17, 2011

Seeing the same thing today, after three days of successful streaming with no issues. I'm assuming it's a Twitter problem.

Owner
stve commented Dec 18, 2011

Thanks @jm3. I suspect the same. I'm going to close this issue. Please reopen if the problem persists.

@stve stve closed this Dec 18, 2011
genienin commented Jan 4, 2012

I still get the same error by using basic and oauth authentication.

jm3 commented Jan 4, 2012

Wonder if it's possible that your IP address is blocked by Twitter (say, for past abuse by someone else using that same IP).

Try from a different machine?

wesnolte commented Feb 6, 2012

I think I figured out my issue btw. The Twitter docs seem to imply that if they detect a duplicate log in your connection will be closed: https://dev.twitter.com/docs/streaming-api/concepts#connecting. I was using my personal account for dev, but have moved to a dedicated account.

@wesnolte I am also having same error but i script was running properly but after 3 months now i am getting this error, & i was using dedicated account for authentication, but now i am getting error " TweetStream::ReconnectError: Failed to reconnect after 7 tries. " Can you guide me through all this..???

Owner
stve commented Feb 10, 2012

It looks like this could be the result of the switch to SSL. See this pull request on twitter-stream which is the underlying gem: voloko/twitter-stream#25

Due to the inactivity with twitter-stream, I've been writing a new gem for interacting with the twitter streaming api. I'm probably a week or so away from having it wrapped up at which point I'm going to consider switching TweetStream over to it and will have a RC out.

@stve stve reopened this Feb 10, 2012
fetimo commented Feb 24, 2012

I'm getting the same issue with the following code on 3 IP addresses:

TweetStream::Client.new.track('trending topic') do |result|
    p result
end

It had been working fine for months beforehand but as of two days ago it has just stopped working.

@spagalloco do you have a RC of your own gem yet?

Owner
stve commented Feb 25, 2012

Nearly there, hopefully this weekend.

On Feb 24, 2012, at 2:51 PM, Timreply@reply.github.com wrote:

I'm getting the same issue with the following code on 3 IP addresses:

TweetStream::Client.new.track('trending topic') do |result|
p result
end

It had been working fine for months beforehand but as of two days ago it has just stopped working.

@spagalloco do you have a RC of your own gem yet?


Reply to this email directly or view it on GitHub:
#50 (comment)

Same problem with 11 tries...

kolosy commented May 14, 2012

same problem here...

Owner
sferik commented May 26, 2012

This issue ought to be fixed in 2.0, following the switch to em-twitter on the backend.

@sferik sferik closed this May 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment