JMeter-WebSocketSampler
JMeter-WebSocketSampler copied to clipboard
Sometimes websocket sampler throwing Null response while opening socket connection
Hi MaciejZaleski,
This websocket sampler is excellent and i have been waiting for this for a long time. I have downloaded and started to use this.
websockets are implemented using engine IO libraries in my application. sometimes sampler works fine and gives proper response for the requests. But sometimes it throws null response as shown below while opening websocket connection. Please give me a solution for this why it is happening intermittently. do you think that when existing connection is still open while opening another connection, is this happened?
Thread Name: Thread Group 1-1 Sample Start: 2014-05-08 22:08:11 PDT Load time: 10073 Latency: 0 Size in bytes: 2666 Headers size in bytes: 0 Body size in bytes: 2666 Sample Count: 1 Error Count: 1 Response code: Response message:
[Execution Flow]
- Opening new connection
- Using response message pattern ""
- Using disconnect pattern ""
- Waiting for the server connection for 10000 MILLISECONDS
- Cannot connect to the remote server
[Variables]
- Message count: 0
[Problems]
- Unexpected error: null JMeter.plugins.functional.samplers.websocket.ServiceSocket.sendMessage(ServiceSocket.java:156) JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:136) org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429) org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257) java.lang.Thread.run(Thread.java:722)
Response headers:
SampleResult fields: ContentType: DataEncoding: UTF-8
can you please respond on this?
Any resolution on the above issue? I am seeing the same error message
Thread Name: Thread Group 1-1 Sample Start: 2015-03-20 13:43:39 EDT Load time: 5015 Connect Time: 0 Latency: 0 Size in bytes: 0 Headers size in bytes: 0 Body size in bytes: 0 Sample Count: 1 Error Count: 1 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
[Variables]
- Message count: 0
[Problems]
- Unexpected error: null JMeter.plugins.functional.samplers.websocket.ServiceSocket.sendMessage(ServiceSocket.java:156) JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:136) org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434) org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261) java.lang.Thread.run(Unknown Source)
Response headers:
SampleResult fields: ContentType: DataEncoding:
+1
+1
When the thread group with many number of threads, the issue happened. But if I set the thread number as 1, the issue will never happen. What's the cause?
Thanks!!!!!!
Thread Name: Thread Group 1-2 Sample Start: 2015-08-23 10:40:31 CST Load time: 5039 Connect Time: 0 Latency: 0 Size in bytes: 0 Headers size in bytes: 0 Body size in bytes: 0 Sample Count: 1 Error Count: 1 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
[Variables]
- Message count: 0
[Problems]
- Unexpected error: null JMeter.plugins.functional.samplers.websocket.ServiceSocket.sendMessage(ServiceSocket.java:156) JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:136) org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434) org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261) java.lang.Thread.run(Unknown Source)
Response headers:
SampleResult fields: ContentType: DataEncoding: UTF-8
According to my experiences , There could be 2 reasons: 1)Server could return HTTP 500: Check your server log. if you can't, use Wireshark to see the error.
2)Server could return HTTP 400: You could override some server header or another connectionId error. Header "Host" can cause sometimes problems.
Call the same url that you generated in browser.
Im facing also the same errors. Connection with the socket is not happening and i m getting the following errors in jmeter. [Problems]
- Unexpected error: null JMeter.plugins.functional.samplers.websocket.ServiceSocket.sendMessage(ServiceSocket.java:156) JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:136) org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434) org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261) java.lang.Thread.run(Unknown Source)
+1
when I choose this :all went well
+1 using spring / sockjs / stomp
@MWhyte wondering how did you configure testplan to use spring / sockjs / stomp
+1. Having the same issue. Using spring/sockjs/stomp