jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Speteanu <asp.ad...@gmail.com>
Subject Re: java.net.SocketException: Socket closed
Date Fri, 30 Jan 2015 11:57:02 GMT
Socket exceptions are usually caused by OS specific configurations (or
better said, lack of required configurations). In this case, JMeter is
trying to re-use a socket which was just closed by the system.

--Adrian S

On Fri, Jan 30, 2015 at 9:49 AM, Jeff Ohrstrom <johrstrom@hotmail.com>
wrote:

> Is there a reason you're using Java implementation?  I quickly looked at
> the code and the two (HC3/4 and Java) seem to be reading off the wire in
> different ways.  Perhaps the H4 implementation is much better at dealing
> with redirects?
>
> That, off the top, would be my first guess, that the Java implenation
> when being redirected is doing something funny with the connection. I'm
> not sure if HttpJavaImpl is widely used (I certainly don't ever use
> it).
>
> On Thu, 2015-01-29 at 17:00 -0700, rmil0987 wrote:
> >  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: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message