Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎08-28-2016

Exception while streaming tweets

Hello All, 

I am facing the below problem while streaming tweets from twitter.

 

 

 

16/08/29 03:07:13 ERROR twitter.TwitterSource: Exception while streaming tweets
stream.twitter.com
Relevant discussions can be found on the Internet at:
 http://www.google.co.jp/search?q=ec814753 or
 http://www.google.co.jp/search?q=0a74bd28
TwitterException{exceptionCode=[ec814753-0a74bd28 4eaddaa2-4422e39e], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.3}
 at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:192)
 at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
 at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:89)
 at twitter4j.TwitterStreamImpl.getSampleStream(TwitterStreamImpl.java:160)
 at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:149)
 at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:147)
 at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:426)
Caused by: java.net.UnknownHostException: stream.twitter.com
 at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
 at java.net.Socket.connect(Socket.java:579)
 at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
 at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
 at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
 at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
 at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
 at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)
 at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
 at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
 at twitter4j.internal.http.HttpResponseImpl.<init>(HttpResponseImpl.java:34)
 at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:156)

 

 

Can someone suggest what can be done here

Thanks.

Regards.
Darpan Kulshreshtha

 

Cloudera Employee
Posts: 277
Registered: ‎01-09-2014

Re: Exception while streaming tweets

What is the output of this command:
nslookup stream.twitter.com

If it is not resolving, its possible you have internal DNS issues.

-pd