Discussion:
How to clear SSL State in HC4.5.5
Philippe Mouawad
2018-02-24 11:24:50 UTC
Permalink
Hello,

In current jmeter trunk when we have Client certificate authentication and
we need to reset SSL State so another SSLContext is created we do this:
https://github.com/apache/jmeter/blob/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java#L838


We are currently migrating to last 4.5 and would like to know what is the
clean way to reset SSL State ?
Since httpClient.getConnectionManager() is deprecated.
Should we keep a reference to PoolingHttpClientConnectionManager and call
those methods on it ?

Current state of migration is here:

-
https://github.com/ubikloadpack/jmeter/blob/HC4_FULL_MIGRATION/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java#L973


To recap, in JMeter we have 1 HttpClient per User (and this is needed as
per a previous discussion on this mailing list).

Thanks for your help.
--
Regards.
Philippe M.
Philippe Mouawad
2018-03-10 13:08:38 UTC
Permalink
Hello,
Any feedback on this ?


Thanks

On Sat, Feb 24, 2018 at 12:24 PM, Philippe Mouawad <
Post by Philippe Mouawad
Hello,
In current jmeter trunk when we have Client certificate authentication and
https://github.com/apache/jmeter/blob/trunk/src/protocol/http/org/apache/
jmeter/protocol/http/sampler/HTTPHC4Impl.java#L838
We are currently migrating to last 4.5 and would like to know what is the
clean way to reset SSL State ?
Since httpClient.getConnectionManager() is deprecated.
Should we keep a reference to PoolingHttpClientConnectionManager and call
those methods on it ?
- https://github.com/ubikloadpack/jmeter/blob/HC4_
FULL_MIGRATION/src/protocol/http/org/apache/jmeter/
protocol/http/sampler/HTTPHC4Impl.java#L973
<https://github.com/ubikloadpack/jmeter/blob/HC4_FULL_MIGRATION/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java#L973>
To recap, in JMeter we have 1 HttpClient per User (and this is needed as
per a previous discussion on this mailing list).
Thanks for your help.
--
Regards.
Philippe M.
--
Cordialement.
Philippe Mouawad.
Ubik-Ingénierie

UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>

UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
Oleg Kalnichevski
2018-03-11 13:26:22 UTC
Permalink
...
Post by Philippe Mouawad
Hello,
In current jmeter trunk when we have Client certificate
authentication and
https://github.com/apache/jmeter/blob/trunk/src/protocol/http/org/a
pache/
jmeter/protocol/http/sampler/HTTPHC4Impl.java#L838
We are currently migrating to last 4.5 and would like to know what is the
clean way to reset SSL State ?
I am not sure I understand what exactly you mean by resetting SSL
state.

Oleg
Post by Philippe Mouawad
Since httpClient.getConnectionManager() is deprecated.
Should we keep a reference to PoolingHttpClientConnectionManager and call
those methods on it ?
   - https://github.com/ubikloadpack/jmeter/blob/HC4_
   FULL_MIGRATION/src/protocol/http/org/apache/jmeter/
   protocol/http/sampler/HTTPHC4Impl.java#L973
   <https://github.com/ubikloadpack/jmeter/blob/HC4_FULL_MIGRATION/
src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Im
pl.java#L973>
To recap, in JMeter we have 1 HttpClient per User (and this is needed as
per a previous discussion on this mailing list).
Thanks for your help.
--
Regards.
Philippe M.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Philippe Mouawad
2018-03-11 14:57:36 UTC
Permalink
I mean starting with a fresh sslcontext.
It works if I keep a ref on PoolingHttpConnectionManager and call

poolingHttpClientConnectionManager.closeExpiredConnections();
poolingHttpClientConnectionManager.closeIdleConnections(1L,
TimeUnit.MICROSECONDS);


But is there a better way ?
Thanks

