Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access denied issue while recording Jmeter script

Tags:

file

jmeter

I am getting file not found exception while start recording..Also, I am not able to find out the RootCA certificate in the JMeter installable folder.

like image 763
Kumar Avatar asked Jun 01 '26 15:06

Kumar


1 Answers

As per TestRecording210 JMeter Wiki Page it happens when user, you run JMeter under, doesn't have write access to JMeter's "bin" folder:

Another cause of errors is where the JMeter bin directory is not writable, as JMeter defaults to creating the keystore in the bin directory. For example

Could not create script recording proxy - see log for details: Command :'"C:\Program Files\Java\jre7\bin\keytool" -genkeypair -alias :root_ca: -dname "CN=_ DO NOT INSTALL unless this is your certificate (JMeter root CA), OU=Username: user, C=US" -keyalg RSA -keystore proxyserver.jks -storepass {redacted) -keypass {redacted) -validity 7 -ext bc:c' failed, code: 1 keytool error: java.io.FileNotFoundException: proxyserver.jks (Access is denied)

The last line shows the cause.

The cure is to tell JMeter where to create the keystore, by defining the property

proxy.cert.directory

In order to do it add the next line to user.properties file (it is located under /bin folder of your JMeter installation)

proxy.cert.directory=/some/folder/you/have/write/access

And on the next JMeter restart it should start working.

You can also consider an alternative way of recording a JMeter test - "SmartJMX" mode available via Mobile Recorder service. In that case you won't have to worry about proxy servers, certificates, etc. Moreover it will even perform automatic correlation so you will be able to safe some time usually required to handle dynamic parameters.

like image 105
Dmitri T Avatar answered Jun 04 '26 13:06

Dmitri T



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!