Problem with HTTP Sampler Retry - Loggin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
Hello,

Is there a way to log HTTP sampler retry in JMeter logs? Although I am
seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request
retry count = 2" but not sure whether it's actually working or not, because
total number of requests are not showing retries.

Thanks,
Nasir
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Philippe Mouawad
Hello,
Set this logger to Info:
org.apache.http.impl.execchain.RetryExec

It can be done in log4j2.xml

Regards

On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <[hidden email]> wrote:

> Hello,
>
> Is there a way to log HTTP sampler retry in JMeter logs? Although I am
> seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request
> retry count = 2" but not sure whether it's actually working or not, because
> total number of requests are not showing retries.
>
> Thanks,
> Nasir
>



--
Cordialement.
Philippe Mouawad.
Ubik-Ingénierie

UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>

UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
Philippe M.
@philmdot
http://ubikloadpack.com
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
Thanks for your feedback Philippe, but it does not work. Jmeter.log is
uploaded at
https://pastebin.com/2Y9E4wCm

I made following entry in log4j2.xml and restarted JMeter.
<Logger name="org.apache.http.impl.execchain.RetryExec" level="info" />

*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
[hidden email]> wrote:

> Hello,
> Set this logger to Info:
> org.apache.http.impl.execchain.RetryExec
>
> It can be done in log4j2.xml
>
> Regards
>
> On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <[hidden email]> wrote:
>
> > Hello,
> >
> > Is there a way to log HTTP sampler retry in JMeter logs? Although I am
> > seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request
> > retry count = 2" but not sure whether it's actually working or not,
> because
> > total number of requests are not showing retries.
> >
> > Thanks,
> > Nasir
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie
>
> UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
>
> UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
>
pmd
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

pmd
Hello,
How do you think retry work ?
Do you expect it to retry successful requests ? Any failed call ?

That's not the case.


See:
http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request

*Retry handling*
For HttpClient4 the retry count has been set to 0, meaning no retry is
attempted. Note that the Java implementation appears to retry 1 time. The
retry count can be overridden by setting the relevant JMeter property, for
example:

httpclient4.retrycount=3

httpclient4.request_sent_retry_enabled=true

And also:
http://jmeter.apache.org/usermanual/properties_reference.html

httpclient4.retrycount:
Number of retries to attempt. Retry will be done on Idempotent Http Methods
by default. If you want to retry for all methods, see property
httpclient4.request_sent_retry_enabled
Defaults to: 0

httpclient4.request_sent_retry_enabled:
Set this property to true if it's OK to retry requests that have been sent.
This mean that both Idempotent and non Idempotent requests will be retried.
This should usually be false, but it can be useful when testing against
some Load Balancers like Amazon ELB.
Defaults to: false



On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <[hidden email]> wrote:

> Thanks for your feedback Philippe, but it does not work. Jmeter.log is
> uploaded at
> https://pastebin.com/2Y9E4wCm
>
> I made following entry in log4j2.xml and restarted JMeter.
> <Logger name="org.apache.http.impl.execchain.RetryExec" level="info" />
>
> *Muhammad Nasir*
> Lead Quality Assurance Engineer
> *folio3* Pvt. Ltd.
> www.folio3.com
> Cell: +92 332 257 9082
>
> On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> [hidden email]> wrote:
>
> > Hello,
> > Set this logger to Info:
> > org.apache.http.impl.execchain.RetryExec
> >
> > It can be done in log4j2.xml
> >
> > Regards
> >
> > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <[hidden email]>
> wrote:
> >
> > > Hello,
> > >
> > > Is there a way to log HTTP sampler retry in JMeter logs? Although I am
> > > seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP
> request
> > > retry count = 2" but not sure whether it's actually working or not,
> > because
> > > total number of requests are not showing retries.
> > >
> > > Thanks,
> > > Nasir
> > >
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> > Ubik-Ingénierie
> >
> > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> >
> > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> >
>



--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
I have made all the changes and I am expecting failed requests to retry,
but unfortunately it is not working. I am also not seeing any log trace for
this as well.


*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <[hidden email]
> wrote:

> Hello,
> How do you think retry work ?
> Do you expect it to retry successful requests ? Any failed call ?
>
> That's not the case.
>
>
> See:
> http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request
>
> *Retry handling*
> For HttpClient4 the retry count has been set to 0, meaning no retry is
> attempted. Note that the Java implementation appears to retry 1 time. The
> retry count can be overridden by setting the relevant JMeter property, for
> example:
>
> httpclient4.retrycount=3
>
> httpclient4.request_sent_retry_enabled=true
>
> And also:
> http://jmeter.apache.org/usermanual/properties_reference.html
>
> httpclient4.retrycount:
> Number of retries to attempt. Retry will be done on Idempotent Http Methods
> by default. If you want to retry for all methods, see property
> httpclient4.request_sent_retry_enabled
> Defaults to: 0
>
> httpclient4.request_sent_retry_enabled:
> Set this property to true if it's OK to retry requests that have been sent.
> This mean that both Idempotent and non Idempotent requests will be retried.
> This should usually be false, but it can be useful when testing against
> some Load Balancers like Amazon ELB.
> Defaults to: false
>
>
>
> On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <[hidden email]> wrote:
>
> > Thanks for your feedback Philippe, but it does not work. Jmeter.log is
> > uploaded at
> > https://pastebin.com/2Y9E4wCm
> >
> > I made following entry in log4j2.xml and restarted JMeter.
> > <Logger name="org.apache.http.impl.execchain.RetryExec" level="info" />
> >
> > *Muhammad Nasir*
> > Lead Quality Assurance Engineer
> > *folio3* Pvt. Ltd.
> > www.folio3.com
> > Cell: +92 332 257 9082
> >
> > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > [hidden email]> wrote:
> >
> > > Hello,
> > > Set this logger to Info:
> > > org.apache.http.impl.execchain.RetryExec
> > >
> > > It can be done in log4j2.xml
> > >
> > > Regards
> > >
> > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <[hidden email]>
> > wrote:
> > >
> > > > Hello,
> > > >
> > > > Is there a way to log HTTP sampler retry in JMeter logs? Although I
> am
> > > > seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP
> > request
> > > > retry count = 2" but not sure whether it's actually working or not,
> > > because
> > > > total number of requests are not showing retries.
> > > >
> > > > Thanks,
> > > > Nasir
> > > >
> > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > > Ubik-Ingénierie
> > >
> > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > >
> > > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> > >
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
pmd
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

pmd
Hello,
Why don't you answer my question ?
What are you doing in your request and what are you expecting ?

Thanks

On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <[hidden email]> wrote:

> I have made all the changes and I am expecting failed requests to retry,
> but unfortunately it is not working. I am also not seeing any log trace for
> this as well.
>
>
> *Muhammad Nasir*
> Lead Quality Assurance Engineer
> *folio3* Pvt. Ltd.
> www.folio3.com
> Cell: +92 332 257 9082
>
> On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> [hidden email]
> > wrote:
>
> > Hello,
> > How do you think retry work ?
> > Do you expect it to retry successful requests ? Any failed call ?
> >
> > That's not the case.
> >
> >
> > See:
> > http://jmeter.apache.org/usermanual/component_
> reference.html#HTTP_Request
> >
> > *Retry handling*
> > For HttpClient4 the retry count has been set to 0, meaning no retry is
> > attempted. Note that the Java implementation appears to retry 1 time. The
> > retry count can be overridden by setting the relevant JMeter property,
> for
> > example:
> >
> > httpclient4.retrycount=3
> >
> > httpclient4.request_sent_retry_enabled=true
> >
> > And also:
> > http://jmeter.apache.org/usermanual/properties_reference.html
> >
> > httpclient4.retrycount:
> > Number of retries to attempt. Retry will be done on Idempotent Http
> Methods
> > by default. If you want to retry for all methods, see property
> > httpclient4.request_sent_retry_enabled
> > Defaults to: 0
> >
> > httpclient4.request_sent_retry_enabled:
> > Set this property to true if it's OK to retry requests that have been
> sent.
> > This mean that both Idempotent and non Idempotent requests will be
> retried.
> > This should usually be false, but it can be useful when testing against
> > some Load Balancers like Amazon ELB.
> > Defaults to: false
> >
> >
> >
> > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <[hidden email]>
> wrote:
> >
> > > Thanks for your feedback Philippe, but it does not work. Jmeter.log is
> > > uploaded at
> > > https://pastebin.com/2Y9E4wCm
> > >
> > > I made following entry in log4j2.xml and restarted JMeter.
> > > <Logger name="org.apache.http.impl.execchain.RetryExec" level="info"
> />
> > >
> > > *Muhammad Nasir*
> > > Lead Quality Assurance Engineer
> > > *folio3* Pvt. Ltd.
> > > www.folio3.com
> > > Cell: +92 332 257 9082
> > >
> > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > [hidden email]> wrote:
> > >
> > > > Hello,
> > > > Set this logger to Info:
> > > > org.apache.http.impl.execchain.RetryExec
> > > >
> > > > It can be done in log4j2.xml
> > > >
> > > > Regards
> > > >
> > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <[hidden email]>
> > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > Is there a way to log HTTP sampler retry in JMeter logs? Although I
> > am
> > > > > seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP
> > > request
> > > > > retry count = 2" but not sure whether it's actually working or not,
> > > > because
> > > > > total number of requests are not showing retries.
> > > > >
> > > > > Thanks,
> > > > > Nasir
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > > > Ubik-Ingénierie
> > > >
> > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > >
> > > > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> > > >
> > >
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>



--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
I am trying to login to server and sending REST API call. for testing
purpose I am setting Response Timeout = 10 in HTTP Request Defaults.

Summary Results Listener shows that Login Request Failed due to Read
Timeout but I am not seeing any retries for that particular request before
being marked as failed and listener also shows as single request sent.

*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <[hidden email]
> wrote:

