org.apache.http.NoHttpResponseException

异常: org.apache.http.NoHttpResponseException: The target server failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:141)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)

主要原因server端连接已经关闭, client没有接收到关闭的通知



httpClient 4.4中setStaleConnectionCheckEnabled默认变成false了, 之前的版本默认是true
换jar版本要详细测试

  • 解决方法:

    • client请求加重试
    • client起线程主动检查

org.apache.http.NoHttpResponseException的更多相关文章

  1. [Jmeter并发报错解决方案]org.apache.http.NoHttpResponseException: 10.0.4.147:8000 failed to respond

    背景:公司模型框架是Nginx+uwsgi+Django+nginx,一开始使用Jmeter进行高并发请求测试,发现成功率只有50%,换用postman,成功率100%,代码进行高并发一样不会报错. ...

  2. Jmeter返回org.apache.http.NoHttpResponseException: The target server failed to respond解决办法

    1.问题:这段时间使用jmeter压测时(300个请求,持续压300s,加速期10s),压力平稳时偶然错误,部分请求失败事务报错信息如下 org.apache.http.NoHttpResponseE ...

  3. 【异常(待解决)】org.apache.http.NoHttpResponseException: api.weixin.qq.com:443 failed to respond

    一.记录下异常堆栈信息 -- ::-exec-] ERROR weixin.popular.client.LocalHttpClient - execute error org.apache.http ...

  4. httpclient org.apache.http.NoHttpResponseException: host:端口 failed to respond 错误原因和解决方法

    原因:httpclient 之前与服务端建立的链接已经失效(例如:tomcat 默认的keep-alive timeout :20s),再次从连接池拿该失效链接进行请求时,就会保存. 解决方法:官方链 ...

  5. org.apache.http.NoHttpResponseException: XX.XX.XX.XX:80 failed to respond

    解决: Finally I fix the issue and it is caused by buffer size. By default, buffer size of httpclient i ...

  6. 记一次NoHttpResponseException问题排查

    上传文件程序会有一定的概率提示错误,错误率大概在1%以下,错误信息是:org.apache.http.NoHttpResponseException , s3-us-west-1.amazonaws. ...

  7. solr 4.4添加索引是新手容易遇到的问题

    solr 4.4添加索引是新手容易遇到的问题异常一.Exception in thread "main" java.lang.NoClassDefFoundError: org/a ...

  8. Selenium WebDriver使用IE浏览器

    摘:http://www.cnblogs.com/dream0577/archive/2012/10/07/2714579.html /**       用IE驱动,1.先到官网下载IEDriverS ...

  9. HttpClientUtil

    package com.uniubi.management.util; import java.io.IOException; import java.io.InterruptedIOExceptio ...

随机推荐

  1. MySQL--基础SQL--DDL

    1.创建数据库 CREATE DATABASE dbname 例: CREATE DATABASE test 2.选择要操作的数据库 USE dbname 例: USE test 3.删除数据库 DR ...

  2. 向mysql数据库中插入数据时显示“Duplicate entry '1′ for key ‘PRIMARY' ”错误

    错误情况如题,出现这个错误的原因十分简单: 很明显,这是主键的问题. 在一张数据表中是不能同时出现多个相同主键的数据的 这就是错误的原因,解决的方法: 1.可以将这张表设置成无主键(mysql支持,其 ...

  3. shell 实现war包的配置更新和自动发布

    此脚本主要用来实现非maven tomcat项目的war包手动发布, 1.将测试war包上传至指定目录 2.备份目前生产代码 3.自动配置文件替换 4.新版本代码的发布 #!/bin/bash ### ...

  4. JunOS SRX firewal Web authentication(转)

    转载自:https://srxasa.wordpress.com/2011/12/11/junos-srx-firewal-web-authentication/ JunOS SRX firewal ...

  5. [Algo] 115. Array Deduplication I

    Given a sorted integer array, remove duplicate elements. For each group of elements with the same va ...

  6. 吴裕雄--天生自然Linux操作系统:Linux 安装

    Linux 的安装,安装步骤比较繁琐,现在其实云服务器挺普遍的,价格也便宜,如果直接不想搭建,也可以直接买一台学习用用,参考各大云服务器比较:https://www.runoob.com/linux/ ...

  7. VMware下的Ubuntu16设置连接主机网络,设置主机下可以通过xshell访问 VMware下的Ubuntu

    NAT模式连接 1. 2. 3. 4. 5. 6.

  8. unity学习 5.x解包

    using System.Collections;using System.Collections.Generic;using UnityEngine; public class bundleload ...

  9. TT(Tokyo Tyrant )介绍及使用

    Tokyo Cabinet 是日本人 平林幹雄 开发的一款 DBM 数据库,该数据库读写非常快,哈希模式写入100万条数据只需0.643秒,读取100万条数据只需0.773秒,是 Berkeley D ...

  10. ES6之模块化

    本文介绍ES6实现模块化的方法:使用import和export. 导入的时候需不需要加大括号的判断:1.当用export default people导出时,就用 import people 导入(不 ...