You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Dan Keeley <li...@dankeeley.co.uk> on 2008/07/28 17:42:33 UTC

Re: Connection refused...

Ok, i'm looking at this problem again and have a quick question.

We're using the XML/RPC sampler.  Am i right in thinking that uses 
httpclient underneath it?

Anyway I tried setting the httpclient socket timeout to 6,000 up from 3,000 
and it didnt seem to make any difference.

The problem we're seeing now is that we see spurious 3.5s peaks in response 
times when all other requests are within 200ms.  We've checked logging at 
all ends of the system and have come to the conclusion these delays only 
exist in jmeter.  So i've guessed that the 1st connection is timing out 
perhaps (3s default?) and then the second attempt works.  Could that be 
true? Is there any way I could up the debug logging or anything to prove 
this point?

Many thanks again for any help!!

Dan
----- Original Message ----- 
From: "sebb" <se...@gmail.com>
To: "JMeter Users List" <jm...@jakarta.apache.org>; "Lists" 
<li...@dankeeley.co.uk>
Sent: Sunday, June 01, 2008 2:56 PM
Subject: Re: Connection refused...


> On 01/06/2008, sebb <se...@gmail.com> wrote:
>> On 01/06/2008, Lists <li...@dankeeley.co.uk> wrote:
>>
>> > The jmeter.log file shows this:
>>  >
>>  >  2008/06/01 13:14:20 INFO  -
>>  >  org.apache.commons.httpclient.HttpMethodDirector: I/O exception
>>  >  (java.net.ConnectException) caught when processing request: 
>> Connection timed
>>  >  out
>>  >  2008/06/01 13:14:20 INFO  -
>>  >  org.apache.commons.httpclient.HttpMethodDirector: Retrying request
>>  >
>>  >
>>  >  I am assuming that the full connection refused then eventually 
>> returns if
>>  >  the total number of retries fails.
>>  >
>>  >  how many times does it retry? been googling for defaults but I can't 
>> find
>>  >  any!
>>
>>
>> jmeter.properties has a link to:
>>
>>  http://jakarta.apache.org/commons/httpclient/preference-api.html
>>
>>  which now redirects to:
>>
>>  http://hc.apache.org/httpclient-3.x/preference-api.html
>>
>
> However, it looks like the retry count is not one of the available 
> preferences.
>
>>>From searching the code, the default appears to be 3.
>
>>  See also httpclient.parameters in the bin directory
>>
>>
>>  >  Dan
>>  >
>>  >  (Jmeter 2.3.1)
>>  >
>>  >
>>  >  --------- Original Message --------
>>  >  From: JMeter Users List <jm...@jakarta.apache.org>
>>  >
>>  > To: JMeter Users List <jm...@jakarta.apache.org>, Lists
>>  >  <li...@dankeeley.co.uk>
>>  >
>>  > Subject: Re: Connection refused...
>>  >  Date: 01/06/08 13:18
>>  >
>>  >  > On 01/06/2008, Lists &lt;lists@dankeeley.co.uk&gt; wrote:
>>  >  > &gt; hmm, i'm not sure this is the problem im seeing now :)
>>  >  > &gt;
>>  >  > &gt;  I upped the ulimit and it seemed to improve but eventually 
>> came
>>  >  back.
>>  >  > &gt;
>>  >  > &gt;  So what could cause this? we see nothing in the logs at the 
>> other
>>  >
>>  > end.
>>  >  >
>>  >  > Which logs are those?
>>  >  > AFAIK, the server log won't show failed connections, because they 
>> will
>>  >  > be handled by the OS.
>>  >  >
>>  >
>>  > > &gt;  The other thing thats interesting is that every time this 
>> happens
>>  >  the
>>  >  > &gt;  response time is always 224s .  Why would that be? How many 
>> times
>>  >  does it
>>  >  > &gt;  retry the connection before giving up? I can see some 
>> messages in
>>  >  the logs
>>  >  > &gt;  about retrying...
>>  >  > &gt;
>>  >
>>  > >
>>  >  > Which sampler are you using?
>>  >  >
>>  >
>>  > > &gt;  Thanks,
>>  >  > &gt;  Dan
>>  >  > &gt;
>>  >  > &gt;
>>  >  > &gt;  --------- Original Message --------
>>  >  > &gt;  From: JMeter Users List 
>> &lt;jmeter-user@jakarta.apache.org&gt;
>>  >  > &gt;  To: JMeter Users List &lt;jmeter-user@jakarta.apache.org&gt;
>>  >  > &gt;  Subject: Connection refused...
>>  >  > &gt;  Date: 01/06/08 13:04
>>  >  > &gt;
>>  >  > &gt;  &gt; It seems that you get this error:
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt; java.net.ConnectException: Connection refused
>>  >  > &gt;  &gt;         at java.net.PlainSocketImpl.socketConnect(Native
>>  >  Method)
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt; When you run out of file descriptors on unix. (i.e. 
>> ulimit -n)
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt; I think thats worth knowing - because the error seems 
>> slightly
>>  >  misleading
>>  >  > &gt;  &gt; although i guess technically correct.  It's just in this 
>> case
>>  >  the OS has
>>  >  > &gt;  &gt; refused the connection rather than the target machine.
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt; Dan
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt; ________________________________________________
>>  >  > &gt;  &gt; Message sent using UebiMiau 2.7.10
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt;
>>  >  ---------------------------------------------------------------------
>>  >  > &gt;  &gt; To unsubscribe, e-mail:
>>  >
>>  > jmeter-user-unsubscribe@jakarta.apache.org
>>  >
>>  > > &gt;  &gt; For additional commands, e-mail:
>>  >
>>  > jmeter-user-help@jakarta.apache.org
>>  >
>>  > > &gt;  &gt;
>>  >  > &gt;  &gt;
>>  >  > &gt;  &gt;
>>  >  > &gt;
>>  >  > &gt;  ________________________________________________
>>  >  > &gt;  Message sent using UebiMiau 2.7.10
>>  >  > &gt;
>>  >  > &gt;
>>  >  > &gt;
>>  >  > &gt;
>>  >  ---------------------------------------------------------------------
>>  >  > &gt;  To unsubscribe, e-mail: 
>> jmeter-user-unsubscribe@jakarta.apache.org
>>  >  > &gt;  For additional commands, e-mail: 
>> jmeter-user-help@jakarta.apache.org
>>  >  > &gt;
>>  >  > &gt;
>>  >
>>  > >
>>  > 
>>  > ---------------------------------------------------------------------
>>  >  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>  >  > For additional commands, e-mail: 
>> jmeter-user-help@jakarta.apache.org
>>  >  >
>>  >  >
>>  >  >
>>  >
>>  >  ________________________________________________
>>  >  Message sent using UebiMiau 2.7.10
>>  >
>>  >
>>  >
>>  >  ---------------------------------------------------------------------
>>  >  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
>
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 270.0.0/1484 - Release Date: 04/06/2008 
16:40


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