> Hello,
> Why don't you answer my question ?
> What are you doing in your request and what are you expecting ?
>
> Thanks
>
> On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <[hidden email]> wrote:
>
> > I have made all the changes and I am expecting failed requests to retry,
> > but unfortunately it is not working. I am also not seeing any log trace
> for
> > this as well.
> >
> >
> > *Muhammad Nasir*
> > Lead Quality Assurance Engineer
> > *folio3* Pvt. Ltd.
> > www.folio3.com
> > Cell: +92 332 257 9082
> >
> > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > [hidden email]
> > > wrote:
> >
> > > Hello,
> > > How do you think retry work ?
> > > Do you expect it to retry successful requests ? Any failed call ?
> > >
> > > That's not the case.
> > >
> > >
> > > See:
> > > http://jmeter.apache.org/usermanual/component_
> > reference.html#HTTP_Request
> > >
> > > *Retry handling*
> > > For HttpClient4 the retry count has been set to 0, meaning no retry is
> > > attempted. Note that the Java implementation appears to retry 1 time.
> The
> > > retry count can be overridden by setting the relevant JMeter property,
> > for
> > > example:
> > >
> > > httpclient4.retrycount=3
> > >
> > > httpclient4.request_sent_retry_enabled=true
> > >
> > > And also:
> > > http://jmeter.apache.org/usermanual/properties_reference.html
> > >
> > > httpclient4.retrycount:
> > > Number of retries to attempt. Retry will be done on Idempotent Http
> > Methods
> > > by default. If you want to retry for all methods, see property
> > > httpclient4.request_sent_retry_enabled
> > > Defaults to: 0
> > >
> > > httpclient4.request_sent_retry_enabled:
> > > Set this property to true if it's OK to retry requests that have been
> > sent.
> > > This mean that both Idempotent and non Idempotent requests will be
> > retried.
> > > This should usually be false, but it can be useful when testing against
> > > some Load Balancers like Amazon ELB.
> > > Defaults to: false
> > >
> > >
> > >
> > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <[hidden email]>
> > wrote:
> > >
> > > > Thanks for your feedback Philippe, but it does not work. Jmeter.log
> is
> > > > uploaded at
> > > > https://pastebin.com/2Y9E4wCm
> > > >
> > > > I made following entry in log4j2.xml and restarted JMeter.
> > > > <Logger name="org.apache.http.impl.execchain.RetryExec" level="info"
> > />
> > > >
> > > > *Muhammad Nasir*
> > > > Lead Quality Assurance Engineer
> > > > *folio3* Pvt. Ltd.
> > > > www.folio3.com
> > > > Cell: +92 332 257 9082
> > > >
> > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > [hidden email]> wrote:
> > > >
> > > > > Hello,
> > > > > Set this logger to Info:
> > > > > org.apache.http.impl.execchain.RetryExec
> > > > >
> > > > > It can be done in log4j2.xml
> > > > >
> > > > > Regards
> > > > >
> > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <[hidden email]>
> > > > wrote:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > Is there a way to log HTTP sampler retry in JMeter logs?
> Although I
> > > am
> > > > > > seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP
> > > > request
> > > > > > retry count = 2" but not sure whether it's actually working or
> not,
> > > > > because
> > > > > > total number of requests are not showing retries.
> > > > > >
> > > > > > Thanks,
> > > > > > Nasir
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cordialement.
> > > > > Philippe Mouawad.
> > > > > Ubik-Ingénierie
> > > > >
> > > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > > >
> > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
pmd
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

pmd
What http methods are you using and what are the values of the properties  ?


On Thursday, November 2, 2017, Muhammad Nasir <[hidden email]> wrote:

> I am trying to login to server and sending REST API call. for testing
> purpose I am setting Response Timeout = 10 in HTTP Request Defaults.
>
> Summary Results Listener shows that Login Request Failed due to Read
> Timeout but I am not seeing any retries for that particular request before
> being marked as failed and listener also shows as single request sent.
>
> *Muhammad Nasir*
> Lead Quality Assurance Engineer
> *folio3* Pvt. Ltd.
> www.folio3.com
> Cell: +92 332 257 9082
>
> On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> [hidden email] <javascript:;>
> > wrote:
>
> > Hello,
> > Why don't you answer my question ?
> > What are you doing in your request and what are you expecting ?
> >
> > Thanks
> >
> > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <[hidden email]
> <javascript:;>> wrote:
> >
> > > I have made all the changes and I am expecting failed requests to
> retry,
> > > but unfortunately it is not working. I am also not seeing any log trace
> > for
> > > this as well.
> > >
> > >
> > > *Muhammad Nasir*
> > > Lead Quality Assurance Engineer
> > > *folio3* Pvt. Ltd.
> > > www.folio3.com
> > > Cell: +92 332 257 9082
> > >
> > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > [hidden email] <javascript:;>
> > > > wrote:
> > >
> > > > Hello,
> > > > How do you think retry work ?
> > > > Do you expect it to retry successful requests ? Any failed call ?
> > > >
> > > > That's not the case.
> > > >
> > > >
> > > > See:
> > > > http://jmeter.apache.org/usermanual/component_
> > > reference.html#HTTP_Request
> > > >
> > > > *Retry handling*
> > > > For HttpClient4 the retry count has been set to 0, meaning no retry
> is
> > > > attempted. Note that the Java implementation appears to retry 1 time.
> > The
> > > > retry count can be overridden by setting the relevant JMeter
> property,
> > > for
> > > > example:
> > > >
> > > > httpclient4.retrycount=3
> > > >
> > > > httpclient4.request_sent_retry_enabled=true
> > > >
> > > > And also:
> > > > http://jmeter.apache.org/usermanual/properties_reference.html
> > > >
> > > > httpclient4.retrycount:
> > > > Number of retries to attempt. Retry will be done on Idempotent Http
> > > Methods
> > > > by default. If you want to retry for all methods, see property
> > > > httpclient4.request_sent_retry_enabled
> > > > Defaults to: 0
> > > >
> > > > httpclient4.request_sent_retry_enabled:
> > > > Set this property to true if it's OK to retry requests that have been
> > > sent.
> > > > This mean that both Idempotent and non Idempotent requests will be
> > > retried.
> > > > This should usually be false, but it can be useful when testing
> against
> > > > some Load Balancers like Amazon ELB.
> > > > Defaults to: false
> > > >
> > > >
> > > >
> > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <[hidden email]
> <javascript:;>>
> > > wrote:
> > > >
> > > > > Thanks for your feedback Philippe, but it does not work. Jmeter.log
> > is
> > > > > uploaded at
> > > > > https://pastebin.com/2Y9E4wCm
> > > > >
> > > > > I made following entry in log4j2.xml and restarted JMeter.
> > > > > <Logger name="org.apache.http.impl.execchain.RetryExec"
> level="info"
> > > />
> > > > >
> > > > > *Muhammad Nasir*
> > > > > Lead Quality Assurance Engineer
> > > > > *folio3* Pvt. Ltd.
> > > > > www.folio3.com
> > > > > Cell: +92 332 257 9082
> > > > >
> > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > [hidden email] <javascript:;>> wrote:
> > > > >
> > > > > > Hello,
> > > > > > Set this logger to Info:
> > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > >
> > > > > > It can be done in log4j2.xml
> > > > > >
> > > > > > Regards
> > > > > >
> > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> [hidden email] <javascript:;>>
> > > > > wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > Is there a way to log HTTP sampler retry in JMeter logs?
> > Although I
> > > > am
> > > > > > > seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl:
> HTTP
> > > > > request
> > > > > > > retry count = 2" but not sure whether it's actually working or
> > not,
> > > > > > because
> > > > > > > total number of requests are not showing retries.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Nasir
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Cordialement.
> > > > > > Philippe Mouawad.
> > > > > > Ubik-Ingénierie
> > > > > >
> > > > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > > > >
> > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > > >
> > >
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>


--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
I am using *httpclient4 *with *POST *method.
Properties file is uploaded at https://pastebin.com/6SXfL3Hf

*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <[hidden email]
> wrote:

> What http methods are you using and what are the values of the properties
> ?
>
>
> On Thursday, November 2, 2017, Muhammad Nasir <[hidden email]> wrote:
>
> > I am trying to login to server and sending REST API call. for testing
> > purpose I am setting Response Timeout = 10 in HTTP Request Defaults.
> >
> > Summary Results Listener shows that Login Request Failed due to Read
> > Timeout but I am not seeing any retries for that particular request
> before
> > being marked as failed and listener also shows as single request sent.
> >
> > *Muhammad Nasir*
> > Lead Quality Assurance Engineer
> > *folio3* Pvt. Ltd.
> > www.folio3.com
> > Cell: +92 332 257 9082
> >
> > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > [hidden email] <javascript:;>
> > > wrote:
> >
> > > Hello,
> > > Why don't you answer my question ?
> > > What are you doing in your request and what are you expecting ?
> > >
> > > Thanks
> > >
> > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <[hidden email]
> > <javascript:;>> wrote:
> > >
> > > > I have made all the changes and I am expecting failed requests to
> > retry,
> > > > but unfortunately it is not working. I am also not seeing any log
> trace
> > > for
> > > > this as well.
> > > >
> > > >
> > > > *Muhammad Nasir*
> > > > Lead Quality Assurance Engineer
> > > > *folio3* Pvt. Ltd.
> > > > www.folio3.com
> > > > Cell: +92 332 257 9082
> > > >
> > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > [hidden email] <javascript:;>
> > > > > wrote:
> > > >
> > > > > Hello,
> > > > > How do you think retry work ?
> > > > > Do you expect it to retry successful requests ? Any failed call ?
> > > > >
> > > > > That's not the case.
> > > > >
> > > > >
> > > > > See:
> > > > > http://jmeter.apache.org/usermanual/component_
> > > > reference.html#HTTP_Request
> > > > >
> > > > > *Retry handling*
> > > > > For HttpClient4 the retry count has been set to 0, meaning no retry
> > is
> > > > > attempted. Note that the Java implementation appears to retry 1
> time.
> > > The
> > > > > retry count can be overridden by setting the relevant JMeter
> > property,
> > > > for
> > > > > example:
> > > > >
> > > > > httpclient4.retrycount=3
> > > > >
> > > > > httpclient4.request_sent_retry_enabled=true
> > > > >
> > > > > And also:
> > > > > http://jmeter.apache.org/usermanual/properties_reference.html
> > > > >
> > > > > httpclient4.retrycount:
> > > > > Number of retries to attempt. Retry will be done on Idempotent Http
> > > > Methods
> > > > > by default. If you want to retry for all methods, see property
> > > > > httpclient4.request_sent_retry_enabled
> > > > > Defaults to: 0
> > > > >
> > > > > httpclient4.request_sent_retry_enabled:
> > > > > Set this property to true if it's OK to retry requests that have
> been
> > > > sent.
> > > > > This mean that both Idempotent and non Idempotent requests will be
> > > > retried.
> > > > > This should usually be false, but it can be useful when testing
> > against
> > > > > some Load Balancers like Amazon ELB.
> > > > > Defaults to: false
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <[hidden email]
> > <javascript:;>>
> > > > wrote:
> > > > >
> > > > > > Thanks for your feedback Philippe, but it does not work.
> Jmeter.log
> > > is
> > > > > > uploaded at
> > > > > > https://pastebin.com/2Y9E4wCm
> > > > > >
> > > > > > I made following entry in log4j2.xml and restarted JMeter.
> > > > > > <Logger name="org.apache.http.impl.execchain.RetryExec"
> > level="info"
> > > > />
> > > > > >
> > > > > > *Muhammad Nasir*
> > > > > > Lead Quality Assurance Engineer
> > > > > > *folio3* Pvt. Ltd.
> > > > > > www.folio3.com
> > > > > > Cell: +92 332 257 9082
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > [hidden email] <javascript:;>> wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > > Set this logger to Info:
> > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > >
> > > > > > > It can be done in log4j2.xml
> > > > > > >
> > > > > > > Regards
> > > > > > >
> > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > [hidden email] <javascript:;>>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > Is there a way to log HTTP sampler retry in JMeter logs?
> > > Although I
> > > > > am
> > > > > > > > seeing"2017-11-01 07:54:25,703 INFO o.a.j.p.h.s.HTTPHC4Impl:
> > HTTP
> > > > > > request
> > > > > > > > retry count = 2" but not sure whether it's actually working
> or
> > > not,
> > > > > > > because
> > > > > > > > total number of requests are not showing retries.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Nasir
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Cordialement.
> > > > > > > Philippe Mouawad.
> > > > > > > Ubik-Ingénierie
> > > > > > >
> > > > > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > > > > >
> > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cordialement.
> > > > > Philippe Mouawad.
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
pmd
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

