You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by rmiller <ro...@cobancorporation.com> on 2007/08/10 20:06:54 UTC

BufferedInputStream closes on redirect

I'm getting the following exception thrown on the login sampler in my test
plan:

java.io.IOException: Stream closed
	at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
	at java.io.FilterInputStream.read(FilterInputStream.java:90)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.readResponse(HTTPSampler.java:243)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:433)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:871)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:934)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:474)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:658)
	at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:647)
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
	at java.lang.Thread.run(Thread.java:595)

The application redirects five times (I have set max_redirects=7 in
jmeter.properties and follow redirects checked in the sampler) before the
final redirect when this error is thrown. The login works fine in a browser,
so it's not an application error. 

Can anyone tell me what is happening here?

Thanks,
Ron
-- 
View this message in context: http://www.nabble.com/BufferedInputStream-closes-on-redirect-tf4250266.html#a12096374
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: BufferedInputStream closes on redirect

Posted by sebb <se...@gmail.com>.
On 10/08/07, rmiller <ro...@cobancorporation.com> wrote:
>
> I'm getting the following exception thrown on the login sampler in my test
> plan:
>
> java.io.IOException: Stream closed

That is caused by the remote server.

>        at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
>        at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
>        at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
>        at java.io.FilterInputStream.read(FilterInputStream.java:90)
>        at
> org.apache.jmeter.protocol.http.sampler.HTTPSampler.readResponse(HTTPSampler.java:243)
>        at
> org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:433)
>        at
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:871)
>        at
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:934)
>        at
> org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:474)
>        at
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:658)
>        at
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:647)
>        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
>        at java.lang.Thread.run(Thread.java:595)
>
> The application redirects five times (I have set max_redirects=7 in
> jmeter.properties and follow redirects checked in the sampler) before the
> final redirect when this error is thrown. The login works fine in a browser,
> so it's not an application error.

Not necessarily - there may be subtle differences between the browser
and JMeter conversations with the server that cause the application to
fail.

> Can anyone tell me what is happening here?

I suspect the application does not like something about the JMeter requests.

I suggest you try:
- redirect automatically (i.e. handled by underlying HTTP protocol, not JMeter)
- HTTP Sampler HTTPClient instead of the default HTTP Sampler

and see if either of those help.

> Thanks,
> Ron
> --
> View this message in context: http://www.nabble.com/BufferedInputStream-closes-on-redirect-tf4250266.html#a12096374
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org