Understand JMeter Non HTTP response code and Non HTTP response message: connection, SSL, and client exceptions. Symptom, causes, and how to fix samples.
Non HTTP response code in JMeter
Section titled “Non HTTP response code in JMeter”Symptom
Section titled “Symptom”View Results Tree or the results file shows:
- Response code:
Non HTTP response code: java.net.…(or similar) - Response message:
Non HTTP response message: …
There is no standard HTTP status such as 200, 401, or 503. The sample is failed because the HTTP client threw an exception before a normal status line was available.
Common nested types:
java.net.ConnectExceptionjava.net.SocketException/ connection resetjavax.net.ssl.SSLHandshakeExceptionjava.net.SocketTimeoutExceptionjava.net.UnknownHostException
Common causes
Section titled “Common causes”| Cause | Typical nested message |
|---|---|
| Cannot connect | ConnectException, connection refused/timed out |
| DNS failure | UnknownHostException |
| TLS trust / handshake | SSLHandshakeException, PKIX path building failed |
| Peer closed socket | Connection reset, SocketException, socket closed |
| Read/connect timeout | SocketTimeoutException |
| Wrong proxy settings | Connect or tunnel failures when a proxy is required |
Official debugging still starts with one thread and View Results Tree (best practices recommend Tree only while scripting).
Fix (ordered)
Section titled “Fix (ordered)”-
Read the full message after
Non HTTP response code:/message:- treat the Java exception as the real error. -
Route to the dedicated playbook:
-
Confirm protocol/host/port via HTTP Request Defaults.
-
Check connect and response timeouts on the HTTP Request sampler.
-
Disable corporate proxy surprises: if the OS proxy is set but the SUT is internal, configure JMeter proxy fields deliberately or clear them.
-
Re-run CLI with logging:
Terminal window jmeter -n -t plan.jmx -l results.jtl -j jmeter.log -
After connect works, add assertions so HTTP 5xx pages are not mistaken for success (API guide).
Related tools and topics
Section titled “Related tools and topics”| Resource | Use when |
|---|---|
| ConnectException | Refused / timed out connect |
| SSLHandshakeException | Certificate and TLS failures |
| Dashboard report | Aggregate error rates after CLI |
| Troubleshooting overview | Broader checklist |
Frequently asked questions
Section titled “Frequently asked questions”Is Non HTTP response code a real HTTP status?
Section titled “Is Non HTTP response code a real HTTP status?”No. It is JMeter’s way of saying the sampler failed with a client-side exception instead of an HTTP status line.
Can Non HTTP errors appear only under load?
Section titled “Can Non HTTP errors appear only under load?”Yes. Connection limits, TLS session issues, or server overload can surface as resets and timeouts only at higher concurrency. Still fix connectivity for one thread first.
Do these count in error percentage?
Section titled “Do these count in error percentage?”Yes. Failed samples increase error % on the HTML dashboard and in listeners.