pmd
So:

1) POST is not idempotent, by default no retry will be done unless you set
httpclient4.request_sent_retry_enabled
2) Retry is not done if request was sent, so if you're getting response
timeout, you're in this case



On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <[hidden email]> wrote:

> I am using *httpclient4 *with *POST *method.
> Properties file is uploaded at https://pastebin.com/6SXfL3Hf
>
> *Muhammad Nasir*
> Lead Quality Assurance Engineer
> *folio3* Pvt. Ltd.
> www.folio3.com
> Cell: +92 332 257 9082
>
> On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> [hidden email]
> > wrote:
>
> > What http methods are you using and what are the values of the properties
> > ?
> >
> >
> > On Thursday, November 2, 2017, Muhammad Nasir <[hidden email]> wrote:
> >
> > > I am trying to login to server and sending REST API call. for testing
> > > purpose I am setting Response Timeout = 10 in HTTP Request Defaults.
> > >
> > > Summary Results Listener shows that Login Request Failed due to Read
> > > Timeout but I am not seeing any retries for that particular request
> > before
> > > being marked as failed and listener also shows as single request sent.
> > >
> > > *Muhammad Nasir*
> > > Lead Quality Assurance Engineer
> > > *folio3* Pvt. Ltd.
> > > www.folio3.com
> > > Cell: +92 332 257 9082
> > >
> > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > [hidden email] <javascript:;>
> > > > wrote:
> > >
> > > > Hello,
> > > > Why don't you answer my question ?
> > > > What are you doing in your request and what are you expecting ?
> > > >
> > > > Thanks
> > > >
> > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <[hidden email]
> > > <javascript:;>> wrote:
> > > >
> > > > > I have made all the changes and I am expecting failed requests to
> > > retry,
> > > > > but unfortunately it is not working. I am also not seeing any log
> > trace
> > > > for
> > > > > this as well.
> > > > >
> > > > >
> > > > > *Muhammad Nasir*
> > > > > Lead Quality Assurance Engineer
> > > > > *folio3* Pvt. Ltd.
> > > > > www.folio3.com
> > > > > Cell: +92 332 257 9082
> > > > >
> > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > [hidden email] <javascript:;>
> > > > > > wrote:
> > > > >
> > > > > > Hello,
> > > > > > How do you think retry work ?
> > > > > > Do you expect it to retry successful requests ? Any failed call ?
> > > > > >
> > > > > > That's not the case.
> > > > > >
> > > > > >
> > > > > > See:
> > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > reference.html#HTTP_Request
> > > > > >
> > > > > > *Retry handling*
> > > > > > For HttpClient4 the retry count has been set to 0, meaning no
> retry
> > > is
> > > > > > attempted. Note that the Java implementation appears to retry 1
> > time.
> > > > The
> > > > > > retry count can be overridden by setting the relevant JMeter
> > > property,
> > > > > for
> > > > > > example:
> > > > > >
> > > > > > httpclient4.retrycount=3
> > > > > >
> > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > >
> > > > > > And also:
> > > > > > http://jmeter.apache.org/usermanual/properties_reference.html
> > > > > >
> > > > > > httpclient4.retrycount:
> > > > > > Number of retries to attempt. Retry will be done on Idempotent
> Http
> > > > > Methods
> > > > > > by default. If you want to retry for all methods, see property
> > > > > > httpclient4.request_sent_retry_enabled
> > > > > > Defaults to: 0
> > > > > >
> > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > Set this property to true if it's OK to retry requests that have
> > been
> > > > > sent.
> > > > > > This mean that both Idempotent and non Idempotent requests will
> be
> > > > > retried.
> > > > > > This should usually be false, but it can be useful when testing
> > > against
> > > > > > some Load Balancers like Amazon ELB.
> > > > > > Defaults to: false
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> [hidden email]
> > > <javascript:;>>
> > > > > wrote:
> > > > > >
> > > > > > > Thanks for your feedback Philippe, but it does not work.
> > Jmeter.log
> > > > is
> > > > > > > uploaded at
> > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > >
> > > > > > > I made following entry in log4j2.xml and restarted JMeter.
> > > > > > > <Logger name="org.apache.http.impl.execchain.RetryExec"
> > > level="info"
> > > > > />
> > > > > > >
> > > > > > > *Muhammad Nasir*
> > > > > > > Lead Quality Assurance Engineer
> > > > > > > *folio3* Pvt. Ltd.
> > > > > > > www.folio3.com
> > > > > > > Cell: +92 332 257 9082
> > > > > > >
> > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > [hidden email] <javascript:;>> wrote:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > > Set this logger to Info:
> > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > >
> > > > > > > > It can be done in log4j2.xml
> > > > > > > >
> > > > > > > > Regards
> > > > > > > >
> > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > [hidden email] <javascript:;>>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > >
> > > > > > > > > Is there a way to log HTTP sampler retry in JMeter logs?
> > > > Although I
> > > > > > am
> > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> o.a.j.p.h.s.HTTPHC4Impl:
> > > HTTP
> > > > > > > request
> > > > > > > > > retry count = 2" but not sure whether it's actually working
> > or
> > > > not,
> > > > > > > > because
> > > > > > > > > total number of requests are not showing retries.
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Nasir
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Cordialement.
> > > > > > > > Philippe Mouawad.
> > > > > > > > Ubik-Ingénierie
> > > > > > > >
> > > > > > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > > > > > >
> > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Cordialement.
> > > > > > Philippe Mouawad.
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > > >
> > >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>



--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
I have already configured it to true in JMeter.properties file and
configured all other relevant settings.
https://pastebin.com/6SXfL3Hf

Am I making any mistake here? Also is there a way to log all these trying
to connect and retry attempts in logs?


*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 6:38 PM, Philippe Mouawad <[hidden email]
> wrote:

> So:
>
> 1) POST is not idempotent, by default no retry will be done unless you set
> httpclient4.request_sent_retry_enabled
> 2) Retry is not done if request was sent, so if you're getting response
> timeout, you're in this case
>
>
>
> On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <[hidden email]> wrote:
>
> > I am using *httpclient4 *with *POST *method.
> > Properties file is uploaded at https://pastebin.com/6SXfL3Hf
> >
> > *Muhammad Nasir*
> > Lead Quality Assurance Engineer
> > *folio3* Pvt. Ltd.
> > www.folio3.com
> > Cell: +92 332 257 9082
> >
> > On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> > [hidden email]
> > > wrote:
> >
> > > What http methods are you using and what are the values of the
> properties
> > > ?
> > >
> > >
> > > On Thursday, November 2, 2017, Muhammad Nasir <[hidden email]>
> wrote:
> > >
> > > > I am trying to login to server and sending REST API call. for testing
> > > > purpose I am setting Response Timeout = 10 in HTTP Request Defaults.
> > > >
> > > > Summary Results Listener shows that Login Request Failed due to Read
> > > > Timeout but I am not seeing any retries for that particular request
> > > before
> > > > being marked as failed and listener also shows as single request
> sent.
> > > >
> > > > *Muhammad Nasir*
> > > > Lead Quality Assurance Engineer
> > > > *folio3* Pvt. Ltd.
> > > > www.folio3.com
> > > > Cell: +92 332 257 9082
> > > >
> > > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > > [hidden email] <javascript:;>
> > > > > wrote:
> > > >
> > > > > Hello,
> > > > > Why don't you answer my question ?
> > > > > What are you doing in your request and what are you expecting ?
> > > > >
> > > > > Thanks
> > > > >
> > > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <[hidden email]
> > > > <javascript:;>> wrote:
> > > > >
> > > > > > I have made all the changes and I am expecting failed requests to
> > > > retry,
> > > > > > but unfortunately it is not working. I am also not seeing any log
> > > trace
> > > > > for
> > > > > > this as well.
> > > > > >
> > > > > >
> > > > > > *Muhammad Nasir*
> > > > > > Lead Quality Assurance Engineer
> > > > > > *folio3* Pvt. Ltd.
> > > > > > www.folio3.com
> > > > > > Cell: +92 332 257 9082
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > > [hidden email] <javascript:;>
> > > > > > > wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > > How do you think retry work ?
> > > > > > > Do you expect it to retry successful requests ? Any failed
> call ?
> > > > > > >
> > > > > > > That's not the case.
> > > > > > >
> > > > > > >
> > > > > > > See:
> > > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > > reference.html#HTTP_Request
> > > > > > >
> > > > > > > *Retry handling*
> > > > > > > For HttpClient4 the retry count has been set to 0, meaning no
> > retry
> > > > is
> > > > > > > attempted. Note that the Java implementation appears to retry 1
> > > time.
> > > > > The
> > > > > > > retry count can be overridden by setting the relevant JMeter
> > > > property,
> > > > > > for
> > > > > > > example:
> > > > > > >
> > > > > > > httpclient4.retrycount=3
> > > > > > >
> > > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > > >
> > > > > > > And also:
> > > > > > > http://jmeter.apache.org/usermanual/properties_reference.html
> > > > > > >
> > > > > > > httpclient4.retrycount:
> > > > > > > Number of retries to attempt. Retry will be done on Idempotent
> > Http
> > > > > > Methods
> > > > > > > by default. If you want to retry for all methods, see property
> > > > > > > httpclient4.request_sent_retry_enabled
> > > > > > > Defaults to: 0
> > > > > > >
> > > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > > Set this property to true if it's OK to retry requests that
> have
> > > been
> > > > > > sent.
> > > > > > > This mean that both Idempotent and non Idempotent requests will
> > be
> > > > > > retried.
> > > > > > > This should usually be false, but it can be useful when testing
> > > > against
> > > > > > > some Load Balancers like Amazon ELB.
> > > > > > > Defaults to: false
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> > [hidden email]
> > > > <javascript:;>>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Thanks for your feedback Philippe, but it does not work.
> > > Jmeter.log
> > > > > is
> > > > > > > > uploaded at
> > > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > > >
> > > > > > > > I made following entry in log4j2.xml and restarted JMeter.
> > > > > > > > <Logger name="org.apache.http.impl.execchain.RetryExec"
> > > > level="info"
> > > > > > />
> > > > > > > >
> > > > > > > > *Muhammad Nasir*
> > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > www.folio3.com
> > > > > > > > Cell: +92 332 257 9082
> > > > > > > >
> > > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > > [hidden email] <javascript:;>> wrote:
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > > Set this logger to Info:
> > > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > > >
> > > > > > > > > It can be done in log4j2.xml
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > >
> > > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > > [hidden email] <javascript:;>>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Hello,
> > > > > > > > > >
> > > > > > > > > > Is there a way to log HTTP sampler retry in JMeter logs?
> > > > > Although I
> > > > > > > am
> > > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> > o.a.j.p.h.s.HTTPHC4Impl:
> > > > HTTP
> > > > > > > > request
> > > > > > > > > > retry count = 2" but not sure whether it's actually
> working
> > > or
> > > > > not,
> > > > > > > > > because
> > > > > > > > > > total number of requests are not showing retries.
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > > Nasir
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Cordialement.
> > > > > > > > > Philippe Mouawad.
> > > > > > > > > Ubik-Ingénierie
> > > > > > > > >
> > > > > > > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > > > > > > >
> > > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/
> ubikloadpack>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Cordialement.
> > > > > > > Philippe Mouawad.
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cordialement.
> > > > > Philippe Mouawad.
> > > > >
> > > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
pmd
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

