Skip to content

JMeter Troubleshooting Guide

Fix common JMeter failures: connection reset, 401 after recording, low throughput, OutOfMemoryError, SSL handshake errors, and GUI vs CLI differences.

Difficulty
intermediate
Guide type
troubleshooting
Estimated read time
12 min read
Last verified version
Verified JMeter 5.6

When tests fail, isolate injector, plan, and system under test. This playbook covers frequent symptoms with fixes grounded in best practices, remote testing, functions, recorder, and glossary metrics.

For search-friendly, one-error pages (symptom → cause → fix), start with the Error Playbooks index.

SymptomPlaybook
java.net.ConnectExceptionConnectException
Non HTTP response codeNon HTTP response code
SSLHandshakeExceptionSSLHandshakeException
OutOfMemoryError: Java heap spaceOutOfMemoryError heap
Socket closed / connection resetSocket closed / reset
Throughput stuck below target RPSThroughput stuck
Works in GUI, fails in CLIGUI works, CLI fails
401 / 403 after recording401/403 after recording
  1. Does GUI one-thread pass? If no, fix functional/correlation first.
  2. Does CLI one-thread pass? If no, path/CSV/property differences.
  3. Does small load pass? If no, server or auth limits.
  4. Does large load fail? Injector sizing, coordinated omission, SUT capacity.

Check jmeter.log and the first error sample label/message every time.

Symptoms: Connection reset, Non HTTP response code: java.net.ConnectException, broken pipe.

CheckAction
Host/port/protocolHTTP Request Defaults and \${__P(host)}
Server up / firewallcurl from same injector host
TLS vs plainhttps vs http mismatch
Connection limitsServer max connections; JMeter HTTP client settings
Short timeoutsConnect/response timeouts on HTTP Request
Under load onlyServer backlog, LB idle timeouts, injector ephemeral ports

Distributed: workers may lack network path the controller has (distributed).

Symptoms: Recording works while browsing; replay fails auth.

CauseFix
Missing Cookie ManagerAdd HTTP Cookie Manager
CSRF/token hard-codedCorrelate dynamic fields
Expired bearer tokenRe-login or refresh (JWT/OAuth)
Wrong Header Manager scopeAuthorization not applied to failing sampler
Different user/CSVRow empty or wrong sharing mode

Best practices also note unknown_ca during HTTPS recording when the JMeter CA is not trusted (recorder).

Symptoms: SSLHandshakeException, PKIX path building failed, handshake_failure.

CauseFix
Untrusted server certImport CA into JVM truststore used by JMeter
SNI / wrong hostCorrect server name; virtual host headers
Protocol mismatchTLS version disabled on one side
Client cert requiredConfigure keystore in HTTP Request / system properties
Recording MITMInstall ApacheJMeterTemporaryRootCA.crt

For RMI SSL between controller and workers (JMeter 4.0+), use create-rmi-keystore and distribute rmi_keystore.jks (remote testing).

Official guidance: wrong thread counts contribute to coordinated omission (best practices).

Checklist:

  1. Response time rose under load → need more threads or less target (Thread Calculator, CO tool).
  2. View Results Tree or many listeners still enabled → disable for load.
  3. Timers / think time lower throughput (expected).
  4. Assertions too heavy.
  5. Injector CPU at 100%.
  6. Single NIC saturated.
  7. Server throttling (check server metrics, not only JMeter).
  8. Functional mode or saving full bodies → slow I/O.

Prefer CLI: jmeter -n -t plan.jmx -l results.jtl.

Symptoms: java.lang.OutOfMemoryError: Java heap space, long GC pauses, agents killed.

CauseFix
Heap too smallRaise HEAP/-Xmx; size with Heap Estimator
View Results Tree in loadDisable
Too many threads per JVMSplit engines (distributed)
Huge responses keptSave fewer fields; avoid XML results
Leaky script enginesPrefer JSR223 Groovy with cache; avoid BeanShell hot paths (best practices)
Container limit < XmxAlign cgroup limit (Docker)

High error % but “green” samples earlier

Section titled “High error % but “green” samples earlier”

Add assertions. Without them, HTTP 500 pages can still be “successful” samples if the transport succeeded. Use Response Assertion on codes and critical body content (API guide).

IssueNote
Relative CSV pathsWorking directory differs; use stable paths
PropertiesGUI might have different user.properties
Headless fonts/pluginsMissing plugins in CI image (plugins)
ModeNever use GUI for real load

Parameterize with \${__P} and pass -J in both environments.

SymptomCheck
Connection refused to workerjmeter-server up; port 1099 / server.rmi.localport
SSL handshake RMIKeystore on all nodes
Serialization / ClassNotFoundJMeter/plugin version skew
Missing CSV on workerData files not copied automatically
Incomplete resultsReverse ports / client overload

See distributed testing and remote testing.

From generating dashboard:

  • Required saveservice columns must remain enabled.
  • -o output folder issues (non-empty/prior report).
  • Filter regex excluding everything.

Regenerate offline from JTL after fixing properties.

(Grafana topic): URL/token, network, samplersRegex, summaryOnly, firewall from injector.

Undefined variables are returned unchanged (functions). Fix extractors; set defaults; assert.

  • jmeter.log / -j log path
  • Log Viewer in GUI (hints & tips)
  • Debug Sampler + Tree (scripting only)
  • Reduce log level noise under load

If numbers look “too good,” re-read glossary definitions for latency vs elapsed, throughput calculation, and percentiles. Confirm you are not reading connect time alone or parent transaction samples incorrectly.

Escalation checklist before blaming the server

Section titled “Escalation checklist before blaming the server”
  1. One-thread functional pass with assertions.
  2. CLI pass same properties.
  3. Injector CPU/RAM/network headroom.
  4. No heavy listeners.
  5. Thread and heap sized.
  6. Server-side metrics simultaneous.
  7. Reproducible plan version in git.

Why do I get connection reset only under load?

Section titled “Why do I get connection reset only under load?”

Often server or load balancer limits, injector port exhaustion, or timeouts. Compare server metrics and run from the same network as the injector.

Dynamic tokens or cookies were not correlated. Add Cookie Manager and extractors; do not reuse recorded bearer tokens.

Increase heap, reduce threads per JVM, disable View Results Tree, save fewer result fields, and prefer Groovy JSR223 over heavy scripts.

Why is throughput lower than the thread calculator?

Section titled “Why is throughput lower than the thread calculator?”

Calculators assume stable response times and little think time. Under load, response times rise and listeners or server limits cut throughput.

jmeter.log (or the file set with -j) plus the first failing sampler in View Results Tree or the JTL error message.

Different working directory, missing CSV, missing plugins, wrong -J properties, or network policy from the CI runner.

On this page