I'm Getting this error while executing script Jmeter websocket settings

Thread Name: Thread Group 1-1
Sample Start: 2019-10-30 15:58:38 PKT
Load time: 5005
Connect Time: 0
Latency: 0
Size in bytes: 0
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): 
Response code: 
Response message: 

[Execution Flow]
 - Opening new connection
 - Using response message pattern ""
 - Using disconnect pattern ""
 - Waiting for the server connection for 5000 MILLISECONDS
 - Cannot connect to the remote server

 - Message count: 0

 - Unexpected error: null
java.lang.Thread.run(Unknown Source)

Response headers:

SampleResult fields:
DataEncoding: UTF-8

1 Answer 1


Looking into ServiceSocket line 189 it appears that the session object is null, check jmeter.log file for any suspicious entries, it might be the case you plugin installation is corrupt (i.e. missing dependencies)

In general I would recommend switching to WebSocket Samplers by Peter Doornbosch which can be installed using JMeter Plugins Manager

enter image description here

this version is more up-to-date and has way more features.

  • Hi, I've also used the other plugin,,,,, but it gives error of timeout. I dont understand why
    – Saad Ahmed
    Commented Oct 30, 2019 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.