pmd
Hello,
As I wrote:

=> Retry is not done if request was sent, you're in this case

Regarding logging, I gave you the new HTTPClient class, for current jmeter
it's:

   - org.apache.http.impl.client.DefaultRequestDirector

Regards


On Thu, Nov 2, 2017 at 2:47 PM, Muhammad Nasir <[hidden email]> wrote:

> I have already configured it to true in JMeter.properties file and
> configured all other relevant settings.
> https://pastebin.com/6SXfL3Hf
>
> Am I making any mistake here? Also is there a way to log all these trying
> to connect and retry attempts in logs?
>
>
> *Muhammad Nasir*
> Lead Quality Assurance Engineer
> *folio3* Pvt. Ltd.
> www.folio3.com
> Cell: +92 332 257 9082
>
> On Thu, Nov 2, 2017 at 6:38 PM, Philippe Mouawad <
> [hidden email]
> > wrote:
>
> > So:
> >
> > 1) POST is not idempotent, by default no retry will be done unless you
> set
> > httpclient4.request_sent_retry_enabled
> > 2) Retry is not done if request was sent, so if you're getting response
> > timeout, you're in this case
> >
> >
> >
> > On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <[hidden email]>
> wrote:
> >
> > > I am using *httpclient4 *with *POST *method.
> > > Properties file is uploaded at https://pastebin.com/6SXfL3Hf
> > >
> > > *Muhammad Nasir*
> > > Lead Quality Assurance Engineer
> > > *folio3* Pvt. Ltd.
> > > www.folio3.com
> > > Cell: +92 332 257 9082
> > >
> > > On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> > > [hidden email]
> > > > wrote:
> > >
> > > > What http methods are you using and what are the values of the
> > properties
> > > > ?
> > > >
> > > >
> > > > On Thursday, November 2, 2017, Muhammad Nasir <[hidden email]>
> > wrote:
> > > >
> > > > > I am trying to login to server and sending REST API call. for
> testing
> > > > > purpose I am setting Response Timeout = 10 in HTTP Request
> Defaults.
> > > > >
> > > > > Summary Results Listener shows that Login Request Failed due to
> Read
> > > > > Timeout but I am not seeing any retries for that particular request
> > > > before
> > > > > being marked as failed and listener also shows as single request
> > sent.
> > > > >
> > > > > *Muhammad Nasir*
> > > > > Lead Quality Assurance Engineer
> > > > > *folio3* Pvt. Ltd.
> > > > > www.folio3.com
> > > > > Cell: +92 332 257 9082
> > > > >
> > > > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > > > [hidden email] <javascript:;>
> > > > > > wrote:
> > > > >
> > > > > > Hello,
> > > > > > Why don't you answer my question ?
> > > > > > What are you doing in your request and what are you expecting ?
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <
> [hidden email]
> > > > > <javascript:;>> wrote:
> > > > > >
> > > > > > > I have made all the changes and I am expecting failed requests
> to
> > > > > retry,
> > > > > > > but unfortunately it is not working. I am also not seeing any
> log
> > > > trace
> > > > > > for
> > > > > > > this as well.
> > > > > > >
> > > > > > >
> > > > > > > *Muhammad Nasir*
> > > > > > > Lead Quality Assurance Engineer
> > > > > > > *folio3* Pvt. Ltd.
> > > > > > > www.folio3.com
> > > > > > > Cell: +92 332 257 9082
> > > > > > >
> > > > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > > > [hidden email] <javascript:;>
> > > > > > > > wrote:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > > How do you think retry work ?
> > > > > > > > Do you expect it to retry successful requests ? Any failed
> > call ?
> > > > > > > >
> > > > > > > > That's not the case.
> > > > > > > >
> > > > > > > >
> > > > > > > > See:
> > > > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > > > reference.html#HTTP_Request
> > > > > > > >
> > > > > > > > *Retry handling*
> > > > > > > > For HttpClient4 the retry count has been set to 0, meaning no
> > > retry
> > > > > is
> > > > > > > > attempted. Note that the Java implementation appears to
> retry 1
> > > > time.
> > > > > > The
> > > > > > > > retry count can be overridden by setting the relevant JMeter
> > > > > property,
> > > > > > > for
> > > > > > > > example:
> > > > > > > >
> > > > > > > > httpclient4.retrycount=3
> > > > > > > >
> > > > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > > > >
> > > > > > > > And also:
> > > > > > > > http://jmeter.apache.org/usermanual/properties_
> reference.html
> > > > > > > >
> > > > > > > > httpclient4.retrycount:
> > > > > > > > Number of retries to attempt. Retry will be done on
> Idempotent
> > > Http
> > > > > > > Methods
> > > > > > > > by default. If you want to retry for all methods, see
> property
> > > > > > > > httpclient4.request_sent_retry_enabled
> > > > > > > > Defaults to: 0
> > > > > > > >
> > > > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > > > Set this property to true if it's OK to retry requests that
> > have
> > > > been
> > > > > > > sent.
> > > > > > > > This mean that both Idempotent and non Idempotent requests
> will
> > > be
> > > > > > > retried.
> > > > > > > > This should usually be false, but it can be useful when
> testing
> > > > > against
> > > > > > > > some Load Balancers like Amazon ELB.
> > > > > > > > Defaults to: false
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> > > [hidden email]
> > > > > <javascript:;>>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Thanks for your feedback Philippe, but it does not work.
> > > > Jmeter.log
> > > > > > is
> > > > > > > > > uploaded at
> > > > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > > > >
> > > > > > > > > I made following entry in log4j2.xml and restarted JMeter.
> > > > > > > > > <Logger name="org.apache.http.impl.execchain.RetryExec"
> > > > > level="info"
> > > > > > > />
> > > > > > > > >
> > > > > > > > > *Muhammad Nasir*
> > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > www.folio3.com
> > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > >
> > > > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > > > [hidden email] <javascript:;>> wrote:
> > > > > > > > >
> > > > > > > > > > Hello,
> > > > > > > > > > Set this logger to Info:
> > > > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > > > >
> > > > > > > > > > It can be done in log4j2.xml
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > >
> > > > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > > > [hidden email] <javascript:;>>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Hello,
> > > > > > > > > > >
> > > > > > > > > > > Is there a way to log HTTP sampler retry in JMeter
> logs?
> > > > > > Although I
> > > > > > > > am
> > > > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> > > o.a.j.p.h.s.HTTPHC4Impl:
> > > > > HTTP
> > > > > > > > > request
> > > > > > > > > > > retry count = 2" but not sure whether it's actually
> > working
> > > > or
> > > > > > not,
> > > > > > > > > > because
> > > > > > > > > > > total number of requests are not showing retries.
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > > Nasir
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Cordialement.
> > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > Ubik-Ingénierie
> > > > > > > > > >
> > > > > > > > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > > > > > > > >
> > > > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/
> > ubikloadpack>
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Cordialement.
> > > > > > > > Philippe Mouawad.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Cordialement.
> > > > > > Philippe Mouawad.
> > > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > > >
> > >
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>



--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
What I am trying to explain is that these changes are not working. I am
sharing my jmeter.properties file, Is there anything that I missed?

https://pastebin.com/6SXfL3Hf

Thanks for your feedback

*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 6:57 PM, Philippe Mouawad <[hidden email]
> wrote:

