I can't get 'create-rmi-keystore.bat' to run on windows, is there a solution to this? - windows

I am new to Jmeter 5.1.1 however I am in the process of setting up a remote testing with it.
One step I'm having trouble with is running 'create-rmi-keystore.bat' when I double click it nothing happens. I have tried to open it using the command line and get the following message.
'keytool' is not recognized as an internal or external command,
operable program or batch file.
"Copy the generated rmi_keystore.jks to jmeter/bin folder or reference it in property 'server.rmi.ssl.keystore.file'"
I don't seem to have a rmi-keystore.jks .
Has anyone managed to solve this issue?

You don't have keytool utility in your Windows PATH, all you need to do is to ensure that it's there.
Solution using Windows Command Prompt would be:
set PATH="path\to\bin\folder\of\your\JDK\or\JRE\installation";%PATH%
In general if you don't need the secure RMI communication between JMeter master and slave machines (and 99% of people don't need this as it doesn't add any value and only creates overhead in terms of CPU and RAM) you can just disable this functionality by adding the next line to user.properties file:
server.rmi.ssl.disable=true
References:
Remote hosts and RMI configuration
Apache JMeter Properties Customization Guide
If you do this on JMeter master and all the slaves you will not have to worry about the RMI keystore, but I would still recommend having the keytool in the PATH otherwise you will not be able to use HTTP(S) Test Script Recorder for recording secure traffic.

Related

Jmeter cannot find keytool application and no keystore was provided. Tried alll

Im working with Jmeter, trying to running it as a proxy, but when I start recording, I got this alert. I tried setting user.properties, but i can’t find a solution. Please, so grateful if you help me!
In order to be able to record HTTPS traffic JMeter generates special MITM certificate which needs to be installed in the browser
In order to be able to generate the certificate JMeter needs keytool command which normally lives in "bin" folder of JDK or JRE
So make sure to add the "bin" folder of your Java installation to your operating system PATH and it should resolve your issue.
Example command on Windows:
setx PATH=c:\java\bin;%PATH% && jmeter.bat
Example command on Unix and derivatives:
PATH=/opt/java/bin:$PATH && ./jmeter.sh
Replace c:\java or /opt/java with the real path to your JDK or JRE installation.
You should get something like:
if you launch JMeter from the same terminal window you will be able to start the HTTP(S) Test Script Recorder without any issues
Also be aware that there is an easier way of recording a JMeter test: JMeter Chrome Extension, in this case you won't have to worry about proxies and SSL certificates

What update is needed in jmeter.properties and jmeter-server files to create a JMeter Remote Load Test

I am using jmeter 5.4.1, and facing issue while setting up the whole environment for that.
I have firewall in between master and slave machines.
I can request for some ports to open but before that I want to know how to configure them?
What update is needed in jmeter.properties and jmeter-server files to create a JMeter Remote Load Test.
In jmeter.properties nothing, don't touch this file, perform all the configuration either in user.properties or via -J command-line arguments.
Coming back to your question, I believe the official documentation is quite comprehensive, however just in case you cannot or unwilling to read:
In the master:
remote_hosts=ip,addresses,or,dns,hostnames,of,slaves,separated,by,comma
client.rmi.localport=xxxx
In the slave(s):
client.rmi.localport=xxxx
server.rmi.localport=yyyy
If you don't want secure communication between master and slaves - add the next line to both as well:
server.rmi.ssl.disable=true
So in the firewall you need to open these xxxx and yyyy ports
More information:
Apache JMeter Distributed Testing Step-by-step
Remote hosts and RMI configuration
JMeter Distributed Testing with Docker

JMeter Error is showing for distributed environment

I have Set up everything, running Jmeter-Server.bat file in slave system, added IP in Jmeter.properties. It was running before one month properly, but when I am trying to run, Its showing me the Error.
Most probably there is a mismatch between certificates in master and slave(s) or 7 days had passed since the last keystore creation so the certificates are exired now.
Either follow steps from Setting up SSL one more time and make sure to use exactly the same rmi_keystore.jks file on master and all the slaves or define the following property:
server.rmi.ssl.disable=true
This can be done either by adding the above line to user.properties file or alternatively you can provide it using -J command-line argument like:
jmeter -Jserver.rmi.ssl.disable=true ..... - on master
jmeter-server -Jserver.rmi.ssl.disable=true ..... - on slaves
More information:
Remote hosts and RMI configuration
Apache JMeter Properties Customization Guide
Overriding Properties Via The Command Line

JMeter - Error when starting test plan- keytool error: proxysever.jks (access is denied)

I am following JMeter User guide to start recording my first test plan. When I click the Start button in HTTP Test Script Recorder, I got this error:
Could not create script recorder – see log for details >> keytool error:java.io.FileNotFoundException: proxyserver.jks (Access is denied)
How could I fix this error? Thanks in advance.
Background: JMeter creates a self-signed SSL certificate in order to be able to decrypt and record HTTPS requests, this proxyserver.jks is a Java Keystore which is being generated by JMeter in its "bin" folder when you start HTTP(S) Test Script Recorder proxy
Explanation: The error you are getting most probably indicates that you don't have permissions to write anything into the "bin" folder of your JMeter installation
Workarounds:
You can try launching JMeter with elevated rights (run as administrator or superuser or whoever having write access to JMeter's "bin" folder
You can change the location where JMeter tries to generate this proxyserver.jks file by adding the next line to user.properties file:
proxy.cert.directory=/path/to/folder/where/you/have/write/access
JMeter restart will be required to pick the property up.
Another option is passing the property value via -J command-line argument like
jmeter -Jproxy.cert.directory=/path/to/folder/where/you/have/write/access -n -t ....
Check out Apache JMeter Properties Customization Guide for more information regarding JMeter properties and ways of setting and overriding them
One workaround that worked for me was to start JMeter.bat from bin folder from cmd which was "run as administrator". After this, the error was gone.

PerfMon plugin throwing error (with use of variables) in JMeter distributed Mode

I have implemented PerfMon Metrics Collector (listeners) in my JMeter scripts. These listeners have HOST and PORT fields. I have defined variables for these in Test Plan and using them in listeners.
I tested these scripts in non-distributed mode and it worked perfectly.
Now, I converted my scripts for distributed mode. Everything works fine except PerfMon listeners which throw following error message:
2016/02/29 09:06:35 ERROR - kg.apc.jmeter.perfmon.PerfMonCollector: Perfmon plugin error: java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
This error seemed to be related to invalid value (may be these listeners do not handle special characters like {} $ in distributed mode!!). So, I removed variables for HOST/PORT and instead used hard coded values and it worked fine.
So apparently, these listeners do not work properly in distributed mode (IF used with variables).
Is there any workaround for this issue as I have plenty of PerfMon listeners in my setup and manually changing them all will be a tiresome job.
Go for JMeter Properties instead of JMeter Variables, like:
Substitute ${HOST} with ${__P(HOST,)}
Substitute ${PORT} with ${__P(PORT,)}
Pass HOST and PORT properties values on JMeter master side like:
jmeter -GHOST=target_hostname_or_IP -GPORT=target_port -s -n -t ....
You can have different values on different slaves, in that case specify properties in user.properties file (it's located under /bin folder of JMeter installation) like:
HOST=10.20.30.40
PORT=1234
Remember to restart JMeter after editing any configuration file.
References:
__P() function documentation
Full list of command-line options
Apache JMeter Properties Customization Guide

Resources