Error 420 on first request


#1

I’m trying to set up connection to public stream endpoint using Spring XD. Right after stream deployment, i can see that stream read times out with response: 420 (Enhance Your Calm).
Ok, “Rate Limited”. It’s a very first connection, so it should not happen because i’m trying to connect “too often”. First thing i tried is to regenerate tokens and secrets to make sure that some sneaky application living on long time forgotten development server does not use same credentials; then test it with Twitter Search API. Search works well, Streaming still returns 420.

Some background information:
Machine is on Windows Azure with unique IP; however, who knows what king of stuff was happening from this address before it was assigned to us.
SpringXD is 1.1.0, Stream definition would look like:
twitterstream --consumerKey=myconsumerkey --consumerSecret=myconsumersecret --track=‘track me, track him’ | mongodb --databaseName=Data --collectionName=Goodies --username=Someuser --password=somepassword --authenticationDatabaseName=Data

Any suggestions to test something else?


#2

I’m having the same problem, and my inability to find an explanation is driving me crazy!

I’m conducting research for a public institution, and am filtering via bounded areas.


#3

I’ll be honest; I’ve never tried the setup you explained. The best I can suggest is:

1.) Contact the author of this post, who seems to have done something similar: https://spring.io/guides/gs/spring-xd/

2.) Install python and run Tweepy. I’ve had good success with it: http://www.tweepy.org/


#4

Getting the same error following this post : https://dataissexy.wordpress.com/springxd-twitter-analytics/

00:20:20,711 WARN task-scheduler-6 client.RestTemplate:524 - GET request for “https://stream.twitter.com/1.1/statuses/filter.json?language=en_CA%3Aen&track=%23GreenHairDontCare” resulted in 420 (Enhance Your Calm); invoking error handler
00:20:20,712 WARN task-scheduler-6 twitter.TwitterStreamChannelAdapter:257 - Rate limit error, waiting for 240 seconds before restarting

Trying to find out what it means… and how I can fix this. Will post on the original post and see I someone has a solution.


#5

Solved. I got the error using an old version of Spring XD (same as in the post I refered to: spring-xd-1.0.0.M3). I instead downloaded the latest version available (1.2.0.RC1), created a twitterstream and had no error this time. It works, I got the steam filling in my file with JSON tweets.


#6

Phew! Thanks so much for updating our community here!


#7