Reputation: 11
Jmeter. I set the path and password to my jks in system.properties. I execute an HTTP request and see an errors in the logs:
2022-04-07 17:22:54,758 ERROR o.a.j.u.SSLManager: Problem loading keystore: No key(s) found
java.lang.NullPointerException: No key(s) found
and
2022-04-07 17:22:55,257 ERROR o.a.j.u.k.JmeterKeyStore: No var called 'certAlias' found
log:
2-04-07 17:22:54,738 INFO o.a.j.c.KeystoreConfig: Configuring Keystore with (preload: 'True', startIndex: 0, endIndex: -1, clientCertAliasVarName: 'certAlias')
2022-04-07 17:22:54,739 INFO o.a.j.u.JsseSSLManager: Using default SSL protocol: TLS
2022-04-07 17:22:54,740 INFO o.a.j.u.JsseSSLManager: SSL session context: per-thread
2022-04-07 17:22:54,741 INFO o.a.j.u.SSLManager: JmeterKeyStore Location: client.jks type JKS
2022-04-07 17:22:54,744 INFO o.a.j.u.SSLManager: KeyStore created OK
2022-04-07 17:22:54,758 ERROR o.a.j.u.SSLManager: Problem loading keystore: No key(s) found
java.lang.NullPointerException: No key(s) found
at java.util.Objects.requireNonNull(Objects.java:228) ~[?:1.8.0_232]
at org.apache.jmeter.util.keystore.JmeterKeyStore.load(JmeterKeyStore.java:138) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.util.SSLManager.getKeyStore(SSLManager.java:141) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.util.SSLManager.configureKeystore(SSLManager.java:309) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.config.KeystoreConfig.testStarted(KeystoreConfig.java:99) [ApacheJMeter_components.jar:5.2.1]
at org.apache.jmeter.config.KeystoreConfig.testStarted(KeystoreConfig.java:63) [ApacheJMeter_components.jar:5.2.1]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:206) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:381) [ApacheJMeter_core.jar:5.2.1]
at java.lang.Thread.run(Thread.java:819) [?:1.8.0_232]
2022-04-07 17:22:54,765 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2022-04-07 17:22:54,852 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group MyRq REST
2022-04-07 17:22:54,852 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group MyRq REST.
2022-04-07 17:22:54,852 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2022-04-07 17:22:54,853 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=0 delayedStart=false
2022-04-07 17:22:54,863 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2022-04-07 17:22:54,863 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2022-04-07 17:22:55,101 INFO o.a.j.t.JMeterThread: Thread started: Thread Group MyRq REST 1-1
2022-04-07 17:22:55,182 INFO o.a.j.p.h.s.HTTPJavaImpl: Maximum connection retries = 0
2022-04-07 17:22:55,257 ERROR o.a.j.u.k.JmeterKeyStore: No var called 'certAlias' found
Upvotes: 1
Views: 2097
Reputation: 168002
Are you sure that your client.jks
keystore has certificates in it? You can check it by using keytool command like:
keytool -list -v /path/to/your/client.jks
alternatively you can use a GUI-based tool like KeyStore Explorer
No var called 'certAlias' found
indicates that you're using Keystore Configuration element and don't have associated CSV Data Set Config pointing to the file holding certificates aliases. If you plan to use one certificate only and not an individual certificate per user - just remove the Keystore Configuration. If you plan to use multiple certificates - add CSV Data Set Config and set it up to read the CSV file where all certificate aliases will be listed.
Upvotes: 1