公众号开发-java- 调用客服接口发消息 会出现 connection reset 该如何处理?
发布于 7 年前 作者 lujuan 3249 次浏览 来自 官方Issues

最近几天一直出现该情况,之前是没有出现的 请问大佬们 这个问题该如何追踪和处理

小弟万分感谢先

调用接口名称:

客服接口-发消息

接口调用请求说明

http请求方式: POST https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN


后台报错日志:

2020-06-03 13:56:55.045 [pool-3-thread-10] ERROR com.bainian.customer.wx.util.WeixinAPI - 通过客服消息接口以指定客服身份发送文字消息失败:openid=oJZ4G0u2y54_kwm-vGgBDzbA_egE,message=审核人?,kfaccount=kf2008[@gh_dc423fcf210e](/user/gh_dc423fcf210e)

java.lang.Exception: java.net.SocketException: Connection reset

at com.bainian.customer.wx.util.HttpClient.dopost(HttpClient.java:62)

at com.bainian.customer.wx.util.WeixinAPI.sendtext(WeixinAPI.java:153)

at com.bainian.customer.socket.SocketIndexService$1.run(SocketIndexService.java:265)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(Unknown Source)

at java.net.SocketInputStream.read(Unknown Source)

at sun.security.ssl.InputRecord.readFully(Unknown Source)

at sun.security.ssl.InputRecord.read(Unknown Source)

at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)

at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)

at sun.security.ssl.AppInputStream.read(Unknown Source)

at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)

at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)

at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)

at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)

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)

at com.bainian.customer.wx.util.HttpClient.dopost(HttpClient.java:57)

... 9 common frames omitted

1 回复

你好,根据报错信息,建议自查下网络问题,或者换腾讯云试试。

回到顶部