Java: Remote host closed connection during handshake
Export PDF
Print-friendly layout with a copyright watermark; choose Save as PDF in the print dialog

原因
TLS 握手中途被服务端断开:JDK 版本过老不支持 TLS 1.3、服务端套件限制,或中间设备掐断握手。
解决
- 加
-Djavax.net.debug=ssl:handshake看断开在哪一步; - 升级 JDK 到 8u261+/11.0.7+ 支持 TLS 1.3;
openssl s_client -connect 域名:443确认服务端正常并记录其协议套件;- 服务端保留 TLSv1.2 兼容旧客户端。