> Hello,
> As I wrote:
>
> => Retry is not done if request was sent, you're in this case
>
> Regarding logging, I gave you the new HTTPClient class, for current jmeter
> it's:
>
>    - org.apache.http.impl.client.DefaultRequestDirector
>
> Regards
>
>
> On Thu, Nov 2, 2017 at 2:47 PM, Muhammad Nasir <[hidden email]> wrote:
>
> > I have already configured it to true in JMeter.properties file and
> > configured all other relevant settings.
> > https://pastebin.com/6SXfL3Hf
> >
> > Am I making any mistake here? Also is there a way to log all these trying
> > to connect and retry attempts in logs?
> >
> >
> > *Muhammad Nasir*
> > Lead Quality Assurance Engineer
> > *folio3* Pvt. Ltd.
> > www.folio3.com
> > Cell: +92 332 257 9082
> >
> > On Thu, Nov 2, 2017 at 6:38 PM, Philippe Mouawad <
> > [hidden email]
> > > wrote:
> >
> > > So:
> > >
> > > 1) POST is not idempotent, by default no retry will be done unless you
> > set
> > > httpclient4.request_sent_retry_enabled
> > > 2) Retry is not done if request was sent, so if you're getting response
> > > timeout, you're in this case
> > >
> > >
> > >
> > > On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <[hidden email]>
> > wrote:
> > >
> > > > I am using *httpclient4 *with *POST *method.
> > > > Properties file is uploaded at https://pastebin.com/6SXfL3Hf
> > > >
> > > > *Muhammad Nasir*
> > > > Lead Quality Assurance Engineer
> > > > *folio3* Pvt. Ltd.
> > > > www.folio3.com
> > > > Cell: +92 332 257 9082
> > > >
> > > > On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> > > > [hidden email]
> > > > > wrote:
> > > >
> > > > > What http methods are you using and what are the values of the
> > > properties
> > > > > ?
> > > > >
> > > > >
> > > > > On Thursday, November 2, 2017, Muhammad Nasir <[hidden email]>
> > > wrote:
> > > > >
> > > > > > I am trying to login to server and sending REST API call. for
> > testing
> > > > > > purpose I am setting Response Timeout = 10 in HTTP Request
> > Defaults.
> > > > > >
> > > > > > Summary Results Listener shows that Login Request Failed due to
> > Read
> > > > > > Timeout but I am not seeing any retries for that particular
> request
> > > > > before
> > > > > > being marked as failed and listener also shows as single request
> > > sent.
> > > > > >
> > > > > > *Muhammad Nasir*
> > > > > > Lead Quality Assurance Engineer
> > > > > > *folio3* Pvt. Ltd.
> > > > > > www.folio3.com
> > > > > > Cell: +92 332 257 9082
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > > > > [hidden email] <javascript:;>
> > > > > > > wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > > Why don't you answer my question ?
> > > > > > > What are you doing in your request and what are you expecting ?
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <
> > [hidden email]
> > > > > > <javascript:;>> wrote:
> > > > > > >
> > > > > > > > I have made all the changes and I am expecting failed
> requests
> > to
> > > > > > retry,
> > > > > > > > but unfortunately it is not working. I am also not seeing any
> > log
> > > > > trace
> > > > > > > for
> > > > > > > > this as well.
> > > > > > > >
> > > > > > > >
> > > > > > > > *Muhammad Nasir*
> > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > www.folio3.com
> > > > > > > > Cell: +92 332 257 9082
> > > > > > > >
> > > > > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > > How do you think retry work ?
> > > > > > > > > Do you expect it to retry successful requests ? Any failed
> > > call ?
> > > > > > > > >
> > > > > > > > > That's not the case.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > See:
> > > > > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > > > > reference.html#HTTP_Request
> > > > > > > > >
> > > > > > > > > *Retry handling*
> > > > > > > > > For HttpClient4 the retry count has been set to 0, meaning
> no
> > > > retry
> > > > > > is
> > > > > > > > > attempted. Note that the Java implementation appears to
> > retry 1
> > > > > time.
> > > > > > > The
> > > > > > > > > retry count can be overridden by setting the relevant
> JMeter
> > > > > > property,
> > > > > > > > for
> > > > > > > > > example:
> > > > > > > > >
> > > > > > > > > httpclient4.retrycount=3
> > > > > > > > >
> > > > > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > > > > >
> > > > > > > > > And also:
> > > > > > > > > http://jmeter.apache.org/usermanual/properties_
> > reference.html
> > > > > > > > >
> > > > > > > > > httpclient4.retrycount:
> > > > > > > > > Number of retries to attempt. Retry will be done on
> > Idempotent
> > > > Http
> > > > > > > > Methods
> > > > > > > > > by default. If you want to retry for all methods, see
> > property
> > > > > > > > > httpclient4.request_sent_retry_enabled
> > > > > > > > > Defaults to: 0
> > > > > > > > >
> > > > > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > > > > Set this property to true if it's OK to retry requests that
> > > have
> > > > > been
> > > > > > > > sent.
> > > > > > > > > This mean that both Idempotent and non Idempotent requests
> > will
> > > > be
> > > > > > > > retried.
> > > > > > > > > This should usually be false, but it can be useful when
> > testing
> > > > > > against
> > > > > > > > > some Load Balancers like Amazon ELB.
> > > > > > > > > Defaults to: false
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> > > > [hidden email]
> > > > > > <javascript:;>>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Thanks for your feedback Philippe, but it does not work.
> > > > > Jmeter.log
> > > > > > > is
> > > > > > > > > > uploaded at
> > > > > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > > > > >
> > > > > > > > > > I made following entry in log4j2.xml and restarted
> JMeter.
> > > > > > > > > > <Logger name="org.apache.http.impl.execchain.RetryExec"
> > > > > > level="info"
> > > > > > > > />
> > > > > > > > > >
> > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > www.folio3.com
> > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > >
> > > > > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > > > > [hidden email] <javascript:;>> wrote:
> > > > > > > > > >
> > > > > > > > > > > Hello,
> > > > > > > > > > > Set this logger to Info:
> > > > > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > > > > >
> > > > > > > > > > > It can be done in log4j2.xml
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > >
> > > > > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > > > > [hidden email] <javascript:;>>
> > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Hello,
> > > > > > > > > > > >
> > > > > > > > > > > > Is there a way to log HTTP sampler retry in JMeter
> > logs?
> > > > > > > Although I
> > > > > > > > > am
> > > > > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> > > > o.a.j.p.h.s.HTTPHC4Impl:
> > > > > > HTTP
> > > > > > > > > > request
> > > > > > > > > > > > retry count = 2" but not sure whether it's actually
> > > working
> > > > > or
> > > > > > > not,
> > > > > > > > > > > because
> > > > > > > > > > > > total number of requests are not showing retries.
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks,
> > > > > > > > > > > > Nasir
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Cordialement.
> > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > > Ubik-Ingénierie
> > > > > > > > > > >
> > > > > > > > > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > > > > > > > > >
> > > > > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/
> > > ubikloadpack>
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Cordialement.
> > > > > > > > > Philippe Mouawad.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Cordialement.
> > > > > > > Philippe Mouawad.
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cordialement.
> > > > > Philippe Mouawad.
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
pmd
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

pmd
What makes you think they are not working ?

Changing them has no effect in your case because retry will not be done
anyway.
Retry is done when request is not successfully sent and some exception
occurs.
Here if you are trying to retry send on Read Timeout, it will not work.

On Thu, Nov 2, 2017 at 3:08 PM, Muhammad Nasir <[hidden email]> wrote:

> What I am trying to explain is that these changes are not working. I am
> sharing my jmeter.properties file, Is there anything that I missed?
>
> https://pastebin.com/6SXfL3Hf
>
> Thanks for your feedback
>
> *Muhammad Nasir*
> Lead Quality Assurance Engineer
> *folio3* Pvt. Ltd.
> www.folio3.com
> Cell: +92 332 257 9082
>
> On Thu, Nov 2, 2017 at 6:57 PM, Philippe Mouawad <
> [hidden email]
> > wrote:
>
> > Hello,
> > As I wrote:
> >
> > => Retry is not done if request was sent, you're in this case
> >
> > Regarding logging, I gave you the new HTTPClient class, for current
> jmeter
> > it's:
> >
> >    - org.apache.http.impl.client.DefaultRequestDirector
> >
> > Regards
> >
> >
> > On Thu, Nov 2, 2017 at 2:47 PM, Muhammad Nasir <[hidden email]>
> wrote:
> >
> > > I have already configured it to true in JMeter.properties file and
> > > configured all other relevant settings.
> > > https://pastebin.com/6SXfL3Hf
> > >
> > > Am I making any mistake here? Also is there a way to log all these
> trying
> > > to connect and retry attempts in logs?
> > >
> > >
> > > *Muhammad Nasir*
> > > Lead Quality Assurance Engineer
> > > *folio3* Pvt. Ltd.
> > > www.folio3.com
> > > Cell: +92 332 257 9082
> > >
> > > On Thu, Nov 2, 2017 at 6:38 PM, Philippe Mouawad <
> > > [hidden email]
> > > > wrote:
> > >
> > > > So:
> > > >
> > > > 1) POST is not idempotent, by default no retry will be done unless
> you
> > > set
> > > > httpclient4.request_sent_retry_enabled
> > > > 2) Retry is not done if request was sent, so if you're getting
> response
> > > > timeout, you're in this case
> > > >
> > > >
> > > >
> > > > On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <[hidden email]>
> > > wrote:
> > > >
> > > > > I am using *httpclient4 *with *POST *method.
> > > > > Properties file is uploaded at https://pastebin.com/6SXfL3Hf
> > > > >
> > > > > *Muhammad Nasir*
> > > > > Lead Quality Assurance Engineer
> > > > > *folio3* Pvt. Ltd.
> > > > > www.folio3.com
> > > > > Cell: +92 332 257 9082
> > > > >
> > > > > On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> > > > > [hidden email]
> > > > > > wrote:
> > > > >
> > > > > > What http methods are you using and what are the values of the
> > > > properties
> > > > > > ?
> > > > > >
> > > > > >
> > > > > > On Thursday, November 2, 2017, Muhammad Nasir <[hidden email]
> >
> > > > wrote:
> > > > > >
> > > > > > > I am trying to login to server and sending REST API call. for
> > > testing
> > > > > > > purpose I am setting Response Timeout = 10 in HTTP Request
> > > Defaults.
> > > > > > >
> > > > > > > Summary Results Listener shows that Login Request Failed due to
> > > Read
> > > > > > > Timeout but I am not seeing any retries for that particular
> > request
> > > > > > before
> > > > > > > being marked as failed and listener also shows as single
> request
> > > > sent.
> > > > > > >
> > > > > > > *Muhammad Nasir*
> > > > > > > Lead Quality Assurance Engineer
> > > > > > > *folio3* Pvt. Ltd.
> > > > > > > www.folio3.com
> > > > > > > Cell: +92 332 257 9082
> > > > > > >
> > > > > > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > > > > > [hidden email] <javascript:;>
> > > > > > > > wrote:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > > Why don't you answer my question ?
> > > > > > > > What are you doing in your request and what are you
> expecting ?
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <
> > > [hidden email]
> > > > > > > <javascript:;>> wrote:
> > > > > > > >
> > > > > > > > > I have made all the changes and I am expecting failed
> > requests
> > > to
> > > > > > > retry,
> > > > > > > > > but unfortunately it is not working. I am also not seeing
> any
> > > log
> > > > > > trace
> > > > > > > > for
> > > > > > > > > this as well.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > *Muhammad Nasir*
> > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > www.folio3.com
> > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > >
> > > > > > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Hello,
> > > > > > > > > > How do you think retry work ?
> > > > > > > > > > Do you expect it to retry successful requests ? Any
> failed
> > > > call ?
> > > > > > > > > >
> > > > > > > > > > That's not the case.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > See:
> > > > > > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > > > > > reference.html#HTTP_Request
> > > > > > > > > >
> > > > > > > > > > *Retry handling*
> > > > > > > > > > For HttpClient4 the retry count has been set to 0,
> meaning
> > no
> > > > > retry
> > > > > > > is
> > > > > > > > > > attempted. Note that the Java implementation appears to
> > > retry 1
> > > > > > time.
> > > > > > > > The
> > > > > > > > > > retry count can be overridden by setting the relevant
> > JMeter
> > > > > > > property,
> > > > > > > > > for
> > > > > > > > > > example:
> > > > > > > > > >
> > > > > > > > > > httpclient4.retrycount=3
> > > > > > > > > >
> > > > > > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > > > > > >
> > > > > > > > > > And also:
> > > > > > > > > > http://jmeter.apache.org/usermanual/properties_
> > > reference.html
> > > > > > > > > >
> > > > > > > > > > httpclient4.retrycount:
> > > > > > > > > > Number of retries to attempt. Retry will be done on
> > > Idempotent
> > > > > Http
> > > > > > > > > Methods
> > > > > > > > > > by default. If you want to retry for all methods, see
> > > property
> > > > > > > > > > httpclient4.request_sent_retry_enabled
> > > > > > > > > > Defaults to: 0
> > > > > > > > > >
> > > > > > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > > > > > Set this property to true if it's OK to retry requests
> that
> > > > have
> > > > > > been
> > > > > > > > > sent.
> > > > > > > > > > This mean that both Idempotent and non Idempotent
> requests
> > > will
> > > > > be
> > > > > > > > > retried.
> > > > > > > > > > This should usually be false, but it can be useful when
> > > testing
> > > > > > > against
> > > > > > > > > > some Load Balancers like Amazon ELB.
> > > > > > > > > > Defaults to: false
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> > > > > [hidden email]
> > > > > > > <javascript:;>>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Thanks for your feedback Philippe, but it does not
> work.
> > > > > > Jmeter.log
> > > > > > > > is
> > > > > > > > > > > uploaded at
> > > > > > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > > > > > >
> > > > > > > > > > > I made following entry in log4j2.xml and restarted
> > JMeter.
> > > > > > > > > > > <Logger name="org.apache.http.impl.
> execchain.RetryExec"
> > > > > > > level="info"
> > > > > > > > > />
> > > > > > > > > > >
> > > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > > www.folio3.com
> > > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > > > > > [hidden email] <javascript:;>> wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Hello,
> > > > > > > > > > > > Set this logger to Info:
> > > > > > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > > > > > >
> > > > > > > > > > > > It can be done in log4j2.xml
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > >
> > > > > > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > > > > > [hidden email] <javascript:;>>
> > > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Hello,
> > > > > > > > > > > > >
> > > > > > > > > > > > > Is there a way to log HTTP sampler retry in JMeter
> > > logs?
> > > > > > > > Although I
> > > > > > > > > > am
> > > > > > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> > > > > o.a.j.p.h.s.HTTPHC4Impl:
> > > > > > > HTTP
> > > > > > > > > > > request
> > > > > > > > > > > > > retry count = 2" but not sure whether it's actually
> > > > working
> > > > > > or
> > > > > > > > not,
> > > > > > > > > > > > because
> > > > > > > > > > > > > total number of requests are not showing retries.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > Nasir
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Cordialement.
> > > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > > > Ubik-Ingénierie
> > > > > > > > > > > >
> > > > > > > > > > > > UBIK LOAD PACK Web Site <
> http://www.ubikloadpack.com/>
> > > > > > > > > > > >
> > > > > > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/
> > > > ubikloadpack>
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Cordialement.
> > > > > > > > > > Philippe Mouawad.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Cordialement.
> > > > > > > > Philippe Mouawad.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Cordialement.
> > > > > > Philippe Mouawad.
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > > >
> > >
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>



