https://issues.apache.org/bugzilla/show_bug.cgi?id=50963
Summary: AjpSampler throws
java.lang.StringIndexOutOfBoundsException
Product: JMeter
Version: 2.4
Platform: PC
OS/Version: Windows XP
Status: NEW
Keywords: ErrorMessage
Severity: normal
Priority: P2
Component: HTTP
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
I've googled and can find very little about JMeter and AJP other than the
existance of an AJP1.3 sampler; certainly nothing resembling what I am seeing.
I have tomcat running behind IIS over AJP 1.3, with IIS/Windows handling user
authentication using the Windows domain authentication. Rather than load test
our domain controller's authentication function, I thought I would test tomcat
itself over the AJP connector. I have the Tomcat AJP connector set to port
8009 with SSL redirect to port 443; any other connector settings are at
default. All of the pages of the web application under test have a
security-constraint requiring SSL encryption. JMeter testing using the tomcat
HTTP and HTTPS ports (which will eventually be firewalled off) works fine. I
have used a standalone commandline AJPClient to confirm that I can communicate
over our intranet with tomcat using AJP and get a 200 status code.
I create a new JMeter test plan from scratch:
- one Thread Group, containing
- one AJPSampler
- https protocol
- port 8009
- 60000ms timeouts
- my desired hostname and web page
- follow redirects (or redirect automatically, same results either way)
- use keep-alive
- one Response Assertion that checks for a 200 status code
- a View Results Tree Listener
I save and then run the test plan
>From the UI standpoint, nothing happens. The sampler never shows up in the
view.
Next, I take an existing test plan and edit the element tag for the sampler to
reflect an AjpSampler instead of an HTTPSampler:
- change
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler"
testname="Grp1 Calculator web form HTTP Request"
enabled="true">...</HTTPSampler>
to
<AjpSampler guiclass="AjpSamplerGui" testclass="AjpSampler" testname="Grp1
Calculator web form AJP/1.3" enabled="true">...</AjpSampler>
I save and then run the test plan
In the UI, this sampler fails with a null response.
In both cases, when I look at the JMeter log file, I see:
2011/03/23 15:16:23 ERROR - jmeter.threads.JMeterThread: Error while processing
sampler 'AJP/1.3 Sampler - MSScalculator app' :
java.lang.StringIndexOutOfBoundsException: String index out of range: 41099
at java.lang.String.checkBounds(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at
org.apache.jmeter.protocol.http.sampler.AjpSampler.getString(AjpSampler.java:499)
at
org.apache.jmeter.protocol.http.sampler.AjpSampler.parseHeaders(AjpSampler.java:443)
at
org.apache.jmeter.protocol.http.sampler.AjpSampler.handshake(AjpSampler.java:392)
at
org.apache.jmeter.protocol.http.sampler.AjpSampler.execute(AjpSampler.java:381)
at
org.apache.jmeter.protocol.http.sampler.AjpSampler.sample(AjpSampler.java:112)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:965)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:951)
at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:348)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:243)
at java.lang.Thread.run(Unknown Source)
If I create another AJP sampler in the UI change the protocol from https to
http and change the target path to the tomcat manager app, I get the same UI
behavior and the same exception with a different out-of-range index value
(41086).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]