Cause of “Software caused connection abort: recv failed”

前端 未结 3 1910
时光取名叫无心
时光取名叫无心 2021-01-20 18:35

I found a client/server code and I am getting this error:

java.net.SocketException: Software caused connection abort: recv failed

3条回答
  •  囚心锁ツ
    2021-01-20 18:58

    In my case it was related to Client authentication. It happened to me when I was trying to access SOAP API from Java code without setting keystore/keystorePassword and from the stacktrace there is no way we can figure out that there's a problem with Authentication.

    After I added following lines before making call to SOAP API and it worked as expected.

    System.setProperty("javax.net.ssl.keyStoreType", "Your Cert Type");
    System.setProperty("javax.net.ssl.keyStore", "Your cert path");
    System.setProperty("javax.net.ssl.keyStorePassword", "Password");
    

提交回复
热议问题