apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.41k stars 2.1k forks source link

ERROR - jmeter.util.SSLManager: Couldn't load keystore java.lang.Exception: No key found #1854

Closed asfimport closed 17 years ago

asfimport commented 17 years ago

rashi (Bug 41486): Hi ,

I am trying to develop a web test plan using Jmeter Version 2.2 but everytime when I execute the test plan , I am getting an error related to SSL Configuration in the Jmeter.log File.

ERROR - jmeter.util.SSLManager: Couldn't load keystore java.lang.Exception: No key found at org.apache.jmeter.util.keystore.DefaultKeyStore.load (DefaultKeyStore.java:68) at org.apache.jmeter.util.SSLManager.getKeyStore(SSLManager.java:154) at org.apache.jmeter.util.JsseSSLManager.getContext (JsseSSLManager.java:141) at org.apache.jmeter.util.JsseSSLManager.<init>(JsseSSLManager.java:88) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.jmeter.util.SSLManager.getInstance(SSLManager.java:231) at org.apache.jmeter.protocol.http.sampler.HTTPSampler.setupConnection (HTTPSampler.java:148) at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample (HTTPSampler.java:404) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample (HTTPSamplerBase.java:658) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample (HTTPSamplerBase.java:647) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247) at java.lang.Thread.run(Unknown Source)

According to the suggestions mailed on some of the websites I have performed the following steps:

  1. Installed jsse1.0.3_04 on my local machine.

  2. I have exported the certification for our SPM application in BASE -64 encode X.509 (.cer) format---available at my end and save it in C:.

  3. Then run the following keytool command:

keytool -import -keystore xyz -alias xyz -file c:\xyz.cer Enter keystore password: welcome

4.Rename the xyz to jssecacerts and put in c:\Program File\java\j2re1.4.2 \lib\security\ and also put the same at C:\j2sdk1.4.2_03\jre\lib\security also.

  1. Then performed some changes in the Jmeter.properties file.

ssl.provider=com.sun.net.ssl.internal.ssl.Provider----uncommented this line ssl.pkgs=com.sun.net.ssl.internal.www.protocol---------------uncommented this line.

javax.net.ssl.trustStore=C:\j2sdk1.4.2_03\jre\lib\security\jssecacerts----- (put the path) javax.net.ssl.keyStore=C:\j2sdk1.4.2_03\jre\lib\security\jssecacerts------- (put the path)

javax.net.ssl.keyStorePassword=welcome

Even after performing all the above steps , I am not able to get rid of the error. Pls take a look and suggest the solution.

Severity: critical OS: AIX

asfimport commented 17 years ago

Sebb (migrated from Bugzilla): Might be worth trying the nightly build:

http://people.apache.org/builds/jakarta-jmeter/nightly/

asfimport commented 17 years ago

rashi (migrated from Bugzilla): (In reply to comment 1)

Might be worth trying the nightly build: http://people.apache.org/builds/jakarta-jmeter/nightly/

Hi Sebb, Thanks for ur guidance and suggestions but after using the nightly build dated on 18th Jan and 24th Jan I am still getting the same error.Kindly suggest more on this

asfimport commented 17 years ago

Sebb (migrated from Bugzilla): Does the test work, even though the error occurs?

If so, please ignore the error - it will be fixed ay some point.

asfimport commented 17 years ago

rashi (migrated from Bugzilla): (In reply to comment 3)

Does the test work, even though the error occurs? If so, please ignore the error - it will be fixed ay some point.

No its not working bcoz due to teh SSL ERROR i am not able to create a session in my web application.

asfimport commented 17 years ago

Sebb (migrated from Bugzilla): When I tried last night, I got the error, but JMeter loaded the page anyway.

Can you check if the page(s) are loaded - add a Tree View Listener if necessary.

asfimport commented 17 years ago

rashi (migrated from Bugzilla): (In reply to comment 5)

When I tried last night, I got the error, but JMeter loaded the page anyway. Can you check if the page(s) are loaded - add a Tree View Listener if necessary.

I have tried with Tree View Listner but the problem is when I do the login then it will divert me to the session ended page not to the desired one bcoz session does not get created and I got the error in the log file that Could not found the keystore value.

asfimport commented 17 years ago

Sebb (migrated from Bugzilla): That is not an SSL problem. If the keystore error was causing problems you would not see any pages returned when using SSL. Most likely you have not set up a Cookie Manager.

asfimport commented 17 years ago

rashi (migrated from Bugzilla): (In reply to comment 7)

That is not an SSL problem. If the keystore error was causing problems you would not see any pages returned when using SSL. Most likely you have not set up a Cookie Manager.

Hi Sebb, I have tried with HTTP Cookie manager also . But all in vain . I am describing the test plan below i.e JMX file .If have you any other example to create a web test plan for SSL certified site then it would be very helpfull for me. Please have a look on attached document and let me know wht should I do?

