Http <<&引用;[读取]I/O错误:读取超时“;发送头后立即

Http <<&引用;[读取]I/O错误:读取超时“;发送头后立即,http,spring-boot,networking,apache-httpclient-4.x,tcp-ip,Http,Spring Boot,Networking,Apache Httpclient 4.x,Tcp Ip,在Spring启动应用程序中调用外部REST服务时,我们会看到超时。当我们直接连接到REST服务时,它们似乎不会发生。org.apache.http上的调试日志记录为我们提供了失败请求的一个非常特殊的方面:它包含一个入站日志条目,如记录apachehttpclient/4.5.3中所示,使用了一个http客户机池。我建议启用池上的调试以获得更多信息。远程终结点上的连接似乎已断开。我们试图通过直接从本地计算机调用远程服务器来消除远程服务器,但从未看到过相同的行为,但我们可能只是运气不够好而失败。如

在Spring启动应用程序中调用外部REST服务时,我们会看到超时。当我们直接连接到REST服务时,它们似乎不会发生。org.apache.http上的调试日志记录为我们提供了失败请求的一个非常特殊的方面:它包含一个入站日志条目
,如记录
apachehttpclient/4.5.3
中所示,使用了一个http客户机池。我建议启用池上的调试以获得更多信息。远程终结点上的连接似乎已断开。我们试图通过直接从本地计算机调用远程服务器来消除远程服务器,但从未看到过相同的行为,但我们可能只是运气不够好而失败。如果远程服务器断开连接,为什么不立即停止连接?是否可能是您将线程名称剪切到了右侧?可能是线程
http-outing-1041
失败,来自线程
http-outing-1047
的消息交错。104在来自其他记录器的行中重复,在本例中是连接ID:
连接租赁:[ID:104]
,所以我很确定不是这样。好主意。把所有这些事件放在同一毫秒(258):p是没有意义的
16:55:12.764    Connection released: [id: 104][route: {s}-><<website-redacted>>:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
16:55:12.763    http-outgoing-104 << "[read] I/O error: Read timed out"
16:55:08.259    http-outgoing-104 >> "<<POST Body Redacted>>"
16:55:08.259    http-outgoing-104 >> "[\r][\n]"
16:55:08.258    http-outgoing-104: set socket timeout to 4500
16:55:08.258    Executing request POST <<Endpoint Redacted>> HTTP/1.1
16:55:08.258    Target auth state: UNCHALLENGED
16:55:08.258    Proxy auth state: UNCHALLENGED
16:55:08.258    Connection leased: [id: 104][route: {s}-><<website-redacted>>:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
....
16:55:08.258    http-outgoing-104 >> "POST <<Endpoint Redacted>> HTTP/1.1[\r][\n]"
16:55:08.258    http-outgoing-104 >> "Accept: text/plain, application/json, application/*+json, */*[\r][\n]"
16:55:08.258    http-outgoing-104 >> Cookie: <<Redacted>>
16:55:08.258    http-outgoing-104 >> "Content-Type: application/json[\r][\n]"
16:55:08.258    http-outgoing-104 >> "Connection: close[\r][\n]"
16:55:08.258    http-outgoing-104 >> "X-B3-SpanId: <<ID>>[\r][\n]"
16:55:08.258    http-outgoing-104 << "[read] I/O error: Read timed out"
16:55:08.258    http-outgoing-104 >> "X-Span-Name: https:<<Endpoint Redacted>>[\r][\n]"
16:55:08.258    http-outgoing-104 >> "X-B3-TraceId: <<ID>>[\r][\n]"
16:55:08.258    http-outgoing-104 >> "X-B3-ParentSpanId: <<ID>>[\r][\n]"
16:55:08.258    http-outgoing-104 >> "Content-Length: 90[\r][\n]"
16:55:08.258    http-outgoing-104 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_172)[\r][\n]"
16:55:08.258    http-outgoing-104 >> "Cookie: <<Redacted>>"
16:55:08.258    http-outgoing-104 >> "Host: <<Host redacted>>[\r][\n]"
16:55:08.258    http-outgoing-104 >> "Accept-Encoding: gzip,deflate[\r][\n]"
16:55:08.258    http-outgoing-104 >> "X-B3-Sampled: 1[\r][\n
19:28:08.102    http-outgoing-36 << "[read] I/O error: Read timed out"
19:28:08.102    http-outgoing-36: Shutdown connection
19:28:08.102    http-outgoing-36: Close connection
19:28:03.598    http-outgoing-36 >> "Connection: Keep-Alive[\r][\n]"
19:28:03.598    http-outgoing-36 >> "Content-Type: application/json;charset=UTF-8[\r][\n]"
...
19:28:03.598    http-outgoing-36 >> "Accept-Encoding: gzip,deflate[\r][\n]"
...
19:28:03.597    http-outgoing-36 >> Cookie: ....
19:28:03.597    http-outgoing-36 >> Accept-Encoding: gzip,deflate
19:28:03.597    http-outgoing-36 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_172)
19:28:03.596    Connection leased: [id: 36][route: {s}-><< Site redacted >>:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
19:28:03.596    http-outgoing-36: set socket timeout to 4500
19:28:03.596    Executing request POST  HTTP/1.1
19:28:03.596    Target auth state: UNCHALLENGED
19:28:03.596    http-outgoing-36 << "[read] I/O error: Read timed out"
19:28:03.594    Connection request: [route: {s}-><< Site redacted >>:443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
19:28:03.594    Auth cache not set in the context