Connection reset by peer; nested exception is java.lang.RuntimeException: Connection reset by peer
时间: 2023-10-13 12:03:50 浏览: 389
java中的connection reset 异常处理分析
Connection reset by peer是指由于对端(peer)的连接被重置而导致的连接错误。该错误通常伴随着ClientAbortException: java.io.IOException: Broken pipe的出现。在采集Metrics发送至ES的过程中,可能会出现在单数整点时正常发送,而在双数整点时发送失败的情况。这可能是因为esClient自动设置的KeepAlive时间为-1,即持续连接,而受到外界因素(如Firewall)的影响导致了TCP连接的单方面断开,从而引发了Connection reset by peer的错误。解决这个问题的方法是调整esClient的KeepAlive时间,确保连接在适当的时间内保持活动状态。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [ES报错:Connection reset by peer 解决经历](https://blog.csdn.net/qq_27327261/article/details/119995930)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [Connection reset by peer -- 客户端非正常中断连接](https://blog.csdn.net/tobrainto/article/details/127037321)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文