JMeter best practices and troubleshooting

This topic describes best practices and limitations when working with JMeter, and how to troubleshoot issues that may occur.

Graceful shutdown

Generally, JMeter supports shutting down gracefully. This requires appropriate port configuration, and to set the Run until completion option.

If there is a timeout by Controller, JMeter will receive the shutdown gracefully command and stay there for 2 minutes.

Click Stop Now in the Run tab if you want to stop the scenario aggressively.

Back to top

Best practices

The following are recommended as best practices when working with JMeter tests:

  • When running JMeter tests, it is recommended that you use dedicated load generator machines. Running tests from Controller, using the localhost load generator, may cause some instability.

  • It is recommended that you use scenario mode (Vuser group mode) when running JMeter scripts. If you do use percentage mode, note how many instances of the JMeter test you will be executing.

  • Before running LoadRunner Professional scenarios, check that your JMeter test can run with the JMeter installation on the load generator.

  • Run a maximum of one .jmx test (using 1 Vuser - default value) per each load generator. If the .jmx test is running a lot of threads, more than one test may overload the system.

  • Let the scripts run to completion.

Back to top

Known issues

Note the following when working with JMeter in LoadRunner Professional:

  • 64-bit JRE is not supported for JMeter scripts.
  • Network Virtualization is not supported for JMeter tests.
  • If using percentage mode for a JMeter scenario, note that only one load generator can be assigned from the list.
  • When running a JMeter script, there might be small differences in the maximum value shown in the online and offline Running Vusers graphs, viewed from Controller or Analysis.
  • If a JMeter JMX script has an associated CSV parameters file, the CSV file must be manually copied onto the load generator running JMeter, to the same location referenced in the JMX file.


    <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="FlightBookParam_CSV_Config" enabled="true">

    <stringProp name="delimiter">,</stringProp>

    <stringProp name="fileEncoding"></stringProp>

    <stringProp name="filename">C:\Parameters.csv</stringProp> //This is the local path to where the script was created in JMX

Back to top

Troubleshooting JMeter tests

If you have any difficulty running JMeter tests, check if the following can resolve the issue.

Error Resolution
Message: Cannot find the JMX file 'C:\jmeter_tests\test.jmx‘.

Possible causes:

  • The file is not present in this location.
  • Not enough disk space to clone the file.
Message: The JMETER_HOME environment variable is not configured.

Define the JMETER_HOME environment variable, or add the JMeter path in Runtime Settings.

Message contains: Problem loading XML from: ‘……’ missing class …. The JMeter test may contain 3rd-party plugins, and the plugins are missing in the currently used JMeter instance. Either remove the plugins from the JMeter test file, or add the plugins to the JMeter instance.
Message: Unable to bind to free port (for Shutdown/StopTestNow) in range 4445 - 4455. Please extend the port range in the JMeter Runtime Settings. In Runtime Settings, extend the JMeter port range, or change to default.


Failed to create a Java virtual machine (JVM).
Failed to load the 'jvm.dll/’ library file.

Check that Java is properly installed on the machine.

  • For Windows: Check that the folder that contains jvm.dll is included.
  • For Linux: Check that LD_LIBRARY_PATH includes directory of
There is no data in JMeter graphs in Controller or Analysis. In Runtime Settings, make sure that the Start measurement check box is selected.

Back to top

See also: