org.apache.http.NoHttpResponseException: dh-cn-hangzhou.aliyuncs.com:80 failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:220)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
at com.aliyun.datahub.common.transport.HttpClient.doPostWithBytes(HttpClient.java:151)
at com.aliyun.datahub.common.transport.ApacheClientTransport.request(ApacheClientTransport.java:59)
at com.aliyun.datahub.common.transport.ApacheClientTransport.request(ApacheClientTransport.java:92)
at com.aliyun.datahub.rest.RestClient.requestWithNoRetry(RestClient.java:351)
at com.aliyun.datahub.rest.RestClient.requestWithNoRetry(RestClient.java:311)
at com.aliyun.datahub.DatahubClient.putRecords(DatahubClient.java:921)
at com.aliyun.datahub.DatahubClient.putRecords(DatahubClient.java:892)
at com.yixian.datasync.DataHub.execute(DataHub.java:137)
at com.yixian.datasync.DataHub$1.run(DataHub.java:69)
at java.lang.Thread.run(Thread.java:748)
java.lang.NullPointerException
at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:604)
at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1558)
at com.aliyun.datahub.model.serialize.JsonErrorParser.parse(JsonErrorParser.java:24)
at com.aliyun.datahub.model.serialize.PutRecordsResultJsonDeser.deserialize(PutRecordsResultJsonDeser.java:22)
at com.aliyun.datahub.model.serialize.PutRecordsResultJsonDeser.deserialize(PutRecordsResultJsonDeser.java:17)
at com.aliyun.datahub.DatahubClient.putRecords(DatahubClient.java:923)
at com.aliyun.datahub.DatahubClient.putRecords(DatahubClient.java:892)
at com.yixian.datasync.DataHub.execute(DataHub.java:137)
at com.yixian.datasync.DataHub$1.run(DataHub.java:69)
at java.lang.Thread.run(Thread.java:748)
程序运行一段时间后就报这个错误,貌似前几天都没有出这钟错误,难道是网络的原因?
应该不是网络原因,可能是连接池中的连接已经被服务端关闭,而本地还在使用这些连接。需要增加一个线程了清理这些过期连接,参考官方文档:http://hc.apache.org/httpcomponents-client-4.3.x/tutorial/html/connmgmt.html#d5e405
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。