ERROR in opening page! Err:Maximum (20) redirects followed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ashok
Posts: 22
Joined: Mon Jul 21, 2014 8:07 am

ERROR in opening page! Err:Maximum (20) redirects followed

Post by ashok »

Hi All,

I want to monitor two Urls.

when i tried to execute check_curl.php exactly 24 hrs back, i got the output as Page OK.

But after some time iam getting the below error everytime

ERROR in opening page! Err:Maximum (20) redirects followed


Command used is :

[root@nagxi libexec]# /usr/bin/env http_proxy=http://x.x.x.x:80/ no_proxy=localhost,127.0.0.0/8 /usr/local/nagios/libexec/check_curl.php -T 90 -U http://www.xxxxx.in -a xxxx:xxx -F
ERROR in opening page! Err:Maximum (20) redirects followed
[root@nagxi libexec]#


The webpage was opening fine in web browser..

Please help me..

Thanks
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: ERROR in opening page! Err:Maximum (20) redirects follow

Post by tmcdonald »

When you open the page in a browser, does the page seem to flicker a bit before loading? That could indicate that the URL you are visiting is redirecting to another page before the page can be rendered. If that is the case and there is some Javascript code that stops the redirect, the curl command-line might not be able to account for it.

Also, the proxy might be doing some redirection of its own transparently. Do you use the proxy when connecting via your browser?
Former Nagios employee
ashok
Posts: 22
Joined: Mon Jul 21, 2014 8:07 am

Re: ERROR in opening page! Err:Maximum (20) redirects follow

Post by ashok »

Thanks for the reply.

Yes it flickers a bit..

yes i'm using proxy to open the page

can you please help me how to increase the redirects followed using check_curl.php
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: ERROR in opening page! Err:Maximum (20) redirects follow

Post by tmcdonald »

Would you mind PMing me the site address if possible? That way I could test other methods of connecting. The page may or may not be using Javascript to handle the redirect, but if it is curl will not be able to follow it.
Former Nagios employee
Locked