Re: Connection refused...

Posted by sebb <se...@gmail.com>.
On 28/07/2008, Dan Keeley <li...@dankeeley.co.uk> wrote:
> Ok, i'm looking at this problem again and have a quick question.
>
>
>  We're using the XML/RPC sampler.  Am i right in thinking that uses
> httpclient underneath it?

Yes.

>  Anyway I tried setting the httpclient socket timeout to 6,000 up from 3,000
> and it didnt seem to make any difference.
>
>  The problem we're seeing now is that we see spurious 3.5s peaks in response
> times when all other requests are within 200ms.  We've checked logging at
> all ends of the system and have come to the conclusion these delays only
> exist in jmeter.  So i've guessed that the 1st connection is timing out
> perhaps (3s default?) and then the second attempt works.  Could that be
> true? Is there any way I could up the debug logging or anything to prove
> this point?
>

Yes, check the comments in jmeter.properties.

However it may be tricky to set a suitable level of logging that
generates enough info without producing lots of output...

I suggest you run a very short test will full logging and cut it down
as much as possible.

Also perhaps use a protocol analyser such as Wireshark. This will show
if any responses are longer than normal.

If so, then it's not a JMeter problem.

If not, it might be a JMeter problem, or it might be a JVM problem
(not resuming the thread in a timely manner) or even an OS problem
(not passing the IO back to Java quickly).


