Monday, November 22, 2010

JMeter : IOException: Exceeded maximum number of redirects: 5

Using the JMeter proxy server to record and playback some logins to a site and got this error.

Mr. Google to the rescue and the trick is to modify the jmeter.properties file in the JMeter bin directory.


# Maximum redirects to follow in a single sequence (default 5)
httpsampler.max_redirects=20


Modify the above line in that file to increase the maximum from the default of 5. In my case, I found 20 to be adequate.

You need some kind of upper limit because otherwise the trace could just get stuck in a loop.

Note that you have to restart JMeter after making this change.

Enjoy!

5 comments:

sree said...

Excellent suggestion

Elangovan said...

Has it worked?. I tried this. But didnt work for me.

Anonymous said...

don't forget to uncomment if it is commented out

Anonymous said...

You need to close jmeter and to start it again to make jmeter to read jmeter.properties file again.

Anonymous said...

Perfect, exactly what I needed (default is 5)