You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2017/02/23 00:52:50 UTC

[Bug 60768] New: Jmeter: testing with TLS cert creates new connection with every request

https://bz.apache.org/bugzilla/show_bug.cgi?id=60768

            Bug ID: 60768
           Summary: Jmeter: testing with TLS cert creates new connection
                    with every request
           Product: JMeter
           Version: 3.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: digant@yahoo-inc.com
  Target Milestone: ---

Hi,

When I use Jmeter with TLS client cert, it creates a new connection for every
request, though I have keep alive on.

When I tried to test the same it Apache httpClient directly, I noticed that we
need to have one special setting in httpclinet configuration 

".setUserTokenHandler(new NoopUserTokenHandler())", 

in order to make httpclinet use the same connection. 

I was wondering if there is there any way to override httpClient configuration
in Jmeter?

I tried to used Jmeter 2.13 and Jmeter 3.0 and found the same issue with both.

Please suggest.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60768] Jmeter: testing with TLS cert creates new connection with every request

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60768

--- Comment #2 from digant@yahoo-inc.com ---
Created attachment 34777
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34777&action=edit
Test file

Yes, Adding NoopUserTokenHandler helps.

Here are the requested details:

- your test plan ? Cookie Manager , pause times between request ?

  Attached the test plan. I have not removed the hostname and enpoint details,
as I can not share those values. 
  There is a default cookie manager for the test.
  There is no pause between requests. This test tries to get maximum output
from server.

- What makes you think a new connection is created for every request ?
  Run the test with with thread (with forever loop), with keep alive on. This
test should try to use the same connection (as there is no pause between
requests). You can verify the connection details by running command in your
mac:
   netstat  | grep "*.https"

   It could have output like:
   tcp4       0   1253  unknown-xx-xx-xx.12345 hostabcd.xyz...https ESTABLISHED

   Here 12345 is the connection id. Running above command quickly should not
change the connection id.

- More details:
  TLS cert used is TLSv1.2
  Only changed configuration in Jmeter are:
    System.properties file:
        javax.net.ssl.keyStore=<location_of_jks file>
        javax.net.ssl.keyStorePassword=<password>

I have tested my test case with nightly build also without any success.

Please let me know, if any more details are required.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60768] Jmeter: testing with TLS cert creates new connection with every request

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60768

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Thanks for provided information.
As per previous comment, since you didn't amend :

httpclient4.time_to_live=2000

Jmeter will use a new connection every 2 seconds.
Is it what you're observing or is creation rate higher ? 

can you first try to increase this value:

httpclient4.time_to_live

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60768] Jmeter: testing with TLS cert creates new connection with every request

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60768

UbikLoadPack support <su...@ubikloadpack.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from UbikLoadPack support <su...@ubikloadpack.com> ---
(In reply to digant from comment #0)
> Hi,
> 
> When I use Jmeter with TLS client cert, it creates a new connection for
> every request, though I have keep alive on.
> 
> When I tried to test the same it Apache httpClient directly, I noticed that
> we need to have one special setting in httpclinet configuration 
> 
> ".setUserTokenHandler(new NoopUserTokenHandler())", 

Are you sure NoopUserTokenHandler does what you think ?
IMO, it does exactly the contrary which is to return a null state.

Can you give more details on:
- your test plan ? Cookie Manager , pause times between request ? 
- What makes you think a new connection is created for every request ?

If you're using 3.1, did you modify properties:
httpclient4.idletimeout=0
httpclient4.time_to_live=2000
httpclient4.validate_after_inactivity=2000

Which controls lifetime of connections ?
I would suggest you increase for example this one to a higher value  :
httpclient4.validate_after_inactivity

There is also a known issue where httpclient4.time_to_live does not correclty
validate connection, could you in this case download nightly build and check:
- http://jmeter.apache.org/nightly.html

Thanks


> 
> in order to make httpclinet use the same connection. 
> 
> I was wondering if there is there any way to override httpClient
> configuration in Jmeter?
> 
> I tried to used Jmeter 2.13 and Jmeter 3.0 and found the same issue with
> both.
> 
> Please suggest.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60768] Jmeter: testing with TLS cert creates new connection with every request

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60768

--- Comment #3 from digant@yahoo-inc.com ---
Attached the test plan. I have removed the hostname and enpoint details, as I
can not share those values.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60768] Jmeter: testing with TLS cert creates new connection with every request

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60768

digant@yahoo-inc.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEEDINFO                    |RESOLVED

--- Comment #5 from digant@yahoo-inc.com ---
Hi Philippe,

Thanks for the info.

Using httpclient4.time_to_live with higher value works fine (works well with
jmeter 3.0 and jmeter 3.1).

this ticket can be closed.

-- 
You are receiving this mail because:
You are the assignee for the bug.