Folks ,
I am facing a strange problem. It happens sporadically. Sometimes
for some of my http requests that Jmeter sends to the sever,response is an
HTTP 302(Moved temporarily) with the index page of my web app as the url
where the redirection has to take
place.(http://192.168.0.13:7001/myapp/index.htm)(I have seen that from the
response tab of View results Tree Listener).Next what happens is Jmeter
sends another request to the redirected url(ie the one mentioned above)
which in this case is the index page and in response to the same i see the
following error which I believe is that the server is closing the socket
connection with Jmeter:
java.net.SocketException: Connection reset at
java.net.SocketInputStream.read(Unknown Source) at
java.io.BufferedInputStream.read1(Unknown Source) at
java.io.BufferedInputStream.read(Unknown Source) at
sun.net.www.http.ChunkedInputStream.readAheadBlocking(Unknown Source) at
sun.net.www.http.ChunkedInputStream.readAhead(Unknown Source) at
sun.net.www.http.ChunkedInputStream.read(Unknown Source) at
java.io.FilterInputStream.read(Unknown Source) at
java.io.BufferedInputStream.read1(Unknown Source) at
java.io.BufferedInputStream.read(Unknown Source) at
java.io.FilterInputStream.read(Unknown Source) at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.readResponse(HTTPSampler.java:235)
at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:449)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:514)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:503)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247) at
java.lang.Thread.run(Unknown Source)..
At the same time I get an error in Jmeter.log file
ERROR - jmeter.functions.JavaScript: Error processing Javascript
SyntaxError: syntax error (<cmd>; line 1)
at
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
at
org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:1324)
at org.mozilla.javascript.Parser.reportError(Parser.java:73)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:1411)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:1201)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1115)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:1062)
at org.mozilla.javascript.Parser.addExpr(Parser.java:1045)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1032)
at org.mozilla.javascript.Parser.relExpr(Parser.java:1024)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:1002)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:991)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:980)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:969)
at org.mozilla.javascript.Parser.andExpr(Parser.java:957)
at org.mozilla.javascript.Parser.orExpr(Parser.java:945)
at org.mozilla.javascript.Parser.condExpr(Parser.java:928)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:909)
at org.mozilla.javascript.Parser.expr(Parser.java:898)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:577)
at org.mozilla.javascript.Parser.statement(Parser.java:387)
at org.mozilla.javascript.Parser.statements(Parser.java:315)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:773)
at org.mozilla.javascript.Parser.statement(Parser.java:387)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:593)
at org.mozilla.javascript.Parser.statement(Parser.java:387)
at org.mozilla.javascript.Parser.parse(Parser.java:128)
at org.mozilla.javascript.Context.compile(Context.java:1995)
at org.mozilla.javascript.Context.compile(Context.java:1948)
at org.mozilla.javascript.Context.compileReader(Context.java:899)
at org.mozilla.javascript.Context.evaluateReader(Context.java:817)
at org.mozilla.javascript.Context.evaluateString(Context.java:784)
at
org.apache.jmeter.functions.JavaScript.execute(JavaScript.java:81)
at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:125)
at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:93)
at
org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:85)
at
org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:195)
at org.apache.jmeter.config.Argument.getValue(Argument.java:121)
at
org.apache.jmeter.protocol.http.util.HTTPArgument.getEncodedValue(HTTPArgument.java:142)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.getQueryString(HTTPSamplerBase.java:430)
at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.setupConnection(HTTPSampler.java:157)
at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:422)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:514)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:503)
at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
at java.lang.Thread.run(Unknown Source)
Now this request(for the redirected url) that has given this error has
been sent automatically by Jmeter. I haven't used the __Javascript ()
inbuilt java script function here .(N.B If the response to the redirected
url would be proper then it would contain some java script in it though
but then Jmeter is dumb and it doesnt understand java script till I use
__Javascript () function)How do i get rid of this error ?Is there anything
wrong on my part ?Is there any way that whenever such a thing happens i
should be able to redirect to the sampler for the index page that I have
created and thus start a new thread as it is the starting page?
Regards,
Subhrajyoti
Mobile: +919830079545
Mail: [EMAIL PROTECTED]
Web: www.labware.com
LabWare LIMS Solutions - Results Count