>  Many thanks again for any help!!
>
>  Dan
>  ----- Original Message ----- From: "sebb" <se...@gmail.com>
>  To: "JMeter Users List" <jm...@jakarta.apache.org>;
> "Lists" <li...@dankeeley.co.uk>
>  Sent: Sunday, June 01, 2008 2:56 PM
>  Subject: Re: Connection refused...
>
>
>
>
> > On 01/06/2008, sebb <se...@gmail.com> wrote:
> >
> > > On 01/06/2008, Lists <li...@dankeeley.co.uk> wrote:
> > >
> > > > The jmeter.log file shows this:
> > >  >
> > >  >  2008/06/01 13:14:20 INFO  -
> > >  >  org.apache.commons.httpclient.HttpMethodDirector:
> I/O exception
> > >  >  (java.net.ConnectException) caught when processing request:
> Connection timed
> > >  >  out
> > >  >  2008/06/01 13:14:20 INFO  -
> > >  >  org.apache.commons.httpclient.HttpMethodDirector:
> Retrying request
> > >  >
> > >  >
> > >  >  I am assuming that the full connection refused then eventually
> returns if
> > >  >  the total number of retries fails.
> > >  >
> > >  >  how many times does it retry? been googling for defaults but I can't
> find
> > >  >  any!
> > >
> > >
> > > jmeter.properties has a link to:
> > >
> > >
> http://jakarta.apache.org/commons/httpclient/preference-api.html
> > >
> > >  which now redirects to:
> > >
> > >
> http://hc.apache.org/httpclient-3.x/preference-api.html
> > >
> > >
> >
> > However, it looks like the retry count is not one of the available
> preferences.
> >
> >
> > > From searching the code, the default appears to be 3.
> > >
> >
> >
> > >  See also httpclient.parameters in the bin directory
> > >
> > >
> > >  >  Dan
> > >  >
> > >  >  (Jmeter 2.3.1)
> > >  >
> > >  >
> > >  >  --------- Original Message --------
> > >  >  From: JMeter Users List
> <jm...@jakarta.apache.org>
> > >  >
> > >  > To: JMeter Users List
> <jm...@jakarta.apache.org>, Lists
> > >  >  <li...@dankeeley.co.uk>
> > >  >
> > >  > Subject: Re: Connection refused...
> > >  >  Date: 01/06/08 13:18
> > >  >
> > >  >  > On 01/06/2008, Lists &lt;lists@dankeeley.co.uk&gt; wrote:
> > >  >  > &gt; hmm, i'm not sure this is the problem im seeing now :)
> > >  >  > &gt;
> > >  >  > &gt;  I upped the ulimit and it seemed to improve but eventually
> came
> > >  >  back.
> > >  >  > &gt;
> > >  >  > &gt;  So what could cause this? we see nothing in the logs at the
> other
> > >  >
> > >  > end.
> > >  >  >
> > >  >  > Which logs are those?
> > >  >  > AFAIK, the server log won't show failed connections, because they
> will
> > >  >  > be handled by the OS.
> > >  >  >
> > >  >
> > >  > > &gt;  The other thing thats interesting is that every time this
> happens
> > >  >  the
> > >  >  > &gt;  response time is always 224s .  Why would that be? How many
> times
> > >  >  does it
> > >  >  > &gt;  retry the connection before giving up? I can see some
> messages in
> > >  >  the logs
> > >  >  > &gt;  about retrying...
> > >  >  > &gt;
> > >  >
> > >  > >
> > >  >  > Which sampler are you using?
> > >  >  >
> > >  >
> > >  > > &gt;  Thanks,
> > >  >  > &gt;  Dan
> > >  >  > &gt;
> > >  >  > &gt;
> > >  >  > &gt;  --------- Original Message --------
> > >  >  > &gt;  From: JMeter Users List
> &lt;jmeter-user@jakarta.apache.org&gt;
> > >  >  > &gt;  To: JMeter Users List
> &lt;jmeter-user@jakarta.apache.org&gt;
> > >  >  > &gt;  Subject: Connection refused...
> > >  >  > &gt;  Date: 01/06/08 13:04
> > >  >  > &gt;
> > >  >  > &gt;  &gt; It seems that you get this error:
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt; java.net.ConnectException: Connection refused
> > >  >  > &gt;  &gt;         at
> java.net.PlainSocketImpl.socketConnect(Native
> > >  >  Method)
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt; When you run out of file descriptors on unix. (i.e.
> ulimit -n)
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt; I think thats worth knowing - because the error seems
> slightly
> > >  >  misleading
> > >  >  > &gt;  &gt; although i guess technically correct.  It's just in
> this case
> > >  >  the OS has
> > >  >  > &gt;  &gt; refused the connection rather than the target machine.
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt; Dan
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt;
> ________________________________________________
> > >  >  > &gt;  &gt; Message sent using UebiMiau 2.7.10
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt;
> > >  >
> ---------------------------------------------------------------------
> > >  >  > &gt;  &gt; To unsubscribe, e-mail:
> > >  >
> > >  > jmeter-user-unsubscribe@jakarta.apache.org
> > >  >
> > >  > > &gt;  &gt; For additional commands, e-mail:
> > >  >
> > >  > jmeter-user-help@jakarta.apache.org
> > >  >
> > >  > > &gt;  &gt;
> > >  >  > &gt;  &gt;
> > >  >  > &gt;  &gt;
> > >  >  > &gt;
> > >  >  > &gt;
> ________________________________________________
> > >  >  > &gt;  Message sent using UebiMiau 2.7.10
> > >  >  > &gt;
> > >  >  > &gt;
> > >  >  > &gt;
> > >  >  > &gt;
> > >  >
> ---------------------------------------------------------------------
> > >  >  > &gt;  To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > >  >  > &gt;  For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> > >  >  > &gt;
> > >  >  > &gt;
> > >  >
> > >  > >
> > >  >  >
> ---------------------------------------------------------------------
> > >  >  > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > >  >  > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> > >  >  >
> > >  >  >
> > >  >  >
> > >  >
> > >  >  ________________________________________________
> > >  >  Message sent using UebiMiau 2.7.10
> > >  >
> > >  >
> > >  >
> > >  >
> ---------------------------------------------------------------------
> > >  >  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
> >
> >
> >
>
>
> --------------------------------------------------------------------------------
>
>
>
>  No virus found in this incoming message.
>  Checked by AVG.
>  Version: 8.0.100 / Virus Database: 270.0.0/1484 - Release Date: 04/06/2008
> 16:40
>
>
>
> ---------------------------------------------------------------------
>  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