Hello,
I was using the twitter filter streaming api without any issues. From last two days i started getting error " SSL peer shut down incorrectly" there after if i try to reconnect I get 401 error. But if I try to reconnect after some minutes it will work again SSL error will repeat after some time.
I am using Apache HTTP client with following SSL config
SSLContext sslcontext = SSLContexts.custom()
.loadTrustMaterial(trustStore)
.build();
// Allow TLSv1 protocol only
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
sslcontext,
new String[] { “SSLv3”, “TLSv1” },null,
// new String[] { “SSL_RSA_WITH_RC4_128_MD5” },
SSLConnectionSocketFactory.STRICT_HOSTNAME_VERIFIER);
httpclient = HttpClients.custom()
.setSSLSocketFactory(sslsf)
.build();
Also i imported twitter certificate using below command
keytool -import -v -alias twitter-cert -file /opt/java/certs/twitterapi.cer -keystore /opt/java/jdk1.7.0_51/jre/lib/security/cacerts -storepass changeit
Still I am getting this issue.
Waiting for your help.