You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Karsten Gaul <ka...@exedio.com> on 2010/06/29 10:21:03 UTC
IOException. Response code 401
Hi again,
I have some problems getting POST requests through JMeter.
The jmeter.log prints the following:
readResponse: java.io.IOException: Server returned HTTP response code:
401 for URL:
It is just a warning though because when I follow my server's log the
required actions are executed.
Well, 401 is an authorization issue which I thought to have solved by
providing the auth manager. This one is required anyway because the site
on test has a .htaccess login. Whitout the manager, the get requests
fail too. The post requests are mostly for sending data in order to
create an account or something like that.
Can anyone explain the behaviour of jmeter for the post requests and
what I can do against it?
rgds
Karsten
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: IOException. Response code 401
Posted by Karsten Gaul <ka...@exedio.com>.
phew I'm afraid I'm getting too old for this :(
I totally didnt see the option "follow redirects" due to it being
disabled by default. But that caused the problem.
Thanks a lot.
Am 30.06.2010 13:43, schrieb Felix Frank:
> Hi,
>
> in the Sampler, have you tried both "Redirect automatically" and "Follow
> redirects"?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: IOException. Response code 401
Posted by Felix Frank <ff...@mpexnet.de>.
Hi,
in the Sampler, have you tried both "Redirect automatically" and "Follow
redirects"?
On 06/30/2010 01:39 PM, Karsten Gaul wrote:
> Am 29.06.2010 15:59, schrieb sebb:
>> On 29 June 2010 14:47, Karsten Gaul<ka...@exedio.com> wrote:
>>> The browser sends some stuff jmeter doesnt. the user-agent for
>>> example. Am I
>>> supposed to add all of this to the header manager? I now added the
>>> User-Agent but it didnt solve the problem.
>>
>> Keep fixing the differences until the server is happy.
>>
>
> Unfortunately, the server stays unhappy although I gave it all the
> header information my browser provides too.
>
> What about the redirect in the post request? this seems to be the only
> problem since the actual post i.e. creating the user account obviously
> works.
>
> cheers
>
> ---------------------------------------------------------------------
> 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
Re: IOException. Response code 401
Posted by Karsten Gaul <ka...@exedio.com>.
Am 29.06.2010 15:59, schrieb sebb:
> On 29 June 2010 14:47, Karsten Gaul<ka...@exedio.com> wrote:
>> The browser sends some stuff jmeter doesnt. the user-agent for example. Am I
>> supposed to add all of this to the header manager? I now added the
>> User-Agent but it didnt solve the problem.
>
> Keep fixing the differences until the server is happy.
>
Unfortunately, the server stays unhappy although I gave it all the
header information my browser provides too.
What about the redirect in the post request? this seems to be the only
problem since the actual post i.e. creating the user account obviously
works.
cheers
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: IOException. Response code 401
Posted by sebb <se...@gmail.com>.
On 29 June 2010 14:47, Karsten Gaul <ka...@exedio.com> wrote:
> The browser sends some stuff jmeter doesnt. the user-agent for example. Am I
> supposed to add all of this to the header manager? I now added the
> User-Agent but it didnt solve the problem.
Keep fixing the differences until the server is happy.
> cheers
> Karsten
>
> Am 29.06.2010 14:05, schrieb sebb:
>>
>> On 29 June 2010 12:56, Karsten Gaul<ka...@exedio.com> wrote:
>>>>
>>>> So does the Auth Mgr fix get requests?
>>>
>>> yeah it does. I only get the error messages when POST requests are sent.
>>>
>>>> What do you see in the Tree View Listener?
>>>>
>>>> How does that compare with what a browser sees?
>>>
>>> After processing the data of the post there is a redirect to a different
>>> page. This is where the authorization violation seems to happen. The post
>>> is
>>> executed and the server processes the data and for example creates an
>>> account but the access to the follow-up page is denied.
>>>
>>> Apart from the access violation the browser sees the same pages and the
>>> same
>>> data that is shown in the results tree.
>>
>> The server does not know whether it is communicating with JMeter or a
>> browser.
>> All it sees are the HTTP(S) requests, so if the server consistently
>> behaves differently, it must be seeing different requests.
>>
>> In which case the browser must be sending something different from JMeter.
>>
>> Have you compared the requests as well as the responses?
>>
>>> rgds
>>> Karsten
>
> ---------------------------------------------------------------------
> 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
Re: IOException. Response code 401
Posted by Karsten Gaul <ka...@exedio.com>.
The browser sends some stuff jmeter doesnt. the user-agent for example.
Am I supposed to add all of this to the header manager? I now added the
User-Agent but it didnt solve the problem.
cheers
Karsten
Am 29.06.2010 14:05, schrieb sebb:
> On 29 June 2010 12:56, Karsten Gaul<ka...@exedio.com> wrote:
>>> So does the Auth Mgr fix get requests?
>>
>> yeah it does. I only get the error messages when POST requests are sent.
>>
>>> What do you see in the Tree View Listener?
>>>
>>> How does that compare with what a browser sees?
>>
>> After processing the data of the post there is a redirect to a different
>> page. This is where the authorization violation seems to happen. The post is
>> executed and the server processes the data and for example creates an
>> account but the access to the follow-up page is denied.
>>
>> Apart from the access violation the browser sees the same pages and the same
>> data that is shown in the results tree.
>
> The server does not know whether it is communicating with JMeter or a browser.
> All it sees are the HTTP(S) requests, so if the server consistently
> behaves differently, it must be seeing different requests.
>
> In which case the browser must be sending something different from JMeter.
>
> Have you compared the requests as well as the responses?
>
>> rgds
>> Karsten
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: IOException. Response code 401
Posted by sebb <se...@gmail.com>.
On 29 June 2010 12:56, Karsten Gaul <ka...@exedio.com> wrote:
>> So does the Auth Mgr fix get requests?
>
> yeah it does. I only get the error messages when POST requests are sent.
>
>> What do you see in the Tree View Listener?
>>
>> How does that compare with what a browser sees?
>
> After processing the data of the post there is a redirect to a different
> page. This is where the authorization violation seems to happen. The post is
> executed and the server processes the data and for example creates an
> account but the access to the follow-up page is denied.
>
> Apart from the access violation the browser sees the same pages and the same
> data that is shown in the results tree.
The server does not know whether it is communicating with JMeter or a browser.
All it sees are the HTTP(S) requests, so if the server consistently
behaves differently, it must be seeing different requests.
In which case the browser must be sending something different from JMeter.
Have you compared the requests as well as the responses?
> rgds
> Karsten
>
> ---------------------------------------------------------------------
> 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
Re: IOException. Response code 401
Posted by Karsten Gaul <ka...@exedio.com>.
> So does the Auth Mgr fix get requests?
yeah it does. I only get the error messages when POST requests are sent.
> What do you see in the Tree View Listener?
>
> How does that compare with what a browser sees?
After processing the data of the post there is a redirect to a different
page. This is where the authorization violation seems to happen. The
post is executed and the server processes the data and for example
creates an account but the access to the follow-up page is denied.
Apart from the access violation the browser sees the same pages and the
same data that is shown in the results tree.
rgds
Karsten
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: IOException. Response code 401
Posted by sebb <se...@gmail.com>.
On 29/06/2010, Karsten Gaul <ka...@exedio.com> wrote:
> Hi again,
>
> I have some problems getting POST requests through JMeter.
>
> The jmeter.log prints the following:
> readResponse: java.io.IOException: Server returned HTTP response code: 401
> for URL:
>
> It is just a warning though because when I follow my server's log the
> required actions are executed.
That does not sound right, unless somehow your test plan is resending
the request.
The server should not reject a request and then process it.
AIUI the request will be rejected fairly early on (if it is a 401) and
the servlet code won't even see it.
> Well, 401 is an authorization issue which I thought to have solved by
> providing the auth manager. This one is required anyway because the site on
> test has a .htaccess login. Whitout the manager, the get requests fail too.
So does the Auth Mgr fix get requests?
> The post requests are mostly for sending data in order to create an account
> or something like that.
>
> Can anyone explain the behaviour of jmeter for the post requests and what I
> can do against it?
What do you see in the Tree View Listener?
How does that compare with what a browser sees?
http://wiki.apache.org/jakarta-jmeter/DifferentBehaviour
> rgds
> Karsten
>
> ---------------------------------------------------------------------
> 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