[
https://issues.apache.org/jira/browse/HTTPCLIENT-1208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572789#comment-13572789
]
Walco van Loon commented on HTTPCLIENT-1208:
--------------------------------------------
Hi Oleg,
I'm encountering this issue in a non-threaded, sequential execution, with a
shared HttpContext and also traced down the problem with the connection
management with mutual TLS.
The DefaultUserTokenHandler yields the TLS session principal, which set as
state object in DefaultRequestDirector. When acquiring a new route, the logic
in RouteSpecificPool determines the old connection (which has a non-null state
object) can not be reused, because it doesn't equal the state of the new
BasicPoolEntry (null - there is no SSLSession yet).
This log snippet illustrates the behavior - note the
[HttpRoute[{s}->https://localhost:8443]][null] versus the old
[HttpRoute[{s}->https://localhost:8443]][[email protected],
CN=functional-tests-server, OU=Engineering, O=Forcare B.V., L=Zeist,
ST=Utrecht, C=NL].
2013-02-06 06:22:03.520+0100 FINE http-bio-8080-exec-9:
org.apache.http.impl.conn.tsccm.ConnPoolByRoute: Releasing connection
[HttpRoute[{s}->https://localhost:8443]][[email protected],
CN=functional-tests-server, OU=Engineering, O=Forcare B.V., L=Zeist,
ST=Utrecht, C=NL]
2013-02-06 06:22:03.520+0100 FINE http-bio-8080-exec-9:
org.apache.http.impl.conn.tsccm.ConnPoolByRoute: Pooling connection
[HttpRoute[{s}->https://localhost:8443]][[email protected],
CN=functional-tests-server, OU=Engineering, O=Forcare B.V., L=Zeist,
ST=Utrecht, C=NL]; keep alive indefinitely
2013-02-06 06:22:03.521+0100 FINE http-bio-8080-exec-9:
org.apache.http.impl.conn.tsccm.ConnPoolByRoute: Notifying no-one, there are no
waiting threads
2013-02-06 06:22:03.522+0100 FINE http-bio-8080-exec-9:
org.apache.http.impl.conn.tsccm.ConnPoolByRoute:
[HttpRoute[{s}->https://localhost:8443]] total kept alive: 2, total issued: 0,
total allocated: 2 out of 500
2013-02-06 06:22:03.522+0100 FINE http-bio-8080-exec-9:
org.apache.http.impl.conn.tsccm.ConnPoolByRoute: No free connections
[HttpRoute[{s}->https://localhost:8443]][null]
2013-02-06 06:22:03.522+0100 FINE http-bio-8080-exec-9:
org.apache.http.impl.conn.tsccm.ConnPoolByRoute: Available capacity: 49 out of
50 [HttpRoute[{s}->https://localhost:8443]][null]
2013-02-06 06:22:03.523+0100 FINE http-bio-8080-exec-9:
org.apache.http.impl.conn.tsccm.ConnPoolByRoute: Creating new connection
[HttpRoute[{s}->https://localhost:8443]]
Should I create a clone of this issue or can this bug be reopened?
Regards,
Walco
> PoolingClientConnectionManager give a new route even if keep-alive
> ------------------------------------------------------------------
>
> Key: HTTPCLIENT-1208
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1208
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.2 Final
> Reporter: restonica
>
> A connection is kept with a route and a specific state, for example :
> Connection [id: 0][route: {s}->https://x.x.x.x:8443][state: CN=KeyPair,
> OU=OU, O=O, L=Marseille, C=FR] can be kept alive for 30000 MILLISECONDS
> If a new connection with the same route is asked, for example:
> Connection request: [route: {s}->https://x.x.x.x:8443][total kept alive: 1;
> route allocated: 1 of 50; total allocated: 1 of 200]
> then the connection manager will give a NEW route (with a new ID).
> If the first kept connection (see the beginning) does not contain the state,
> all is OK and the connection manager give the same route as the previous one.
> This bug cause problem in case of SSL mutual authentication, a new TCP
> connection is done for each request !!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]