Regards
Post by Oleg Kalnichevski
...
Post by Philippe Mouawad
Hello,
In current jmeter trunk when we have Client certificate
authentication and
https://github.com/apache/jmeter/blob/trunk/src/protocol/http/org/a
pache/
jmeter/protocol/http/sampler/HTTPHC4Impl.java#L838
We are currently migrating to last 4.5 and would like to know what is the
clean way to reset SSL State ?
I am not sure I understand what exactly you mean by resetting SSL
state.
Oleg
Post by Philippe Mouawad
Since httpClient.getConnectionManager() is deprecated.
Should we keep a reference to PoolingHttpClientConnectionManager and call
those methods on it ?
- https://github.com/ubikloadpack/jmeter/blob/HC4_
FULL_MIGRATION/src/protocol/http/org/apache/jmeter/
protocol/http/sampler/HTTPHC4Impl.java#L973
<https://github.com/ubikloadpack/jmeter/blob/HC4_FULL_MIGRATION/
src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Im
pl.java#L973>
To recap, in JMeter we have 1 HttpClient per User (and this is needed as
per a previous discussion on this mailing list).
Thanks for your help.
--
Regards.
Philippe M.
---------------------------------------------------------------------
--
Cordialement.
Philippe Mouawad.
Oleg Kalnichevski
2018-03-11 16:03:29 UTC
Permalink
Post by Philippe Mouawad
I mean starting with a fresh sslcontext.
It works if I keep a ref on PoolingHttpConnectionManager and call
poolingHttpClientConnectionManager.closeExpiredConnections();
poolingHttpClientConnectionManager.closeIdleConnections(1L,
TimeUnit.MICROSECONDS);
But is there a better way ?
What is so bad about using the connection manager to close out all
persistent connections?

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Philippe Mouawad
2018-03-11 16:57:30 UTC
Permalink
It looks a bit aggressive to me, but if you say it’s ok, it’s fine for me.

So you confirm I need to keep reference to
poolingHttpClientConnectionManager right ?
No way from httpclient

Thanks
Post by Philippe Mouawad
Post by Philippe Mouawad
I mean starting with a fresh sslcontext.
It works if I keep a ref on PoolingHttpConnectionManager and call
poolingHttppoolingHttpClientConnectionManagerClientConnectionMan
ager.closeExpiredConnections();
poolingHttpClientConnectionManager.closeIdleConnections(1L,
Post by Philippe Mouawad
TimeUnit.MICROSECONDS);
But is there a better way ?
What is so bad about using the connection manager to close out all
persistent connections?
Oleg
---------------------------------------------------------------------
--
Cordialement.
Philippe Mouawad.
Gary Gregory
2018-03-11 17:38:14 UTC
Permalink
Are we missing a getter?

Gary
Post by Philippe Mouawad
It looks a bit aggressive to me, but if you say it’s ok, it’s fine for me.
So you confirm I need to keep reference to
poolingHttpClientConnectionManager right ?
No way from httpclient
Thanks
Post by Philippe Mouawad
Post by Philippe Mouawad
I mean starting with a fresh sslcontext.
It works if I keep a ref on PoolingHttpConnectionManager and call
poolingHttppoolingHttpClientConnectionManagerClientConnectionMan
ager.closeExpiredConnections();
poolingHttpClientConnectionManager.closeIdleConnections(1L,
Post by Philippe Mouawad
TimeUnit.MICROSECONDS);
But is there a better way ?
What is so bad about using the connection manager to close out all
persistent connections?
Oleg
---------------------------------------------------------------------
--
Cordialement.
Philippe Mouawad.
Oleg Kalnichevski
2018-03-11 22:42:04 UTC
Permalink
It looks a bit aggressive to me, but if you say it’s ok, it’s fine
for me.
So you confirm I need to keep reference to
poolingHttpClientConnectionManager right ?
No way from httpclient
HttpClient interface represents a generic client that may not
necessarily have a connection pool or even connection manager
internally. Coupling HttpClient interface with a specific connection
manager would force each and every HttpClient implementation to
implement that specific connection management contract as well.

Oleg
Thanks
Post by Philippe Mouawad
Post by Philippe Mouawad
I mean starting with a fresh sslcontext.
It works if I keep a ref on PoolingHttpConnectionManager and call
poolingHttppoolingHttpClientConnectionManagerClientConnectionMan
ager.closeExpiredConnections();
poolingHttpClientConnectionManager.closeIdleConnections(1L,
Post by Philippe Mouawad
TimeUnit.MICROSECONDS);
But is there a better way ?
What is so bad about using the connection manager to close out all
persistent connections?
Oleg
-----------------------------------------------------------------
----
g
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org
Loading...