--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
okay got it. but then how can I simulate retry on request timeout scenario?

Like I have a client app which has request timeout set to 30 seconds, and
then make 2 retries before failing that particular request. So I am trying
to simulate the same with JMeter. Can you please guide me how can i achieve
this?

What makes me think that its not working? I am not seeing multiple requests
count on listener plus nothing is shown in logs as well.

*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 7:20 PM, Philippe Mouawad <[hidden email]
> wrote:

> What makes you think they are not working ?
>
> Changing them has no effect in your case because retry will not be done
> anyway.
> Retry is done when request is not successfully sent and some exception
> occurs.
> Here if you are trying to retry send on Read Timeout, it will not work.
>
> On Thu, Nov 2, 2017 at 3:08 PM, Muhammad Nasir <[hidden email]> wrote:
>
> > What I am trying to explain is that these changes are not working. I am
> > sharing my jmeter.properties file, Is there anything that I missed?
> >
> > https://pastebin.com/6SXfL3Hf
> >
> > Thanks for your feedback
> >
> > *Muhammad Nasir*
> > Lead Quality Assurance Engineer
> > *folio3* Pvt. Ltd.
> > www.folio3.com
> > Cell: +92 332 257 9082
> >
> > On Thu, Nov 2, 2017 at 6:57 PM, Philippe Mouawad <
> > [hidden email]
> > > wrote:
> >
> > > Hello,
> > > As I wrote:
> > >
> > > => Retry is not done if request was sent, you're in this case
> > >
> > > Regarding logging, I gave you the new HTTPClient class, for current
> > jmeter
> > > it's:
> > >
> > >    - org.apache.http.impl.client.DefaultRequestDirector
> > >
> > > Regards
> > >
> > >
> > > On Thu, Nov 2, 2017 at 2:47 PM, Muhammad Nasir <[hidden email]>
> > wrote:
> > >
> > > > I have already configured it to true in JMeter.properties file and
> > > > configured all other relevant settings.
> > > > https://pastebin.com/6SXfL3Hf
> > > >
> > > > Am I making any mistake here? Also is there a way to log all these
> > trying
> > > > to connect and retry attempts in logs?
> > > >
> > > >
> > > > *Muhammad Nasir*
> > > > Lead Quality Assurance Engineer
> > > > *folio3* Pvt. Ltd.
> > > > www.folio3.com
> > > > Cell: +92 332 257 9082
> > > >
> > > > On Thu, Nov 2, 2017 at 6:38 PM, Philippe Mouawad <
> > > > [hidden email]
> > > > > wrote:
> > > >
> > > > > So:
> > > > >
> > > > > 1) POST is not idempotent, by default no retry will be done unless
> > you
> > > > set
> > > > > httpclient4.request_sent_retry_enabled
> > > > > 2) Retry is not done if request was sent, so if you're getting
> > response
> > > > > timeout, you're in this case
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <[hidden email]>
> > > > wrote:
> > > > >
> > > > > > I am using *httpclient4 *with *POST *method.
> > > > > > Properties file is uploaded at https://pastebin.com/6SXfL3Hf
> > > > > >
> > > > > > *Muhammad Nasir*
> > > > > > Lead Quality Assurance Engineer
> > > > > > *folio3* Pvt. Ltd.
> > > > > > www.folio3.com
> > > > > > Cell: +92 332 257 9082
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> > > > > > [hidden email]
> > > > > > > wrote:
> > > > > >
> > > > > > > What http methods are you using and what are the values of the
> > > > > properties
> > > > > > > ?
> > > > > > >
> > > > > > >
> > > > > > > On Thursday, November 2, 2017, Muhammad Nasir <
> [hidden email]
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > I am trying to login to server and sending REST API call. for
> > > > testing
> > > > > > > > purpose I am setting Response Timeout = 10 in HTTP Request
> > > > Defaults.
> > > > > > > >
> > > > > > > > Summary Results Listener shows that Login Request Failed due
> to
> > > > Read
> > > > > > > > Timeout but I am not seeing any retries for that particular
> > > request
> > > > > > > before
> > > > > > > > being marked as failed and listener also shows as single
> > request
> > > > > sent.
> > > > > > > >
> > > > > > > > *Muhammad Nasir*
> > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > www.folio3.com
> > > > > > > > Cell: +92 332 257 9082
> > > > > > > >
> > > > > > > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > > Why don't you answer my question ?
> > > > > > > > > What are you doing in your request and what are you
> > expecting ?
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <
> > > > [hidden email]
> > > > > > > > <javascript:;>> wrote:
> > > > > > > > >
> > > > > > > > > > I have made all the changes and I am expecting failed
> > > requests
> > > > to
> > > > > > > > retry,
> > > > > > > > > > but unfortunately it is not working. I am also not seeing
> > any
> > > > log
> > > > > > > trace
> > > > > > > > > for
> > > > > > > > > > this as well.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > www.folio3.com
> > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > >
> > > > > > > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Hello,
> > > > > > > > > > > How do you think retry work ?
> > > > > > > > > > > Do you expect it to retry successful requests ? Any
> > failed
> > > > > call ?
> > > > > > > > > > >
> > > > > > > > > > > That's not the case.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > See:
> > > > > > > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > > > > > > reference.html#HTTP_Request
> > > > > > > > > > >
> > > > > > > > > > > *Retry handling*
> > > > > > > > > > > For HttpClient4 the retry count has been set to 0,
> > meaning
> > > no
> > > > > > retry
> > > > > > > > is
> > > > > > > > > > > attempted. Note that the Java implementation appears to
> > > > retry 1
> > > > > > > time.
> > > > > > > > > The
> > > > > > > > > > > retry count can be overridden by setting the relevant
> > > JMeter
> > > > > > > > property,
> > > > > > > > > > for
> > > > > > > > > > > example:
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.retrycount=3
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > > > > > > >
> > > > > > > > > > > And also:
> > > > > > > > > > > http://jmeter.apache.org/usermanual/properties_
> > > > reference.html
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.retrycount:
> > > > > > > > > > > Number of retries to attempt. Retry will be done on
> > > > Idempotent
> > > > > > Http
> > > > > > > > > > Methods
> > > > > > > > > > > by default. If you want to retry for all methods, see
> > > > property
> > > > > > > > > > > httpclient4.request_sent_retry_enabled
> > > > > > > > > > > Defaults to: 0
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > > > > > > Set this property to true if it's OK to retry requests
> > that
> > > > > have
> > > > > > > been
> > > > > > > > > > sent.
> > > > > > > > > > > This mean that both Idempotent and non Idempotent
> > requests
> > > > will
> > > > > > be
> > > > > > > > > > retried.
> > > > > > > > > > > This should usually be false, but it can be useful when
> > > > testing
> > > > > > > > against
> > > > > > > > > > > some Load Balancers like Amazon ELB.
> > > > > > > > > > > Defaults to: false
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> > > > > > [hidden email]
> > > > > > > > <javascript:;>>
> > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Thanks for your feedback Philippe, but it does not
> > work.
> > > > > > > Jmeter.log
> > > > > > > > > is
> > > > > > > > > > > > uploaded at
> > > > > > > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > > > > > > >
> > > > > > > > > > > > I made following entry in log4j2.xml and restarted
> > > JMeter.
> > > > > > > > > > > > <Logger name="org.apache.http.impl.
> > execchain.RetryExec"
> > > > > > > > level="info"
> > > > > > > > > > />
> > > > > > > > > > > >
> > > > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > > > www.folio3.com
> > > > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > > > >
> > > > > > > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > > > > > > [hidden email] <javascript:;>> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > Set this logger to Info:
> > > > > > > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > > > > > > >
> > > > > > > > > > > > > It can be done in log4j2.xml
> > > > > > > > > > > > >
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > > > > > > [hidden email] <javascript:;>>
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Is there a way to log HTTP sampler retry in
> JMeter
> > > > logs?
> > > > > > > > > Although I
> > > > > > > > > > > am
> > > > > > > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> > > > > > o.a.j.p.h.s.HTTPHC4Impl:
> > > > > > > > HTTP
> > > > > > > > > > > > request
> > > > > > > > > > > > > > retry count = 2" but not sure whether it's
> actually
> > > > > working
> > > > > > > or
> > > > > > > > > not,
> > > > > > > > > > > > > because
> > > > > > > > > > > > > > total number of requests are not showing retries.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > Nasir
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > --
> > > > > > > > > > > > > Cordialement.
> > > > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > > > > Ubik-Ingénierie
> > > > > > > > > > > > >
> > > > > > > > > > > > > UBIK LOAD PACK Web Site <
> > http://www.ubikloadpack.com/>
> > > > > > > > > > > > >
> > > > > > > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/
> > > > > ubikloadpack>
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Cordialement.
> > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Cordialement.
> > > > > > > > > Philippe Mouawad.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Cordialement.
> > > > > > > Philippe Mouawad.
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cordialement.
> > > > > Philippe Mouawad.
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

