You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2011/06/15 18:34:02 UTC
DO NOT REPLY [Bug 51380] New: [PATCH] Control reuse of cached SSL
Context from iteration to iteration
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Bug #: 51380
Summary: [PATCH] Control reuse of cached SSL Context from
iteration to iteration
Product: JMeter
Version: 2.4
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: HTTP
AssignedTo: notifications@jakarta.apache.org
ReportedBy: brent.cromarty@yahoo.ca
Classification: Unclassified
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Brent Cromarty <br...@yahoo.ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |brent.cromarty@yahoo.ca
--- Comment #2 from Brent Cromarty <br...@yahoo.ca> 2011-06-15 16:55:18 UTC ---
Currently the HTTPClient sampler creates an SSL context and connection (i.e.:
full handshake) for each thread on the first iteration only. Subsequent
iterations reuse their cached SSL Context thereby reusing an existing SSL
handshake. While this is typical of the way that a browser behaves (caching
and reusing an SSL context where possible) it limits our ability to do specific
testing of how a system will handle a constant load of N users when having to
perform SSL transactions.
The patch I have proposed adds a new property "https.use.cached.ssl.context" to
the jmeter.properties file. The default value is "true" to preserve existing
functionality. If false the override of public void
testIterationStart(LoopIterationEvent event) will get the SSL manager instance
and call the resetContext() method, nulling the current threadLocal SSL
context, and closing any currently open connections in the HTTP Client.
This allows us to create a new SSL context/connection each iteration, but reuse
that context within the iteration.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
--- Comment #7 from Milamber <mi...@apache.org> 2011-09-16 14:12:37 UTC ---
Please Detab (and don't insert a new line before { on an If statement / methods
(now fixed)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
--- Comment #1 from Brent Cromarty <br...@yahoo.ca> 2011-06-15 16:41:51 UTC ---
Created attachment 27162
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27162
Update to HTTPSampler2.java and jmeter.properties implementing SSL cache reuse
control
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Milamber <mi...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #3 from Milamber <mi...@apache.org> 2011-06-26 17:51:37 UTC ---
Can you provide a diff patch with current trunk, not full plain files.
Thanks.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
--- Comment #5 from Milamber <mi...@apache.org> 2011-09-16 12:33:11 UTC ---
Please, respect code convention in JMeter for your patch.
Thanks.
http://wiki.apache.org/jakarta-jmeter/JMeterEclipse
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #27162|0 |1
is obsolete| |
--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-16 12:24:13 UTC ---
Created attachment 27509
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27509
Implementation of the feature
Hello,
A note about implementation:
1) It works for HC3 and HC4 implementation
2) For Java Native HTTPSUrlConnection it doesn't work, SSL Context is cached
and I don't see the method to reset it, if someone knows I will be interested.
To validate my patch I set:
-Djavax.net.debug=all
And count number of occurences of:
"trustStore is:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/security/cacerts"
I note something strange:
- HC3 => 10 times => OK
- HC4 => 12 times => STRANGE ?
- Java => 1 time on first run then as it's in cache, regular since I don't
reset it see note 2) above
Regards
Philippe
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |p.mouawad@ubik-ingenierie.c
| |om
Version|2.4 |2.5
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #27509|0 |1
is obsolete| |
--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-16 14:00:00 UTC ---
Created attachment 27511
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27511
Fix to the issue with corrected code format (I hope so)
If format is not OK please tell me what's wrong.
Regards
Philippe
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org
DO NOT REPLY [Bug 51380] [PATCH] Control reuse of cached SSL Context
from iteration to iteration
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51380
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Sebb <se...@apache.org> 2011-09-17 23:25:52 UTC ---
Thanks for the patch.
I simplified it somewhat by making the base implementation concrete, thus
avoiding the need to provide implementations in all samplers.
Also made all the notifySSLContextWasReset() methods protected (some were
public, not sure why).
URL: http://svn.apache.org/viewvc?rev=1172147&view=rev
Log:
Bug 51380 - Control reuse of cached SSL Context from iteration to iteration
Modified:
jakarta/jmeter/trunk/bin/jmeter.properties
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerProxy.java
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org