I am sorry if I am asking a wrong question, I am new to Jmeter.
I am trying to run distributed load on slave machine.
While running test with slave machine [ set properties file at master machine] and Slave Jmeter-server is running
Getting below exception:
Error in rconfigure() method java.rmi.ServerException:
RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.io.InvalidClassException: org.apache.jmeter.protocol.http.control.CacheManager; local class
incompatible: stream classdesc serialVersionUID = 235, local class
serialVersionUID = 236
Could you please help with above error.
Given you have different values in this line
private static final long serialVersionUID = 234L;
it means that the master and the slave are running different version of JMeter
You need to use the same version of JMeter for the master and the slave(s), according to JMeter Best Practices it needs to be the latest version of JMeter
also it's recommended to use:
The same version of Java
The same JMeter Plugins if any
If your test uses external data files (like CSV) or 3rd-party .jar files you need to manually copy them to the slaves prior to running the test
More information: How to Perform Distributed Testing in JMeter
Related
I'm unable to open JMeter in 'Server Mode'. I have followed the following steps.
Steps to reproduce:
Open cmd
To open JMeter in server mode, run the bat file bin\jmeter-server.bat.
Expected Result: JMeter should start in server mode.
Actual Result:
Problem URL:
... Trying JMETER_HOME=..
Found ApacheJMeter_core.jar
Sep 12, 2018 1:33:34 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Server failed to start: java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
An error occurred: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
errorlevel=1
Press any key to continue . . .
C:\Users\rozeena.ibrahim>d:
D:\>cd apache-jmeter-4.0
D:\apache-jmeter-4.0>cd bin
D:\apache-jmeter-4.0\bin>jmeter-server.bat
Could not find ApacheJmeter_core.jar ...
... Trying JMETER_HOME=..
Found ApacheJMeter_core.jar
Sep 12, 2018 1:34:12 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Server failed to start: java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
An error occurred: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
errorlevel=1
Press any key to continue . . .
This is not a bug, since JMeter 4.0 communication between master and slaves is secure (maybe to prevent possible intruders from intercepting JMeter .jtl result file and dying of laughter seeing your system performance metrics) so you need to generate the keystore using create-rmi-keystore.bat first on master and all the slaves.
Alternatively you can disable this piece of functionality and revert back to previous JMeter behaviour by adding the next line to user.properties file:
server.rmi.ssl.disable=true
it needs to be done on all machines
JMeter restart will be required to pick the property up
the change will be permanent, if you want to do it only once - it is better to pass the property via -J command-line argument like:
jmeter-server.bat -Jserver.rmi.ssl.disable=true
More information:
Remote hosts and RMI configuration
Configuring JMeter
Overriding Properties Via The Command Line
JMeter Distributed Testing with Docker
If you just want to run jmeter in NON GUI mode then do this:
jmeter -n -t jmxplan -l results.csv
But if you really want to use distributed testing, then since JMeter 4.0 the default transport mechanism for RMI will use SSL.
SSL needs keys and certificates to work. You will have to create those keys yourself.
You must create the rmi_keystore.jks as per error message.
JMeter comes with a script to generate a keystore that contains one key (and its corresponding certificate) named rmi.
The script is located in the bin directory and is available for Windows systems (called bin/create-rmi-keystore.bat) and Unix like systems (called bin/create-rmi-keystore.sh).
It will generate a key-pair, that is valid for seven days, with a default passphrase of value 'changeit'. It is advised to call it from inside the bin directory.
See:
https://jmeter.apache.org/usermanual/remote-test.html#setup_ssl
Note that disabling SSL mode would be a security issue, so although possible it is not advised
While running JMETER test in Remote machines I am getting this error and i have used 1 master and 4 slaves machines.
Pllease help me to resolve this error, what I need to change in Java or issue with JMETER.
For this test I have used JMETER 3.2 & Java 8 for all machines.
Getting an error
meter.engine.ClientJMeterEngine: Error in rconfigure() method java.rmi.MarshalException: error marshalling arguments; nested exception is: java.net.SocketException: Broken pipe" when running the jmeter in docker swarm mode 1 master and 1 slave.
This error log is from the docker-machine jmeter master details. Please suggest what could be the issue.
Able to resolve the issue by adding standard and extra libs plugins to my jmeter under lib/ext folder. Thank you.
I have checked all setting on master and slave. All seems correct. When I start from host in jmeter. Getting following error :
Not sure if it is problem of ultimate thread group plugin or master/slave setting. If I do start from host with default jmeter test plan then it works fine.
I have not installed ultimate thread group on server. Should I install on server as well?
Yes you must install all plugins that are on jmeter controller on the jmeter server.
As you can see in error, there is a ClassNotFoundException happening.
Ultimate thread group plugin is missing on the JMeter-server.
You should install all the plugins in the server machines which are already on your master machines.
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