ra0077
Hi,

In JMeter script, you can use Logic Controller like If Controller

Test the response of the timeout request and execute another request if the
response is KO

Antonio

2017-11-02 15:27 GMT+01:00 Muhammad Nasir <[hidden email]>:

> okay got it. but then how can I simulate retry on request timeout scenario?
>
> Like I have a client app which has request timeout set to 30 seconds, and
> then make 2 retries before failing that particular request. So I am trying
> to simulate the same with JMeter. Can you please guide me how can i achieve
> this?
>
> What makes me think that its not working? I am not seeing multiple requests
> count on listener plus nothing is shown in logs as well.
>
> *Muhammad Nasir*
> Lead Quality Assurance Engineer
> *folio3* Pvt. Ltd.
> www.folio3.com
> Cell: +92 332 257 9082
>
> On Thu, Nov 2, 2017 at 7:20 PM, Philippe Mouawad <
> [hidden email]
> > wrote:
>
> > What makes you think they are not working ?
> >
> > Changing them has no effect in your case because retry will not be done
> > anyway.
> > Retry is done when request is not successfully sent and some exception
> > occurs.
> > Here if you are trying to retry send on Read Timeout, it will not work.
> >
> > On Thu, Nov 2, 2017 at 3:08 PM, Muhammad Nasir <[hidden email]>
> wrote:
> >
> > > What I am trying to explain is that these changes are not working. I am
> > > sharing my jmeter.properties file, Is there anything that I missed?
> > >
> > > https://pastebin.com/6SXfL3Hf
> > >
> > > Thanks for your feedback
> > >
> > > *Muhammad Nasir*
> > > Lead Quality Assurance Engineer
> > > *folio3* Pvt. Ltd.
> > > www.folio3.com
> > > Cell: +92 332 257 9082
> > >
> > > On Thu, Nov 2, 2017 at 6:57 PM, Philippe Mouawad <
> > > [hidden email]
> > > > wrote:
> > >
> > > > Hello,
> > > > As I wrote:
> > > >
> > > > => Retry is not done if request was sent, you're in this case
> > > >
> > > > Regarding logging, I gave you the new HTTPClient class, for current
> > > jmeter
> > > > it's:
> > > >
> > > >    - org.apache.http.impl.client.DefaultRequestDirector
> > > >
> > > > Regards
> > > >
> > > >
> > > > On Thu, Nov 2, 2017 at 2:47 PM, Muhammad Nasir <[hidden email]>
> > > wrote:
> > > >
> > > > > I have already configured it to true in JMeter.properties file and
> > > > > configured all other relevant settings.
> > > > > https://pastebin.com/6SXfL3Hf
> > > > >
> > > > > Am I making any mistake here? Also is there a way to log all these
> > > trying
> > > > > to connect and retry attempts in logs?
> > > > >
> > > > >
> > > > > *Muhammad Nasir*
> > > > > Lead Quality Assurance Engineer
> > > > > *folio3* Pvt. Ltd.
> > > > > www.folio3.com
> > > > > Cell: +92 332 257 9082
> > > > >
> > > > > On Thu, Nov 2, 2017 at 6:38 PM, Philippe Mouawad <
> > > > > [hidden email]
> > > > > > wrote:
> > > > >
> > > > > > So:
> > > > > >
> > > > > > 1) POST is not idempotent, by default no retry will be done
> unless
> > > you
> > > > > set
> > > > > > httpclient4.request_sent_retry_enabled
> > > > > > 2) Retry is not done if request was sent, so if you're getting
> > > response
> > > > > > timeout, you're in this case
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <
> [hidden email]>
> > > > > wrote:
> > > > > >
> > > > > > > I am using *httpclient4 *with *POST *method.
> > > > > > > Properties file is uploaded at https://pastebin.com/6SXfL3Hf
> > > > > > >
> > > > > > > *Muhammad Nasir*
> > > > > > > Lead Quality Assurance Engineer
> > > > > > > *folio3* Pvt. Ltd.
> > > > > > > www.folio3.com
> > > > > > > Cell: +92 332 257 9082
> > > > > > >
> > > > > > > On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> > > > > > > [hidden email]
> > > > > > > > wrote:
> > > > > > >
> > > > > > > > What http methods are you using and what are the values of
> the
> > > > > > properties
> > > > > > > > ?
> > > > > > > >
> > > > > > > >
> > > > > > > > On Thursday, November 2, 2017, Muhammad Nasir <
> > [hidden email]
> > > >
> > > > > > wrote:
> > > > > > > >
> > > > > > > > > I am trying to login to server and sending REST API call.
> for
> > > > > testing
> > > > > > > > > purpose I am setting Response Timeout = 10 in HTTP Request
> > > > > Defaults.
> > > > > > > > >
> > > > > > > > > Summary Results Listener shows that Login Request Failed
> due
> > to
> > > > > Read
> > > > > > > > > Timeout but I am not seeing any retries for that particular
> > > > request
> > > > > > > > before
> > > > > > > > > being marked as failed and listener also shows as single
> > > request
> > > > > > sent.
> > > > > > > > >
> > > > > > > > > *Muhammad Nasir*
> > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > www.folio3.com
> > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > >
> > > > > > > > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Hello,
> > > > > > > > > > Why don't you answer my question ?
> > > > > > > > > > What are you doing in your request and what are you
> > > expecting ?
> > > > > > > > > >
> > > > > > > > > > Thanks
> > > > > > > > > >
> > > > > > > > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <
> > > > > [hidden email]
> > > > > > > > > <javascript:;>> wrote:
> > > > > > > > > >
> > > > > > > > > > > I have made all the changes and I am expecting failed
> > > > requests
> > > > > to
> > > > > > > > > retry,
> > > > > > > > > > > but unfortunately it is not working. I am also not
> seeing
> > > any
> > > > > log
> > > > > > > > trace
> > > > > > > > > > for
> > > > > > > > > > > this as well.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > > www.folio3.com
> > > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Hello,
> > > > > > > > > > > > How do you think retry work ?
> > > > > > > > > > > > Do you expect it to retry successful requests ? Any
> > > failed
> > > > > > call ?
> > > > > > > > > > > >
> > > > > > > > > > > > That's not the case.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > See:
> > > > > > > > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > > > > > > > reference.html#HTTP_Request
> > > > > > > > > > > >
> > > > > > > > > > > > *Retry handling*
> > > > > > > > > > > > For HttpClient4 the retry count has been set to 0,
> > > meaning
> > > > no
> > > > > > > retry
> > > > > > > > > is
> > > > > > > > > > > > attempted. Note that the Java implementation appears
> to
> > > > > retry 1
> > > > > > > > time.
> > > > > > > > > > The
> > > > > > > > > > > > retry count can be overridden by setting the relevant
> > > > JMeter
> > > > > > > > > property,
> > > > > > > > > > > for
> > > > > > > > > > > > example:
> > > > > > > > > > > >
> > > > > > > > > > > > httpclient4.retrycount=3
> > > > > > > > > > > >
> > > > > > > > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > > > > > > > >
> > > > > > > > > > > > And also:
> > > > > > > > > > > > http://jmeter.apache.org/usermanual/properties_
> > > > > reference.html
> > > > > > > > > > > >
> > > > > > > > > > > > httpclient4.retrycount:
> > > > > > > > > > > > Number of retries to attempt. Retry will be done on
> > > > > Idempotent
> > > > > > > Http
> > > > > > > > > > > Methods
> > > > > > > > > > > > by default. If you want to retry for all methods, see
> > > > > property
> > > > > > > > > > > > httpclient4.request_sent_retry_enabled
> > > > > > > > > > > > Defaults to: 0
> > > > > > > > > > > >
> > > > > > > > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > > > > > > > Set this property to true if it's OK to retry
> requests
> > > that
> > > > > > have
> > > > > > > > been
> > > > > > > > > > > sent.
> > > > > > > > > > > > This mean that both Idempotent and non Idempotent
> > > requests
> > > > > will
> > > > > > > be
> > > > > > > > > > > retried.
> > > > > > > > > > > > This should usually be false, but it can be useful
> when
> > > > > testing
> > > > > > > > > against
> > > > > > > > > > > > some Load Balancers like Amazon ELB.
> > > > > > > > > > > > Defaults to: false
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> > > > > > > [hidden email]
> > > > > > > > > <javascript:;>>
> > > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Thanks for your feedback Philippe, but it does not
> > > work.
> > > > > > > > Jmeter.log
> > > > > > > > > > is
> > > > > > > > > > > > > uploaded at
> > > > > > > > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > > > > > > > >
> > > > > > > > > > > > > I made following entry in log4j2.xml and restarted
> > > > JMeter.
> > > > > > > > > > > > > <Logger name="org.apache.http.impl.
> > > execchain.RetryExec"
> > > > > > > > > level="info"
> > > > > > > > > > > />
> > > > > > > > > > > > >
> > > > > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > > > > www.folio3.com
> > > > > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > > > > > > > [hidden email] <javascript:;>>
> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > Set this logger to Info:
> > > > > > > > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > It can be done in log4j2.xml
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Regards
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > > > > > > > [hidden email] <javascript:;>>
> > > > > > > > > > > > > wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Is there a way to log HTTP sampler retry in
> > JMeter
> > > > > logs?
> > > > > > > > > > Although I
> > > > > > > > > > > > am
> > > > > > > > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> > > > > > > o.a.j.p.h.s.HTTPHC4Impl:
> > > > > > > > > HTTP
> > > > > > > > > > > > > request
> > > > > > > > > > > > > > > retry count = 2" but not sure whether it's
> > actually
> > > > > > working
> > > > > > > > or
> > > > > > > > > > not,
> > > > > > > > > > > > > > because
> > > > > > > > > > > > > > > total number of requests are not showing
> retries.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > > Nasir
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > > Cordialement.
> > > > > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > > > > > Ubik-Ingénierie
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > UBIK LOAD PACK Web Site <
> > > http://www.ubikloadpack.com/>
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/
> > > > > > ubikloadpack>
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Cordialement.
> > > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Cordialement.
> > > > > > > > > > Philippe Mouawad.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Cordialement.
> > > > > > > > Philippe Mouawad.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Cordialement.
> > > > > > Philippe Mouawad.
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > > >
> > >
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with HTTP Sampler Retry - Loggin

