SSL Connection Reset
It is an SSL version problem. The server only supports SSLv3, and Java will start at v2, and attempt to negotiate upwards, but not all servers support that type of negotiation.
Forcing java to use SSLv3 only is the only solution I'm aware of.
Edit, there are two ways to do this that I'm aware of:
If you are creating the socket by hand, you can set the enabled protocols
socket.setEnabledProtocols(new String[] { "SSLv3" });
If you are using a higher level library, you probably need to set all SSL requests to use v3 only, which is accomplished with the
"https.protocols"
system property:java -Dhttps.protocols=SSLv3
What's causing my java.net.SocketException: Connection reset?
The javadoc for SocketException states that it is
Thrown to indicate that there is an error in the underlying protocol such as a TCP error
In your case it seems that the connection has been closed by the server end of the connection. This could be an issue with the request you are sending or an issue at their end.
To aid debugging you could look at using a tool such as Wireshark to view the actual network packets. Also, is there an alternative client to your Java code that you could use to test the web service? If this was successful it could indicate a bug in the Java code.
As you are using Commons HTTP Client have a look at the Common HTTP Client Logging Guide. This will tell you how to log the request at the HTTP level.
java.net.SocketException: Connection reset (SSL)
These are all sites which require the TLS SNI extension and fail otherwise. While Java 7+ provide this extension it does not add it in all cases. From https://javabreaks.blogspot.de/2015/12/java-ssl-handshake-with-server-name.html:
Whenever a custom HostNameVerifier is provided, java 8 fails to add the SNI extension header ...
It looks like your code does set a custom HostNameVerifier which is usually a bad idea anyway. Thus, either make sure your code does not set a custom HostNameVerifier or follow the workaround outlined in the provided link.
Related Topics
Can Not Find the Tag Library Descriptor for "Http://Java.Sun.Com/Jsp/Jstl/Core"
Jpanel & Components Change Position Automatically
Getting Spring Application Context
Javafx - How to Create a Thin Menubar
Understand Arraylist Indexoutofboundsexception in Android
Java Doesn't Work with Regex \S, Says: Invalid Escape Sequence
How to Sort Alphabetically While Ignoring Case Sensitive
How to Prevent Gson from Expressing Integers as Floats
How to Get Elements of Fragments Created by Viewpager in Mainactivity
Java Output Formatting for Strings
Use of Initializers VS Constructors in Java
How to Set -Fx-Max-Width to Use_Pref_Size in Javafx CSS
Customised Listview Using Arrayadapter Class in Android
Error Launching Android Studio: Failed to Create Jvm: Error Code-6