Solution to error in Remote host closed connection during handshake and SSL peer shut down incorrectly

Source: Internet
Author: User
caused By:javax.net.ssl.SSLHandshakeException:Remote host closed connection during handshake at Com.sun.net.ssl.inte Rnal.ssl.SSLSocketImpl.readRecord (sslsocketimpl.java:882) at Com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake (sslsocketimpl.java:1188) at Com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake (sslsocketimpl.java:1215) at Com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake (sslsocketimpl.java:1199) at Sun.net.www.protocol.https.HttpsClient.afterConnect (httpsclient.java:434) at Sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect (Abstractdelegatehttpsurlconnection.java : 166) at Sun.net.www.protocol.https.HttpsURLConnectionImpl.connect (httpsurlconnectionimpl.java:133) ... caused By:java.io.EOFException:SSL peer shut down incorrectly at Com.sun.net.ssl.internal.ssl.InputRecord.re
AD (inputrecord.java:462) at Com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord (sslsocketimpl.java:863)    ... More


Use the Sina Weibo API today to get public data. When the data record reached about 1.37 million, the program reported as error.

Finally found the answer in StackOverflow: Most of it is due to the JDK version. Instead of JDK 1.7, the program has not reported the above error.

The server runs Tomcat 7, which runs in similar environments as Java 7, Linux, and Amazon EC2. The same client requires running in the same version of the Java environment. The article further raises a profound question: whether the same encryption or protocol settings are available in Java 6, allowing the program to function correctly in the Java 6 environment.

There are problems like Java, and the error, using a foreign search engine easier to find the answer.

Note: The problem recurs, and it has to do with Internet connection 2014-01-05


Original address of the solution: http://stackoverflow.com/questions/15589880/ HOW-TO-MAKE-JAVA-6-WHICH-FAILS-SSL-CONNECTION-WITH-SSL-PEER-SHUT-DOWN-INCORREC Click on the Open link

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.