Serchpage.jmx <jmeterTestPlan version="1.2" properties="1.8"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> <stringProp name="TestPlan.user_define_classpath"></stringProp> <boolProp name="TestPlan.serialize_threadgroups">true</boolProp> <boolProp name="TestPlan.functional_mode">true</boolProp> <stringProp name="TestPlan.comments"></stringProp> </TestPlan> <hashTree> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="CDTALPHA" enabled="true"> <longProp name="ThreadGroup.start_time">1168925958000</longProp> <stringProp name="ThreadGroup.delay"></stringProp> <stringProp name="ThreadGroup.duration"></stringProp> <stringProp name="ThreadGroup.num_threads">1</stringProp> <boolProp name="ThreadGroup.scheduler">false</boolProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> <stringProp name="LoopController.loops">1</stringProp> <boolProp name="LoopController.continue_forever">false</boolProp> </elementProp> <longProp name="ThreadGroup.end_time">1168925958000</longProp> <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <stringProp name="ThreadGroup.ramp_time">1</stringProp> </ThreadGroup> <hashTree> <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Server login" enabled="true"> <stringProp name="HTTPSampler.path"></stringProp> <stringProp name="HTTPSampler.domain">www- sso.toronto.ca.ibm.com</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <boolProp name="HTTPSampler.image_parser">true</boolProp> <stringProp name="HTTPSampler.port">80</stringProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> </ConfigTestElement> <hashTree/> <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true"> <boolProp name="CookieManager.clearEachIteration">false</boolProp> <collectionProp name="CookieManager.cookies"/> </CookieManager> <hashTree/> <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Login page" enabled="true"> <stringProp name="HTTPSampler.path">/wwwalpha/pc/partner/spdb/index.html</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <boolProp name="HTTPSampler.image_parser">true</boolProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <stringProp name="HTTPSampler.port">80</stringProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> <stringProp name="HTTPSampler.mimetype"></stringProp> <stringProp name="HTTPSampler.FILE_FIELD"></stringProp> <stringProp name="HTTPSampler.monitor">false</stringProp> <stringProp name="HTTPSampler.domain">www- sso.toronto.ca.ibm.com</stringProp> <stringProp name="HTTPSampler.FILE_NAME"></stringProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> </HTTPSampler> <hashTree/> <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="sign page" enabled="true"> <stringProp name="HTTPSampler.path">/usrsrvc/account/userservices/ait/jsp/login.jsp</string Prop> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <stringProp name="HTTPSampler.port">80</stringProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <stringProp name="Argument.metadata">=</stringProp> <stringProp name="Argument.value">rashi.sharma@in.ibm.com</stringProp> <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">username</stringProp> <boolProp name="HTTPArgument.always_encode">true</boolProp> </elementProp> <elementProp name="" elementType="HTTPArgument"> <stringProp name="Argument.metadata">=</stringProp> <stringProp name="Argument.value">get1ibm1</stringProp> <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">password</stringProp> <boolProp name="HTTPArgument.always_encode">true</boolProp> </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.mimetype"></stringProp> <stringProp name="HTTPSampler.FILE_FIELD"></stringProp> <stringProp name="HTTPSampler.monitor">false</stringProp> <stringProp name="HTTPSampler.domain">www- sso.toronto.ca.ibm.com</stringProp> <stringProp name="HTTPSampler.FILE_NAME"></stringProp> <boolProp name="HTTPSampler.auto_redirects">true</boolProp> </HTTPSampler> <hashTree/> <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="search page" enabled="true"> <stringProp name="HTTPSampler.path">/wwwalpha/pc/partner/spdb/userServlet.wss</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <stringProp name="HTTPSampler.port">80</stringProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> <stringProp name="HTTPSampler.mimetype"></stringProp> <stringProp name="HTTPSampler.FILE_FIELD"></stringProp> <stringProp name="HTTPSampler.monitor">false</stringProp> <stringProp name="HTTPSampler.domain">www- sso.toronto.ca.ibm.com</stringProp> <stringProp name="HTTPSampler.FILE_NAME"></stringProp> <boolProp name="HTTPSampler.auto_redirects">true</boolProp> </HTTPSampler> <hashTree/> <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Final page" enabled="true"> <stringProp name="HTTPSampler.path">/wwwalpha/pc/partner/spdb/adminServlet.wss</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <stringProp name="HTTPSampler.port">80</stringProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> <stringProp name="HTTPSampler.mimetype"></stringProp> <stringProp name="HTTPSampler.FILE_FIELD"></stringProp> <stringProp name="HTTPSampler.monitor">false</stringProp> <stringProp name="HTTPSampler.domain">www- sso.toronto.ca.ibm.com</stringProp> <stringProp name="HTTPSampler.FILE_NAME"></stringProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> </HTTPSampler> <hashTree/> <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true"> <objProp> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError>

<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <url>true</url> </value> <name>saveConfig</name> </objProp> <stringProp name="filename">cdtalpha.txt</stringProp> <boolProp name="ResultCollector.error_logging">false</boolProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Results" enabled="true"> <objProp> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError>

<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> </value> <name>saveConfig</name> </objProp> <stringProp name="filename">cdtgraph.txt</stringProp> <boolProp name="ResultCollector.error_logging">false</boolProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> <objProp> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError>

<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> </value> <name>saveConfig</name> </objProp> <stringProp name="filename"></stringProp> <boolProp name="ResultCollector.error_logging">false</boolProp> </ResultCollector> <hashTree/> </hashTree> </hashTree> </hashTree> </jmeterTestPlan>