java.net.SocketException: Connection reset

前端 未结 10 1409
慢半拍i
慢半拍i 2020-11-22 03:02

I am getting the following error trying to read from a socket. I\'m doing a readInt() on that InputStream, and I am getting this error. Perusing th

10条回答
  •  忘了有多久
    2020-11-22 04:04

    Check your server's Java version. Happened to me because my Weblogic 10.3.6 was on JDK 1.7.0_75 which was on TLSv1. The rest endpoint I was trying to consume was shutting down anything below TLSv1.2.

    By default Weblogic was trying to negotiate the strongest shared protocol. See details here: Issues with setting https.protocols System Property for HTTPS connections.

    I added verbose SSL logging to identify the supported TLS. This indicated TLSv1 was being used for the handshake.
    -Djavax.net.debug=ssl:handshake:verbose:keymanager:trustmanager -Djava.security.debug=access:stack

    I resolved this by pushing the feature out to our JDK8-compatible product, JDK8 defaults to TLSv1.2. For those restricted to JDK7, I also successfully tested a workaround for Java 7 by upgrading to TLSv1.2. I used this answer: How to enable TLS 1.2 in Java 7

提交回复
热议问题