Muhammad Nasir
In reply to this post by pmd
Don't you think retry should also work on Read Timeout as well?

*Muhammad Nasir*
Lead Quality Assurance Engineer
*folio3* Pvt. Ltd.
www.folio3.com
Cell: +92 332 257 9082

On Thu, Nov 2, 2017 at 7:20 PM, Philippe Mouawad <[hidden email]
> wrote:

> What makes you think they are not working ?
>
> Changing them has no effect in your case because retry will not be done
> anyway.
> Retry is done when request is not successfully sent and some exception
> occurs.
> Here if you are trying to retry send on Read Timeout, it will not work.
>
> On Thu, Nov 2, 2017 at 3:08 PM, Muhammad Nasir <[hidden email]> wrote:
>
> > What I am trying to explain is that these changes are not working. I am
> > sharing my jmeter.properties file, Is there anything that I missed?
> >
> > https://pastebin.com/6SXfL3Hf
> >
> > Thanks for your feedback
> >
> > *Muhammad Nasir*
> > Lead Quality Assurance Engineer
> > *folio3* Pvt. Ltd.
> > www.folio3.com
> > Cell: +92 332 257 9082
> >
> > On Thu, Nov 2, 2017 at 6:57 PM, Philippe Mouawad <
> > [hidden email]
> > > wrote:
> >
> > > Hello,
> > > As I wrote:
> > >
> > > => Retry is not done if request was sent, you're in this case
> > >
> > > Regarding logging, I gave you the new HTTPClient class, for current
> > jmeter
> > > it's:
> > >
> > >    - org.apache.http.impl.client.DefaultRequestDirector
> > >
> > > Regards
> > >
> > >
> > > On Thu, Nov 2, 2017 at 2:47 PM, Muhammad Nasir <[hidden email]>
> > wrote:
> > >
> > > > I have already configured it to true in JMeter.properties file and
> > > > configured all other relevant settings.
> > > > https://pastebin.com/6SXfL3Hf
> > > >
> > > > Am I making any mistake here? Also is there a way to log all these
> > trying
> > > > to connect and retry attempts in logs?
> > > >
> > > >
> > > > *Muhammad Nasir*
> > > > Lead Quality Assurance Engineer
> > > > *folio3* Pvt. Ltd.
> > > > www.folio3.com
> > > > Cell: +92 332 257 9082
> > > >
> > > > On Thu, Nov 2, 2017 at 6:38 PM, Philippe Mouawad <
> > > > [hidden email]
> > > > > wrote:
> > > >
> > > > > So:
> > > > >
> > > > > 1) POST is not idempotent, by default no retry will be done unless
> > you
> > > > set
> > > > > httpclient4.request_sent_retry_enabled
> > > > > 2) Retry is not done if request was sent, so if you're getting
> > response
> > > > > timeout, you're in this case
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Nov 2, 2017 at 1:42 PM, Muhammad Nasir <[hidden email]>
> > > > wrote:
> > > > >
> > > > > > I am using *httpclient4 *with *POST *method.
> > > > > > Properties file is uploaded at https://pastebin.com/6SXfL3Hf
> > > > > >
> > > > > > *Muhammad Nasir*
> > > > > > Lead Quality Assurance Engineer
> > > > > > *folio3* Pvt. Ltd.
> > > > > > www.folio3.com
> > > > > > Cell: +92 332 257 9082
> > > > > >
> > > > > > On Thu, Nov 2, 2017 at 5:35 PM, Philippe Mouawad <
> > > > > > [hidden email]
> > > > > > > wrote:
> > > > > >
> > > > > > > What http methods are you using and what are the values of the
> > > > > properties
> > > > > > > ?
> > > > > > >
> > > > > > >
> > > > > > > On Thursday, November 2, 2017, Muhammad Nasir <
> [hidden email]
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > I am trying to login to server and sending REST API call. for
> > > > testing
> > > > > > > > purpose I am setting Response Timeout = 10 in HTTP Request
> > > > Defaults.
> > > > > > > >
> > > > > > > > Summary Results Listener shows that Login Request Failed due
> to
> > > > Read
> > > > > > > > Timeout but I am not seeing any retries for that particular
> > > request
> > > > > > > before
> > > > > > > > being marked as failed and listener also shows as single
> > request
> > > > > sent.
> > > > > > > >
> > > > > > > > *Muhammad Nasir*
> > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > www.folio3.com
> > > > > > > > Cell: +92 332 257 9082
> > > > > > > >
> > > > > > > > On Thu, Nov 2, 2017 at 4:31 PM, Philippe Mouawad <
> > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > > Why don't you answer my question ?
> > > > > > > > > What are you doing in your request and what are you
> > expecting ?
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > On Thu, Nov 2, 2017 at 12:25 PM, Muhammad Nasir <
> > > > [hidden email]
> > > > > > > > <javascript:;>> wrote:
> > > > > > > > >
> > > > > > > > > > I have made all the changes and I am expecting failed
> > > requests
> > > > to
> > > > > > > > retry,
> > > > > > > > > > but unfortunately it is not working. I am also not seeing
> > any
> > > > log
> > > > > > > trace
> > > > > > > > > for
> > > > > > > > > > this as well.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > www.folio3.com
> > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > >
> > > > > > > > > > On Thu, Nov 2, 2017 at 3:59 PM, Philippe Mouawad <
> > > > > > > > > > [hidden email] <javascript:;>
> > > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Hello,
> > > > > > > > > > > How do you think retry work ?
> > > > > > > > > > > Do you expect it to retry successful requests ? Any
> > failed
> > > > > call ?
> > > > > > > > > > >
> > > > > > > > > > > That's not the case.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > See:
> > > > > > > > > > > http://jmeter.apache.org/usermanual/component_
> > > > > > > > > > reference.html#HTTP_Request
> > > > > > > > > > >
> > > > > > > > > > > *Retry handling*
> > > > > > > > > > > For HttpClient4 the retry count has been set to 0,
> > meaning
> > > no
> > > > > > retry
> > > > > > > > is
> > > > > > > > > > > attempted. Note that the Java implementation appears to
> > > > retry 1
> > > > > > > time.
> > > > > > > > > The
> > > > > > > > > > > retry count can be overridden by setting the relevant
> > > JMeter
> > > > > > > > property,
> > > > > > > > > > for
> > > > > > > > > > > example:
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.retrycount=3
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.request_sent_retry_enabled=true
> > > > > > > > > > >
> > > > > > > > > > > And also:
> > > > > > > > > > > http://jmeter.apache.org/usermanual/properties_
> > > > reference.html
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.retrycount:
> > > > > > > > > > > Number of retries to attempt. Retry will be done on
> > > > Idempotent
> > > > > > Http
> > > > > > > > > > Methods
> > > > > > > > > > > by default. If you want to retry for all methods, see
> > > > property
> > > > > > > > > > > httpclient4.request_sent_retry_enabled
> > > > > > > > > > > Defaults to: 0
> > > > > > > > > > >
> > > > > > > > > > > httpclient4.request_sent_retry_enabled:
> > > > > > > > > > > Set this property to true if it's OK to retry requests
> > that
> > > > > have
> > > > > > > been
> > > > > > > > > > sent.
> > > > > > > > > > > This mean that both Idempotent and non Idempotent
> > requests
> > > > will
> > > > > > be
> > > > > > > > > > retried.
> > > > > > > > > > > This should usually be false, but it can be useful when
> > > > testing
> > > > > > > > against
> > > > > > > > > > > some Load Balancers like Amazon ELB.
> > > > > > > > > > > Defaults to: false
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Nov 2, 2017 at 6:55 AM, Muhammad Nasir <
> > > > > > [hidden email]
> > > > > > > > <javascript:;>>
> > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Thanks for your feedback Philippe, but it does not
> > work.
> > > > > > > Jmeter.log
> > > > > > > > > is
> > > > > > > > > > > > uploaded at
> > > > > > > > > > > > https://pastebin.com/2Y9E4wCm
> > > > > > > > > > > >
> > > > > > > > > > > > I made following entry in log4j2.xml and restarted
> > > JMeter.
> > > > > > > > > > > > <Logger name="org.apache.http.impl.
> > execchain.RetryExec"
> > > > > > > > level="info"
> > > > > > > > > > />
> > > > > > > > > > > >
> > > > > > > > > > > > *Muhammad Nasir*
> > > > > > > > > > > > Lead Quality Assurance Engineer
> > > > > > > > > > > > *folio3* Pvt. Ltd.
> > > > > > > > > > > > www.folio3.com
> > > > > > > > > > > > Cell: +92 332 257 9082
> > > > > > > > > > > >
> > > > > > > > > > > > On Thu, Nov 2, 2017 at 1:01 AM, Philippe Mouawad <
> > > > > > > > > > > > [hidden email] <javascript:;>> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > Set this logger to Info:
> > > > > > > > > > > > > org.apache.http.impl.execchain.RetryExec
> > > > > > > > > > > > >
> > > > > > > > > > > > > It can be done in log4j2.xml
> > > > > > > > > > > > >
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Wed, Nov 1, 2017 at 1:04 PM, Muhammad Nasir <
> > > > > > > > [hidden email] <javascript:;>>
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Is there a way to log HTTP sampler retry in
> JMeter
> > > > logs?
> > > > > > > > > Although I
> > > > > > > > > > > am
> > > > > > > > > > > > > > seeing"2017-11-01 07:54:25,703 INFO
> > > > > > o.a.j.p.h.s.HTTPHC4Impl:
> > > > > > > > HTTP
> > > > > > > > > > > > request
> > > > > > > > > > > > > > retry count = 2" but not sure whether it's
> actually
> > > > > working
> > > > > > > or
> > > > > > > > > not,
> > > > > > > > > > > > > because
> > > > > > > > > > > > > > total number of requests are not showing retries.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > Nasir
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > --
> > > > > > > > > > > > > Cordialement.
> > > > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > > > > Ubik-Ingénierie
> > > > > > > > > > > > >
> > > > > > > > > > > > > UBIK LOAD PACK Web Site <
> > http://www.ubikloadpack.com/>
> > > > > > > > > > > > >
> > > > > > > > > > > > > UBIK LOAD PACK on TWITTER <https://twitter.com/
> > > > > ubikloadpack>
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Cordialement.
> > > > > > > > > > > Philippe Mouawad.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Cordialement.
> > > > > > > > > Philippe Mouawad.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Cordialement.
> > > > > > > Philippe Mouawad.
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cordialement.
> > > > > Philippe Mouawad.
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>