You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Hans L <ha...@gmail.com> on 2006/05/01 22:52:12 UTC
Re: HTTP Request HTTPClient SSL protocol doesn`t work
Hi,
I realize this is a popular topic, but I'm having a similar problem & am
unable to resolve it using suggestions from the list.
sebb wrote:
> On 13/04/06, Yefym Dmukh <ye...@gmail.com> wrote:
>> OK,
>> it is working now.
>
> Glad to hear it:
>
>> solution was:
>> 1. to update from 1.5.02 to 1.5.06
>> 2. add the public key (server.crt in x509 ) to the java keystore
>> $ keytool -import -trustcacerts -alias "devbeta" -file
>> ../../../performance/jakarta-jmeter-2.1.1/TestPlans/
>> crts/devbeta.x509 -keystore f:/java/jre1.5.0_06/lib/security/cacerts
>>
>
> Thanks for the info.
I followed those exact steps in my setup, and indeed it *seems* that the
SSL decryption is working at some level -- the debug statements printed
to STDERR are showing decrypted the contents of the page(s) I'm trying
to load.
All my assertions fail, though, and when I look at my listener logs I
see "Non HTTP response code" for all the responses.
I double checked that I'm using HTTPS and port 443. I've been working
at this for several hours; I'm not sure what to possibly check next.
Thanks in advance for any help -
Hans
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: RuntimeController
Posted by sebb <se...@gmail.com>.
Each thread checks for the stop condition after each sampler, which is
allowed to finish.
If you want to try experimenting, use the Java Request Sampler and set
the time delay to a second or two.
S.
On 03/05/06, bgordon <bb...@yahoo.com> wrote:
> Ok, I have a threadGroup with a scheduler and a delay of 0 and a duration of 30. I am not seeing it stop after 30 seconds, or 5 minutes. When should it stop? Will it just knock existing http requests on the head and stop immediately? Will the current HTTP requests finish? Will each thread continue the current loop and then check to see if it should top after a pass through all the elements? In my test environment I have 200 threads and for each loop the thread group may take a while, so that could be a possible explanation. Thanks, Bruce
>
> sebb <se...@gmail.com> wrote:
> On 02/05/06, bgordon wrote:
> > Ok (I have to admit you had me chuckling with your comment "I had lots of problems trying to get it to work... it did seem to work for me in some cases...".)
> >
> > I think my logic was wrong. If my ThreadGroup had a loop then the RuntimeController will only stop the elements nested within it. So using the Scheduler is preferred. In my case I want to
> > a. parameterize the duration from a property. Can I do that?
>
> I think so - try it.
>
> > b. follow your suggestion of setting a startup delay of 0, and a duration of 400 etc
> > I don't understand how to modify the Scheduler Configuration. Are the Start/Stop times required? In my case I don't care about the times-I want to run it ASAP, but with a delay. Do I want to parameterize the Start/end times or do I want to somehow leave them empty and simply set the duration and delay? If duration and Startup delay are set will the other fields be ignored?
>
> Yes, see the documentation ...
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Thread_Group
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: RuntimeController
Posted by bgordon <bb...@yahoo.com>.
Ok, I have a threadGroup with a scheduler and a delay of 0 and a duration of 30. I am not seeing it stop after 30 seconds, or 5 minutes. When should it stop? Will it just knock existing http requests on the head and stop immediately? Will the current HTTP requests finish? Will each thread continue the current loop and then check to see if it should top after a pass through all the elements? In my test environment I have 200 threads and for each loop the thread group may take a while, so that could be a possible explanation. Thanks, Bruce
sebb <se...@gmail.com> wrote:
On 02/05/06, bgordon wrote:
> Ok (I have to admit you had me chuckling with your comment "I had lots of problems trying to get it to work... it did seem to work for me in some cases...".)
>
> I think my logic was wrong. If my ThreadGroup had a loop then the RuntimeController will only stop the elements nested within it. So using the Scheduler is preferred. In my case I want to
> a. parameterize the duration from a property. Can I do that?
I think so - try it.
> b. follow your suggestion of setting a startup delay of 0, and a duration of 400 etc
> I don't understand how to modify the Scheduler Configuration. Are the Start/Stop times required? In my case I don't care about the times-I want to run it ASAP, but with a delay. Do I want to parameterize the Start/end times or do I want to somehow leave them empty and simply set the duration and delay? If duration and Startup delay are set will the other fields be ignored?
Yes, see the documentation ...
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Thread_Group
Re: RuntimeController
Posted by sebb <se...@gmail.com>.
On 02/05/06, bgordon <bb...@yahoo.com> wrote:
> Ok (I have to admit you had me chuckling with your comment "I had lots of problems trying to get it to work... it did seem to work for me in some cases...".)
>
> I think my logic was wrong. If my ThreadGroup had a loop then the RuntimeController will only stop the elements nested within it. So using the Scheduler is preferred. In my case I want to
> a. parameterize the duration from a property. Can I do that?
I think so - try it.
> b. follow your suggestion of setting a startup delay of 0, and a duration of 400 etc
> I don't understand how to modify the Scheduler Configuration. Are the Start/Stop times required? In my case I don't care about the times-I want to run it ASAP, but with a delay. Do I want to parameterize the Start/end times or do I want to somehow leave them empty and simply set the duration and delay? If duration and Startup delay are set will the other fields be ignored?
Yes, see the documentation ...
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Thread_Group
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: RuntimeController
Posted by bgordon <bb...@yahoo.com>.
Ok (I have to admit you had me chuckling with your comment "I had lots of problems trying to get it to work... it did seem to work for me in some cases...".)
I think my logic was wrong. If my ThreadGroup had a loop then the RuntimeController will only stop the elements nested within it. So using the Scheduler is preferred. In my case I want to
a. parameterize the duration from a property. Can I do that?
b. follow your suggestion of setting a startup delay of 0, and a duration of 400 etc
I don't understand how to modify the Scheduler Configuration. Are the Start/Stop times required? In my case I don't care about the times-I want to run it ASAP, but with a delay. Do I want to parameterize the Start/end times or do I want to somehow leave them empty and simply set the duration and delay? If duration and Startup delay are set will the other fields be ignored?
Thanks for your help,
Bruce
sebb <se...@gmail.com> wrote: On 02/05/06, bgordon wrote:
> I've downloaded and tried version jakarta-jmeter-2-1.20060430 and I still have the same error. I want to verify that I'm using RuntimeController properly. I have
> ThreadGroup "TransactionalRequestor"
> RuntimeController with Runtime (seconds) set to ${__P(runtimeControllerMaxSeconds,180)}
> RandomController
> ThroughputController A
> Http request 1
> Http request 2
> Http request 3
> ThroughputController B
> Http request 4
> Http request 5
> ...
> Should that stop the test after rutimeControllerMaxSeconds, assuming its defined?
Looks OK.
I had lots of problems trying to get it to work... it did seem to work
for me in some cases...
How about trying the thread group scheduler instead?
Set a startup delay of 0, and a duration of 400 etc
S.
> When will the RuntimeController step in and cancel things. If I have many children does it only check after a pass through the children, which could explain why I see a run time of 21 minutes even though my runtimeController should be stopping after 400 seconds.
>
> Thanks, Bruce
>
>
>
> sebb wrote:
> On 02/05/06, bgordon wrote:
> > the RuntimeController doesn't seem to stop my jmx scripts. I see that there is
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=35059
> >
> > Should that be fixed my my 2.1.1 version or do I need to download a newer one?
>
> IIRC, I've not made any fixes in that area since 2.1.1, but there are
> a lot of other fixes in the current nightly which might possibly have
> helped.
>
> All I can say, is try it and see ...
>
> Thanks, Bruce
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: RuntimeController
Posted by sebb <se...@gmail.com>.
On 02/05/06, bgordon <bb...@yahoo.com> wrote:
> I've downloaded and tried version jakarta-jmeter-2-1.20060430 and I still have the same error. I want to verify that I'm using RuntimeController properly. I have
> ThreadGroup "TransactionalRequestor"
> RuntimeController with Runtime (seconds) set to ${__P(runtimeControllerMaxSeconds,180)}
> RandomController
> ThroughputController A
> Http request 1
> Http request 2
> Http request 3
> ThroughputController B
> Http request 4
> Http request 5
> ...
> Should that stop the test after rutimeControllerMaxSeconds, assuming its defined?
Looks OK.
I had lots of problems trying to get it to work... it did seem to work
for me in some cases...
How about trying the thread group scheduler instead?
Set a startup delay of 0, and a duration of 400 etc
S.
> When will the RuntimeController step in and cancel things. If I have many children does it only check after a pass through the children, which could explain why I see a run time of 21 minutes even though my runtimeController should be stopping after 400 seconds.
>
> Thanks, Bruce
>
>
>
> sebb <se...@gmail.com> wrote:
> On 02/05/06, bgordon wrote:
> > the RuntimeController doesn't seem to stop my jmx scripts. I see that there is
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=35059
> >
> > Should that be fixed my my 2.1.1 version or do I need to download a newer one?
>
> IIRC, I've not made any fixes in that area since 2.1.1, but there are
> a lot of other fixes in the current nightly which might possibly have
> helped.
>
> All I can say, is try it and see ...
>
> Thanks, Bruce
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: RuntimeController
Posted by bgordon <bb...@yahoo.com>.
I've downloaded and tried version jakarta-jmeter-2-1.20060430 and I still have the same error. I want to verify that I'm using RuntimeController properly. I have
ThreadGroup "TransactionalRequestor"
RuntimeController with Runtime (seconds) set to ${__P(runtimeControllerMaxSeconds,180)}
RandomController
ThroughputController A
Http request 1
Http request 2
Http request 3
ThroughputController B
Http request 4
Http request 5
...
Should that stop the test after rutimeControllerMaxSeconds, assuming its defined?
When will the RuntimeController step in and cancel things. If I have many children does it only check after a pass through the children, which could explain why I see a run time of 21 minutes even though my runtimeController should be stopping after 400 seconds.
Thanks, Bruce
sebb <se...@gmail.com> wrote:
On 02/05/06, bgordon wrote:
> the RuntimeController doesn't seem to stop my jmx scripts. I see that there is
> http://issues.apache.org/bugzilla/show_bug.cgi?id=35059
>
> Should that be fixed my my 2.1.1 version or do I need to download a newer one?
IIRC, I've not made any fixes in that area since 2.1.1, but there are
a lot of other fixes in the current nightly which might possibly have
helped.
All I can say, is try it and see ...
Thanks, Bruce
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: RuntimeController
Posted by sebb <se...@gmail.com>.
On 02/05/06, bgordon <bb...@yahoo.com> wrote:
> the RuntimeController doesn't seem to stop my jmx scripts. I see that there is
> http://issues.apache.org/bugzilla/show_bug.cgi?id=35059
>
> Should that be fixed my my 2.1.1 version or do I need to download a newer one?
IIRC, I've not made any fixes in that area since 2.1.1, but there are
a lot of other fixes in the current nightly which might possibly have
helped.
All I can say, is try it and see ...
Thanks, Bruce
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
RuntimeController
Posted by bgordon <bb...@yahoo.com>.
the RuntimeController doesn't seem to stop my jmx scripts. I see that there is
http://issues.apache.org/bugzilla/show_bug.cgi?id=35059
Should that be fixed my my 2.1.1 version or do I need to download a newer one? Thanks, Bruce
Re: HTTPClient SSL certificates
Posted by Tim Hepner <ti...@metnet.navy.mil>.
I don't think I've every successfully imported a certificate. Using
keytool(keytool -list -v -keystore cacerts) I listed the contents of
java/jre1.5.0_06/lib/security/cacerts. I didn't see the certificate I
needed there. Is there another place java could be looking? I'm not
sure where to get the certificate to import. Should I go to the website
and then export it from my browser?
sebb wrote:
> On 02/05/06, Tim Hepner <ti...@metnet.navy.mil> wrote:
>> I'm getting the following error when attempting to connect over https
>> using the HttpClient sampler.
>>
>> javax.net.ssl.SSLHandshakeException:
>> sun.security.validator.ValidatorException: PKIX path building failed:
>> sun.security.provider.certpath.SunCertPathBuilderException: unable to
>> find valid certification path to requested target
>> at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
>> Source)
>> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
>> at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
>>
>
> I get a different error using 2.1.1: and Java 1.4.2:
>
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: No trusted certificate
> found
> at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
> at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
> at
> org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1368)
>
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
> at
> org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:799)
>
> at
> org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2277)
>
> at
> org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2657)
>
> at
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1093)
>
> at
> org.apache.jmeter.protocol.http.sampler.HTTPSampler2.sample(HTTPSampler2.java:436)
>
> at
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:514)
>
> at
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:503)
>
> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
> at java.lang.Thread.run(Thread.java:534)
> Caused by: sun.security.validator.ValidatorException: No trusted
> certificate found
> at
> sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
>
> at
> sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
>
> at sun.security.validator.Validator.validate(Validator.java:202)
> at
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
>
> at
> com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
>
> ... 19 more
>
> Did you get the same error before you tried adding the certs?
>
> BTW, it's best not to have spaces in the JMeter installation path.
>
> S
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
--
Tim Hepner
CSC Contractor
Fleet Numerical Meteorology and Oceanography Center
831.656.4673
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: HTTPClient SSL certificates
Posted by sebb <se...@gmail.com>.
On 02/05/06, Tim Hepner <ti...@metnet.navy.mil> wrote:
> I'm getting the following error when attempting to connect over https
> using the HttpClient sampler.
>
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target
> at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
> at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
>
I get a different error using 2.1.1: and Java 1.4.2:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate
found
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
at org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1368)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:799)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2277)
at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2657)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1093)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler2.sample(HTTPSampler2.java:436)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:514)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:503)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
at java.lang.Thread.run(Thread.java:534)
Caused by: sun.security.validator.ValidatorException: No trusted
certificate found
at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
at sun.security.validator.Validator.validate(Validator.java:202)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA12275)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA12275)
... 19 more
Did you get the same error before you tried adding the certs?
BTW, it's best not to have spaces in the JMeter installation path.
S
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: HTTP Request HTTPClient SSL protocol doesn`t work
Posted by sebb <se...@gmail.com>.
On 02/05/06, Hans L <ha...@gmail.com> wrote:
> sebb wrote:
> > On 01/05/06, Hans L <ha...@gmail.com> wrote:
> >> Well, no -- there hadn't been anything interesting in there. There was
> >> a "No key found" exception, but that didn't seem to be critical to the
> >> success of the SSL.
> >
> > Yes, it seems that can be ignored.
> >
> >> The strange thing is that when I created a new JMeter project and
> >> created a single connection test, that seemed to work .... So now I'm
> >> left thinking that perhaps this has to do with the default HTTP request
> >> properties not being propagated down to the individual HTTP Request
> >> samplers ... I'm going to continue testing this tomorrow.
> >
> > As far as I know, that works in 2.1.1
> >
> > There is a problem with the Java HTTP Sampler in 2.1.1, which means
> > that the first SSL request will always fail; this has been fixed in
> > the nightly build.
> >
> > Or you could try using the HTTP Client Sampler - this won't work with
> > expired or untrusted certificates (yet). The nightly build fixes a
> > problem with cookies.
>
> Thanks for the help. Yes, I am using the nightly build exactly because
> of the cookie issue -- took me awhile of mucking through the source
> before I finally decided to just try the latest build. My issue is that
> my cert for development & QA is self-signed. Following the instructions
> posted earlier in the thread, I was able to get that cert trusted in my
> keystore. It would be really nice if the documentation in the SSL area
> addressed this. I'd be happy to write up what worked for me -- do you
> know the official channel for submitting stuff like that?
>
Patches (especially documentation!) are always welcome.
Please create a Bugzilla issue, and then attach the patch to that.
Note that the documentation is created from XML source files (using
Anakia), so if it is not easy for you to edit these, please just
provide details of where to make the change, and just include the
plain text.
Another route for documentation is for you to update the JMeter Wiki yourself.
That will appear immediately, whereas documentation updates normally
only appear with the next release (and in the nightlies, of course).
S.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: HTTPClient SSL certificates
Posted by rubal <cs...@smart421.com>.
Hi guys,
I am new to HTTPS/SSL setup in Jmeter.I desparately need help in setting up
HTTPS with Jmeter on Windows.My problem is very trivial,
The url is working fine in browser but not in AJM(apache jmeter)
-I created HTTP Request Sampler & used HTTPS protocol under HTTP Request
-For URL https://registration.o2.co.uk/Register/PreRegister ,the Server name
is set to registration.o2.co.uk & Path = /Register/PreRegister.
-Changed keystore in jmeter.properties as,(Though I am not sure if I need
keystore setup)
javax.net.ssl.keyStore=C:/j2sdk1.4.2_10/jre/lib/security/cacerts
javax.net.ssl.keyStorePassword=changeit
-I cannot setup classpath of jsse.jar in properties files as well.The last
line in my properties file read as user.classpath=../lib/jsse.jar;
Can you give me any idea of how to fix it.It would be helpful it you can
tell me what I need to do for classpath & keystore/password in
jmeter.properties file.
Many thanks in advance,
Charan
--
View this message in context: http://www.nabble.com/HTTP-Request-HTTPClient-SSL-protocol-doesn%60t-work-t1438037.html#a4885032
Sent from the JMeter - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
HTTPClient SSL certificates
Posted by Tim Hepner <ti...@metnet.navy.mil>.
I'm getting the following error when attempting to connect over https
using the HttpClient sampler.
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
The Http sampler works fine but freezes on long tests(Hopefully
HttpClient will resolve that issue). I think I need to import a
certificate but all attempts to do this have failed. It seems that a
lot of people are having similar trouble. Can someone walk through an
example of getting a cert from a website and importing it so the
HttpClient sampler will work? See below for more information on the
error message I received.
thanks,
Tim
For this test I downloaded a fresh copy of jmeter 2.1.1. I created a
thread group only containing a results tree and an HTTP Request
HTTPClient with the following configuration. This site is public so you
should be able to duplicate this.
server: www.fnmoc.navy.mil
port: 443
Protocol: https
path: /
**jmeter.log**
2006/05/02 11:26:39 INFO - jmeter.util.JMeterUtils: Setting Locale to
en_US
2006/05/02 11:26:39 INFO - jmeter.JMeter: Version 2.1.1
2006/05/02 11:26:39 INFO - jmeter.JMeter: java.version=1.5.0_06
2006/05/02 11:26:39 INFO - jmeter.JMeter: Locale=English (United States)
2006/05/02 11:26:39 INFO - jmeter.JMeter: Copyright (c) 1998-2005 The
Apache Software Foundation
2006/05/02 11:26:39 INFO - jmeter.JMeter: Loaded icon properties from
org/apache/jmeter/images/icon.properties
2006/05/02 11:26:42 INFO -
jmeter.protocol.http.sampler.AccessLogSamplerBeanInfo: Entered access
log sampler bean info
2006/05/02 11:26:42 INFO -
jmeter.protocol.http.sampler.AccessLogSamplerBeanInfo: found parsers:
[org.apache.jmeter.protocol.http.util.accesslog.OrderPreservingLogParser,
org.apache.jmeter.protocol.http.util.accesslog.SharedTCLogParser,
org.apache.jmeter.protocol.http.util.accesslog.TCLogParser]
2006/05/02 11:26:42 INFO -
jmeter.protocol.http.sampler.AccessLogSamplerBeanInfo: Got to end of
access log samper bean info init
2006/05/02 11:26:42 WARN - jmeter.gui.util.MenuFactory: Missing jar?
Could not create org.apache.jmeter.visualizers.MailerVisualizer.
java.lang.NoClassDefFoundError: javax/mail/MessagingException
2006/05/02 11:26:42 INFO - jmeter.samplers.SampleResult: Note: Sample
TimeStamps are END times
2006/05/02 11:26:42 INFO - jmeter.samplers.SampleResult:
sampleresult.default.encoding is set to ISO-8859-1
2006/05/02 11:26:48 INFO - jmeter.gui.action.Load: Loading file:
C:\Documents and Settings\hepnert\Desktop\jakarta-jmeter-2.1.1\test.jmx
2006/05/02 11:26:48 INFO - jmeter.protocol.http.sampler.HTTPSampler2:
httpsampler2.basicauth=false
2006/05/02 11:26:48 INFO - jmeter.save.SaveService: Using SaveService
properties file 1.7
2006/05/02 11:26:48 WARN - jmeter.save.SaveService: Could not set up
alias WebServiceSampler java.lang.NoClassDefFoundError:
javax/mail/MessagingException
2006/05/02 11:26:48 INFO - jmeter.save.SaveService: All converter
versions present and correct
2006/05/02 11:27:00 INFO - jmeter.engine.StandardJMeterEngine: Running
the test!
2006/05/02 11:27:00 INFO - jmeter.gui.util.JMeterMenuBar:
setRunning(true,local)
2006/05/02 11:27:00 INFO - jmeter.engine.StandardJMeterEngine: Starting
1 threads for group Thread Group. Ramp up = 1.
2006/05/02 11:27:00 INFO - jmeter.engine.StandardJMeterEngine: Continue
on error
2006/05/02 11:27:00 WARN - jmeter.threads.JMeterThread:
jmeterthread.startearlier=true (see jmeter.properties)
2006/05/02 11:27:00 INFO - jmeter.threads.JMeterThread: Thread Thread
Group 1-1 started
2006/05/02 11:27:01 INFO - jmeter.threads.JMeterThread: Thread Thread
Group 1-1 is done
2006/05/02 11:27:01 INFO - jmeter.engine.StandardJMeterEngine: Ending
thread 0
2006/05/02 11:27:01 INFO - jmeter.engine.StandardJMeterEngine: Stopping
test
2006/05/02 11:27:01 INFO - jmeter.engine.StandardJMeterEngine:
Notifying test listeners of end of test
2006/05/02 11:27:01 INFO - jmeter.gui.util.JMeterMenuBar:
setRunning(false,local)
2006/05/02 11:27:01 INFO - jmeter.engine.StandardJMeterEngine: Test has
ended
**jmeter.log**
**Entire Error Message**
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown
Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at
org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1368)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:799)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2277)
at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2657)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1093)
at
org.apache.jmeter.protocol.http.sampler.HTTPSampler2.sample(HTTPSampler2.java:436)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:514)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:503)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
at java.lang.Thread.run(Unknown Source)
Caused by: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown
Source)
... 20 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown
Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 25 more
**Entire Error Message**
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: HTTP Request HTTPClient SSL protocol doesn`t work
Posted by Hans L <ha...@gmail.com>.
sebb wrote:
> On 01/05/06, Hans L <ha...@gmail.com> wrote:
>> Well, no -- there hadn't been anything interesting in there. There was
>> a "No key found" exception, but that didn't seem to be critical to the
>> success of the SSL.
>
> Yes, it seems that can be ignored.
>
>> The strange thing is that when I created a new JMeter project and
>> created a single connection test, that seemed to work .... So now I'm
>> left thinking that perhaps this has to do with the default HTTP request
>> properties not being propagated down to the individual HTTP Request
>> samplers ... I'm going to continue testing this tomorrow.
>
> As far as I know, that works in 2.1.1
>
> There is a problem with the Java HTTP Sampler in 2.1.1, which means
> that the first SSL request will always fail; this has been fixed in
> the nightly build.
>
> Or you could try using the HTTP Client Sampler - this won't work with
> expired or untrusted certificates (yet). The nightly build fixes a
> problem with cookies.
Thanks for the help. Yes, I am using the nightly build exactly because
of the cookie issue -- took me awhile of mucking through the source
before I finally decided to just try the latest build. My issue is that
my cert for development & QA is self-signed. Following the instructions
posted earlier in the thread, I was able to get that cert trusted in my
keystore. It would be really nice if the documentation in the SSL area
addressed this. I'd be happy to write up what worked for me -- do you
know the official channel for submitting stuff like that?
Thanks,
Hans
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: HTTP Request HTTPClient SSL protocol doesn`t work
Posted by sebb <se...@gmail.com>.
On 01/05/06, Hans L <ha...@gmail.com> wrote:
> Well, no -- there hadn't been anything interesting in there. There was
> a "No key found" exception, but that didn't seem to be critical to the
> success of the SSL.
Yes, it seems that can be ignored.
> The strange thing is that when I created a new JMeter project and
> created a single connection test, that seemed to work .... So now I'm
> left thinking that perhaps this has to do with the default HTTP request
> properties not being propagated down to the individual HTTP Request
> samplers ... I'm going to continue testing this tomorrow.
As far as I know, that works in 2.1.1
There is a problem with the Java HTTP Sampler in 2.1.1, which means
that the first SSL request will always fail; this has been fixed in
the nightly build.
Or you could try using the HTTP Client Sampler - this won't work with
expired or untrusted certificates (yet). The nightly build fixes a
problem with cookies.
S.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: HTTP Request HTTPClient SSL protocol doesn`t work
Posted by Hans L <ha...@gmail.com>.
Well, no -- there hadn't been anything interesting in there. There was
a "No key found" exception, but that didn't seem to be critical to the
success of the SSL.
The strange thing is that when I created a new JMeter project and
created a single connection test, that seemed to work .... So now I'm
left thinking that perhaps this has to do with the default HTTP request
properties not being propagated down to the individual HTTP Request
samplers ... I'm going to continue testing this tomorrow.
Thanks for the very quick reply -
Hans
sebb wrote:
> Any messages in jmeter.log?
>
> On 01/05/06, Hans L <ha...@gmail.com> wrote:
>> Hi,
>>
>> I realize this is a popular topic, but I'm having a similar problem & am
>> unable to resolve it using suggestions from the list.
>>
>> sebb wrote:
>> > On 13/04/06, Yefym Dmukh <ye...@gmail.com> wrote:
>> >> OK,
>> >> it is working now.
>> >
>> > Glad to hear it:
>> >
>> >> solution was:
>> >> 1. to update from 1.5.02 to 1.5.06
>> >> 2. add the public key (server.crt in x509 ) to the java keystore
>> >> $ keytool -import -trustcacerts -alias "devbeta" -file
>> >> ../../../performance/jakarta-jmeter-2.1.1/TestPlans/
>> >> crts/devbeta.x509 -keystore f:/java/jre1.5.0_06/lib/security/cacerts
>> >>
>> >
>> > Thanks for the info.
>>
>> I followed those exact steps in my setup, and indeed it *seems* that the
>> SSL decryption is working at some level -- the debug statements printed
>> to STDERR are showing decrypted the contents of the page(s) I'm trying
>> to load.
>>
>> All my assertions fail, though, and when I look at my listener logs I
>> see "Non HTTP response code" for all the responses.
>>
>> I double checked that I'm using HTTPS and port 443. I've been working
>> at this for several hours; I'm not sure what to possibly check next.
>>
>> Thanks in advance for any help -
>>
>> Hans
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: HTTP Request HTTPClient SSL protocol doesn`t work
Posted by sebb <se...@gmail.com>.
Any messages in jmeter.log?
On 01/05/06, Hans L <ha...@gmail.com> wrote:
> Hi,
>
> I realize this is a popular topic, but I'm having a similar problem & am
> unable to resolve it using suggestions from the list.
>
> sebb wrote:
> > On 13/04/06, Yefym Dmukh <ye...@gmail.com> wrote:
> >> OK,
> >> it is working now.
> >
> > Glad to hear it:
> >
> >> solution was:
> >> 1. to update from 1.5.02 to 1.5.06
> >> 2. add the public key (server.crt in x509 ) to the java keystore
> >> $ keytool -import -trustcacerts -alias "devbeta" -file
> >> ../../../performance/jakarta-jmeter-2.1.1/TestPlans/
> >> crts/devbeta.x509 -keystore f:/java/jre1.5.0_06/lib/security/cacerts
> >>
> >
> > Thanks for the info.
>
> I followed those exact steps in my setup, and indeed it *seems* that the
> SSL decryption is working at some level -- the debug statements printed
> to STDERR are showing decrypted the contents of the page(s) I'm trying
> to load.
>
> All my assertions fail, though, and when I look at my listener logs I
> see "Non HTTP response code" for all the responses.
>
> I double checked that I'm using HTTPS and port 443. I've been working
> at this for several hours; I'm not sure what to possibly check next.
>
> Thanks in advance for any help -
>
> Hans
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org