JMeter - HTTPS proxy recorder - Cannot find keytool application and no keystore was provided

579 views Asked by At

I am struggling with this error to record a scenario using JMeter 5.1.1. When the start button is clicked, the pop message suggests an error and checking it further in logs, receive an error "could not initialize key store"

enter image description here

To resolve this, I provided the below setting in system.properties file but it did not work

keytool.directory=C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.242-3\bin

Further, setting Java_Home and Path in Jmeter.bat file also did not help

SET JAVA_HOME=C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.242-3 SET PATH=%PATH%;%JAVA_HOME%\bin

2020-10-05 21:08:45,453 ERROR o.a.j.p.h.p.ProxyControl: Could not initialise key store
java.io.IOException: Cannot find keytool application and no keystore was provided**
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.initKeyStore(ProxyControl.java:1494) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.startProxy(ProxyControl.java:540) [ApacheJMeter_http.jar:5.1.1 r1855137]
    at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.startProxy(ProxyControlGui.java:592) [ApacheJMeter_http.jar:5.1.1 r1855137]
2

There are 2 answers

0
fortanu82 On BEST ANSWER

I was using apache 5.1 and upgrading to a latest version 5.3 resolved my problem.

4
Dmitri T On

Using spaces JDK location is not the best idea however if this is something you cannot control you can surround the JDK location with quotation marks like:

SET JAVA_HOME="C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.242-3 SET"

More information: Using Spaces in File Names

There is also alternative way of recording a JMeter test: JMeter Chrome Extension, in this case you won't have to worry about proxies, certificates, keystores, etc.