Unable to connect to Linux Servers through the Web Socket
Hi Peter,
I am trying to connect to Linux servers through JMeter using the latest WebSocket Open Connection but it is throwing the below error: Response code: Websocket I/O error Response message: WebSocket I/O error: connect timed out
Note: I have tried increasing the Connection Time and Response time
Steps followed: I have used the latest JMeter 3.0& JMeter 4.0 Provided the required url through HTTP request(It is getting passed) Next Step I have added a Web Socket Open Connection as I need to connect to Linux Servers to which I have to send a JSON request.
Cheers Rajesh N
Comments (9)
-
reporter -
repo owner Did you select WSS protocol? Try WS.
-
reporter I have tried both the ways:
wss://URL.com
ws://IP address:Portno
-
repo owner "Connection timeout" usually means you are either trying to connect to the wrong address (host/port) or that a firewall is preventing access. (interpret "connection timeout" as: no one answered the request to create a connection)
"SSLException: Unrecognized SSL message, plaintext" means you have a connection, but that you configured wss (websocket over TLS) while the other side is not talking TLS. So in this case, i would expect that switching from wss to ws would solve your problem.
-
reporter With the WebSocket Open Connection I am able to open the connection, But my next step is to send JSON data to the server, for that I am using WebSocket Sampler by sending the JSON data in the Request data, it is throwing an error as
Error: [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:189) JMeter.plugins.functional.samplers.websocket.WebSocketSampler.sample(WebSocketSampler.java:141) org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490) org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416) org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250) java.lang.Thread.run(Unknown Source)
Log: 2018-08-07 14:57:54,013 INFO o.e.j.w.c.WebSocketClient: Stopped org.eclipse.jetty.websocket.client.WebSocketClient@35c6f96b 2018-08-07 14:57:54,014 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, local)
-
repo owner The errors and the stacktrace indicate that you are not using a sampler provided by this websocket plugin, but Maciej Zaleski's. I cannot help with that.
-
reporter Thanks Anyway Peter. But could you provide your suggestions for the below requirements
- I have to connect to a WebSocket
- Once Connected, I have to send some JSON data to the server through the request and I need to retrieve the response of it
Cheers Rajesh N
-
repo owner Check the samples. Specifically "Basic request-response sample.jmx".
-
repo owner - changed status to closed
- Log in to comment
I have tried giving IP address and port no instead of Server name, but I am getting the below error Response code: Websocket I/O error Response message: WebSocket I/O error: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?