hhhttt2 2016-01-20 09:32 采纳率: 0%
浏览 2239

Tomcat7,httpasyncclient-4.0.1,给自己发get请求,接收不到

Tomcat7中启动一个线程和主服socket通信,在该线程中用httpasyncclient给本Tomcat发送一个get请求。现在问题是执行了一段时间后,tomcat接收不到该请求,其他的浏览器发过来的请求都可以接收到。也不清楚是请求发送失败还是tomcat出问题了。不知道是什么原因导致的。
正常情况下,httpasyncclient发送该请求,打印的日志如下:
[exchange: 70] start execution
559163 DEBUG [2016-01-20 11:41:02] CookieSpec selected: best-match
559163 DEBUG [2016-01-20 11:41:02] Auth cache not set in the context
559163 DEBUG [2016-01-20 11:41:02] [exchange: 70] Request connection for {}->http://127.0.0.1:8080
559163 DEBUG [2016-01-20 11:41:02] Connection request: [route: {}->http://127.0.0.1:8080][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
559163 DEBUG [2016-01-20 11:41:02] Connection leased: [id: http-outgoing-5][route: {}->http://127.0.0.1:8080][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
559179 DEBUG [2016-01-20 11:41:02] [exchange: 70] Connection allocated: http-outgoing-5 [ACTIVE]
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][r:r]: Set attribute http.nio.exchange-handler
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][rw:r]: Event set [w]
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 [ACTIVE] Request ready
559179 DEBUG [2016-01-20 11:41:02] Connection route already established
559179 DEBUG [2016-01-20 11:41:02] [exchange: 70] Attempt 1 to execute request
559179 DEBUG [2016-01-20 11:41:02] Target auth state: UNCHALLENGED
559179 DEBUG [2016-01-20 11:41:02] Proxy auth state: UNCHALLENGED
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> GET /360pay/uc/user?devID=90e11876fcb7a658&clientID=1216597&session_id=sst1gameb003440bf1d84210a6d50c3c8adeda3e160342&client_version=2.0.3&gatewayID=7 HTTP/1.1
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> Host: 127.0.0.1:8080
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> Connection: Keep-Alive
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> User-Agent: Apache-HttpAsyncClient/4.0.1 (java 1.5)
559179 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][rw:w]: Event set [w]
559194 DEBUG [2016-01-20 11:41:02] [exchange: 70] Request completed
559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][rw:w]: 262 bytes written
559194 DEBUG [2016-01-20 11:41:02] business data sign:sid=sst1gameb003440bf1d84210a6d50c3c8adeda3e160342
559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "GET /360pay/uc/user?devID=90e11876fcb7a658&clientID=1216597&session_id=sst1gameb003440bf1d84210a6d50c3c8adeda3e160342&client_version=2.0.3&gatewayID=7 HTTP/1.1[\r][\n]"
559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "Host: 127.0.0.1:8080[\r][\n]"
559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "Connection: Keep-Alive[\r][\n]"
559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "User-Agent: Apache-HttpAsyncClient/4.0.1 (java 1.5)[\r][\n]"
559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 >> "[\r][\n]"
559194 DEBUG [2016-01-20 11:41:02] will be md5:sid=sst1gameb003440bf1d84210a6d50c3c8adeda3e16034218efdc1ce1bbe1bf33a33686dac788f6
559194 DEBUG [2016-01-20 11:41:02] http-outgoing-5 127.0.0.1:56522<->127.0.0.1:8080[ACTIVE][r:w]: Event cleared [w]
不正常情况下:
[exchange: 11538] start execution
135320174 DEBUG [2016-01-20 05:47:10] CookieSpec selected: best-match
135320174 DEBUG [2016-01-20 05:47:10] Auth cache not set in the context
135320174 DEBUG [2016-01-20 05:47:10] [exchange: 11538] Request connection for {}->http://127.0.0.1:8080
135320174 DEBUG [2016-01-20 05:47:10] Connection request: [route: {}->http://127.0.0.1:8080][total kept alive: 0; route allocated: 2 of 2; total allocated: 2 of 20]
只有这么点日志,是get请求发送失败吗?求大神指教下

  • 写回答

1条回答 默认 最新

  • devmiao 2016-01-20 09:49
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services