Java Springboot javax.net.ssl.SSLException: Connection reset解决方案
接口设置HTTPS TLS1.2后,随机出现SSLException: Connection reset报错:
javax.net.ssl.SSLException: Connection reset
at sun.security.ssl.Alert.createSSLException(Alert.java:127) ~[na:1.8.0_312]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:324) ~[na:1.8.0_312]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:267) ~[na:1.8.0_312]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:262) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1563) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketImpl.access$400(SSLSocketImpl.java:73) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:973) ~[na:1.8.0_312]
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[da-qa-1.0-SNAPSHOT.jar:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[da-qa-1.0-SNAPSHOT.jar:na]
at com.cooladata.da.TrackTask.sendTrack(TrackTask.java:62) [da-qa-1.0-SNAPSHOT.jar:na]
at com.cooladata.da.TrackTask.startListening(TrackTask.java:108) [da-qa-1.0-SNAPSHOT.jar:na]
at com.cooladata.da.TrackTask.run(TrackTask.java:120) [da-qa-1.0-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_312]
Suppressed: java.net.SocketException: Broken pipe (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.8.0_312]
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[na:1.8.0_312]
at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:81) ~[na:1.8.0_312]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:355) ~[na:1.8.0_312]
... 26 common frames omitted
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[na:1.8.0_312]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:464) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:68) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1341) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketImpl.access$300(SSLSocketImpl.java:73) ~[na:1.8.0_312]
at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:957) ~[na:1.8.0_312]
... 21 common frames omitted
httpclinets设置成 .setConnectionReuseStrategy(NoConnectionReuseStrategy.INSTANCE)
httpClient = HttpClients.custom().setDefaultRequestConfig(config)
.setConnectionReuseStrategy(NoConnectionReuseStrategy.INSTANCE)
.setConnectionManager(poolingConnManager)
.build();
Java Springboot javax.net.ssl.SSLException: Connection reset解决方案的更多相关文章
- presto——java.sql.SQLException: Error executing query与javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?异常问题
使用presto的时候以mysql为presto的数据源 安装的presto是0.95版本:使用的presto-jdbc是0.202的,这里使用jdbc去访问时候,connection可以链接成功,但 ...
- javax.net.ssl.SSLException: java.lang.UnsupportedOperationException
Loading KeyStore C:\Tool\jdk1.7.0_71\jre\lib\security\jssecacerts... Opening connection to www.googl ...
- 微信证书 javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
这几天在做微信退款接口,按照api写完之后,在本地测试了下没有问题,于是交给测试让他们在测试环境开测.他们说退款没有成功,感觉去查日志,发现后台报了 javax.net.ssl.SSLExceptio ...
- JAVA连接MySQ报错:Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version at sun.security.ssl.Al ...
- SO2O連接報錯javax.net.ssl.SSLException: Received fatal alert: protocol_version)
原文:https://blog.csdn.net/gudejundd/article/details/89640741 1.什么是TLSSSL 是“Secure Sockets Layer”的缩写,中 ...
- java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
- javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection
客户端向服务器发送数据时,份两种情况,SSL单向验证和SSL双向验证 1.SSL单向验证时 代码如下: import java.io.IOException; import java.util.Has ...
- 高并发下载tomcat下的文件时,发生java.net.SocketException: Connection reset解决方案
(1)问题产生:使用500个线程并发下载tomcat工程中的一个文件时,服务器出现java.net.SocketException: Connection reset异常, 客户端出现connect ...
- 解决 javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair
解决这个异常的重点就在于下载两个jar包: bcprov-ext-jdk15on-1.52 bcprov-jdk15on-1.52 传送门:https://stackoverflow.com/ques ...
- javax.net.ssl.SSLException: Certificate doesn't match any of the subject alternative names
问题:在使用 org.apache.http.*下的 CloseableHttpClient 发送https请求时报了以上错误 解决方案一:使用java.net.HttpURLConnection i ...
随机推荐
- LeetCode刷题日记 2020/8/23
题目描述 给定范围 [m, n],其中 0 <= m <= n <= 2147483647,返回此范围内所有数字的按位与(包含 m, n 两端点). 示例 1: 输入: [5,7] ...
- webpack与其常见loader加载器使用方式
webpack是什么 webpack是前端项目工程化的具体解决方案. 主要功能:提供了友好的前端模块化开发支持,支持代码压缩混淆(去除空格和注释,让文件体积更小),处理浏览器端JS的兼容性(将箭头函数 ...
- Shopee x JuiceFS:ClickHouse 冷热数据分离存储架构与实践
本文来自 shopee 技术团队 摘要 Shopee ClickHouse 是一款基于开源数据库 ClickHouse 做二次开发.架构演进的高可用分布式分析型数据库.本文将主要介绍 Shopee C ...
- ABC 332
ABCDF 都赛时做出来了. E \(\displaystyle\dfrac{1}{D}\sum_{i=1}^D (x_i-\overline{x})^2=\dfrac{1}{D}(\sum_{i=1 ...
- 2023牛客暑期多校训练营6 ABCEG
比赛链接 A 题解 方法一 知识点:并查集,树形dp,背包dp. 因为需要路径中的最大值,因此考虑按边权从小到大加入图中,保证通过这条边产生贡献的点对已经全部出现. 在加边的同时进行树上背包,答案存在 ...
- Layui项目实战干货总结(精品)
写代码时遇到的知识点拿出来分享. 1.layer弹出层显示在top顶层 // 监听工具条 table.on('tool(tb-book)', function (obj) { var data = o ...
- 《系列二》-- 11、Aware是什么
目录 正文 阅读之前要注意的东西:本文就是主打流水账式的源码阅读,主导的是一个参考,主要内容需要看官自己去源码中验证.全系列文章基于 spring 源码 5.x 版本. 写在开始前的话: 阅读spri ...
- Vue 3 的 setup语法糖到底是什么东西?
前言 我们每天写vue3项目的时候都会使用setup语法糖,但是你有没有思考过下面几个问题.setup语法糖经过编译后是什么样子的?为什么在setup顶层定义的变量可以在template中可以直接使用 ...
- 项目实战:Qt球机控制工具 v1.0.0(球机运动八个方向以及运动速度,设置运动到指定角度,查询当前水平和垂直角度)
需求 1.调试球机控制,方向速度,设置到指定的角度: 2.支持串口,485等基于串口的协议端口配置打开: 3.子线程串口控制和.子线程协议解析: 4.支持球机水平运动速度.垂直运动速度设置: ...
- mysql中如何批量生成百万级数据
# 准备 #1. 准备表 create table s1( id int, name varchar(20), gender char(6), email varchar(50), first_nam ...