Closed vmanikes closed 5 years ago
@vmanikes This is most likely not a Spark specific issue. Check for instance this: https://stackoverflow.com/questions/28908835/ssl-peer-shut-down-incorrectly-in-java
The accepted answer says:
That is a problem of security protocol. I am using TLSv1 but the host accept only TLSv1.1 and TLSv1.2 then I changed the protocol in Java with the instruction below:
System.setProperty("https.protocols", "TLSv1.1");
I could also be that you are using own-signed SSL certificates which are not accepted by the trustmanager in the Http client.
I am doing a web app development with Spark and I am hitting my backend server with a POST request using Unirest library to display the data on my web page. Randomly Spark throws the error Remote host closed connection during handshake. I am not sure what is causing this, I tried doing POST with Apache HttpClient but the results were same. Here is the stack trace, can someone help me what is causing this issue: