I'm developing a script using JMeter 2.12, executing the script against
Tomcat 7. I've reached a point in the script development where there are ten
samplers the send POST requests to a REST web service. After the last of the
requests the script goe to a logout transaction that executes three
samplers. The script stalls on the second sampler in the logout transaction.
In the View Results Tree you can't see the logout transaction until you
click the stop button. When this happens the first logout request returns an
HTTP 302 response where under normal operation it returns and HTTP 200
response. Here's the stack trace as seen in the second logout sampler:

java.net.SocketException: Socket closed
        at sun.reflect.GeneratedConstructorAccessor42.newInstance(Unknown 
Source)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
        at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
        at java.security.AccessController.doPrivileged(Native Method)
        at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
        at 
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
        at
org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.readResponse(HTTPJavaImpl.java:258)
        at
org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:514)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1486)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1561)
        at
org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:338)
        at
org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:588)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1141)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1130)
        at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:431)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:258)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Socket closed
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:152)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
        at
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678)
        at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:639)
        at java.net.URLConnection.getContentLengthLong(URLConnection.java:511)
        at java.net.URLConnection.getContentLength(URLConnection.java:495)
        at
org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.readResponse(HTTPJavaImpl.java:224)
        ... 12 more

There is some intermittency with this, with one of ten POST samplers enabled
it never happens. With two enabled it happens 2 or 3 out of ten script
executions, with three enabled it happens 8 or 9 out of ten, with four
enabled it happens 100% of executions. 

I would appreciate help in debugging this.

Thanks,
Ron Miller
Escalation Engineer
Tibco Jaspersoft  



--
View this message in context: 
http://jmeter.512774.n5.nabble.com/java-net-SocketException-Socket-closed-tp5721718.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to