Error 420 on first request


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?


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.


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:

2.) Install python and run Tweepy. I’ve had good success with it:


Getting the same error following this post :

00:20:20,711 WARN task-scheduler-6 client.RestTemplate:524 - GET request for “” 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.


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.


Phew! Thanks so much for updating our community here!