Reputation: 79
I'm trying to send a message from Jmeter to a server via a TCP sampler I have configured the IP, port number, and message in sent to message box then I started to hit server at this time I'm getting the following warning in Jmeter.
And also let me know the TCP Client Class Name
, End Of Line Byte
field value in Jmeter.
015/04/17 18:00:30 WARN - **![jmeter.protocol.tcp.sampler.TCPSampler: Could not create socket for tcp://port&IP java.net.ConnectException: Connection timed out: connect][1]**
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.jmeter.protocol.tcp.sampler.TCPSampler.getSocket(TCPSampler.java:183)
at org.apache.jmeter.protocol.tcp.sampler.TCPSampler.sample(TCPSampler.java:399)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
at java.lang.Thread.run(Thread.java:745)
Upvotes: 2
Views: 1968
Reputation: 79
socket connection error in jmeter for tcp sampler configuration is resolved this exception will raised when your server is not ready to take your request. so before sending message please verify that your server is ready to take request.
Upvotes: 2
Reputation: 3349
Without any code it is hard to pinpoint what you're doing wrong, but it looks like you're passing in the string
"tcp://port&IP"
instead of something like
"tcp://" + IP + ":" + port
Upvotes: 1