Reputation: 95
Jmeter response code getting error:
Response code: Non HTTP response code: java.net.SocketException
I have Done the following setting :
Query : httpclient4.retrycount=1 , value should be set to 1 for n no. of request or no value ?
Upvotes: 8
Views: 72109
Reputation: 786
It generally comes when port which you are using for request call (APIs), is not open in the firewall. Check the same API with other applications like Postman or Browser.
sometimes setting JAVA_OPTIONS also solves the problem:
setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
Hit the above command from the command line.
Upvotes: 1
Reputation: 439
I am not sure, are you getting this error during load test or even in debugging mode?
and add Listner > View Result Tree then run script and check response.
Reason for socket exception in Client-Server Application : It consists of two threads. The first one, SimpleServer, opens a socket on the local machine on port 3333. Then it waits for a connection to come in. When it finally receives a connection, it creates an input stream out of it, and simply reads one line of text from the client that was connected. The second thread, SimpleClient, attempts to connect to the server socket that SimpleServer opened. When it does so, it sends a line of text and that’s it. This time though the two threads will be in different classes launched by two different main methods, so as to cause a SocketEception
So, might be you are using lot many threads with very low ramp-up time in script.
If you can provide more details about problem, it will be great.
Upvotes: 6