Java api 2.2 : Warning: peer not authenticated


#1

Hi,

I tried the “Football” example that is including with the 2.2.0 release of the datasift library.

I keep getting this message and am unable to consume any messages:


Creating user…
Getting the consumer…
Consuming…

Warning: peer not authenticated
Warning: Attempting to reconnect after 1 second
Warning: peer not authenticated
Warning: Attempting to reconnect after 2 seconds
Warning: peer not authenticated
Warning: Attempting to reconnect after 3 seconds
Warning: peer not authenticated
Warning: Attempting to reconnect after 4 seconds

Any idea?
Thanks


#2

Are you trying to run the Football example from behind a corporate firewall or proxy server? These can often cause problems if not configured to allow WebSocket/HTTP streaming. Have you tried any of the other examples?


#3

Hi Jason, I’m trying this from home so no firewall is involved. I ran the same example using the NodeJS extension and no problem there!

I’ve actually switched to NodeJS now as it’s more lightweight than the Java equivalent but it would be nice to figure out the reasons of the problem anyways :slight_smile:

Cheers


#4

This could be something to do with the SSL. Try passing false as the third parameter to the new User call to disable SSL:

User user = new User(Config.username, Config.api_key, false);

I have been unable to reproduce this behaviour so far - I would be interested to find out whats causing this.