且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Java8,HttpClient,接收“收到致命警报:handshake_failure";

更新时间:2022-06-09 05:19:58

根据 ssllabs,服务器没问题,运行java7+.值得注意的是,不支持 SNI 的客户端将无法与服务器通信.在您的调试转储中,确实缺少 SNI,这很可能是问题所在.

According to ssllabs, the server is all right, and it works java7+. Notably, clients that don't support SNI will fail talking to the server. In your debug dump, SNI is indeed missing, and that's likely the problem.

在 java7+ 上应该默认启用 SNI.您的堆栈跟踪显示它确实在 java8 上.此链接可能对您有所帮助.

SNI should be enabled by default on java7+. Your stacktrace shows that indeed it's on java8. This link might help you.