Get “Too many redirects” error when trying to access Health Check
-
I installed Health Check to do some general performance troubleshooting based on an article recommendation. The plugin installed and activated normally, but when I click the ‘Troubleshoot’ link from the plugins page, I get the ‘Too many redirects’ error on any site page. I have to delete cookies which then allows me to login normally.
I have tried this several times with the same results. The plugin is now disabled, but I’d like to understand the problem and use the tool to better understand my site.
Thanks
-
This topic was modified 6 years, 10 months ago by
jblakely.
-
This topic was modified 6 years, 10 months ago by
-
Hiya,
That’s quite peculiar indeed, could you share a little about your setup so i can try to replicate this behavior?
If you use the plugin, the Debug tab has a copy paste button for sharing setup information for this purpose if you wouldn’t mind using it for that.
Hi Marius,
My site is running on a Bitnami instance at Amazon AWS, behind a load balancer that handles the HTTPS traffic.
The load balancer seems to cause some odd things, like most plugin updates timing out even though they successfully apply. Figuring this out is on my low priority list as it is more of an annoyance than a problem.
I do have a fair number of plugins installed, both active and inactive. My intent is to eventually delete any inactive plugins, but I don’t think the inactive ones are causing any problems.
The key thing I did not report in my original issue (because I didn’t understand how to use the plugin) was that the redirect errors were caused by the ‘Troubleshoot’ link of the Plugin. I was just now able to successfully use the ‘Health Check’ link, and the requested Debug output is below.
### WordPress ### Version: 4.9.6 Language: en_US Permalink structure: /%year%/%monthnum%/%day%/%postname%/ Is this site using HTTPS?: Yes Can anyone register on this site?: No Default comment status: closed Is this a multisite?: No User Count: 9 Communication with www.remarpro.com: www.remarpro.com is reachable Create loopback requests: The loopback request to your site failed, this may prevent WP_Cron from working, along with theme and plugin editors.<br>Error encountered: (0) cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received ### Active theme ### Name: Wiredrive Classic Version: 1.0.4 Author: Wiredrive, Drew Baker, Daniel Bondurant Author website: https://www.wiredrive.com Parent theme: Not a child theme Supported theme features: automatic-feed-links, post-thumbnails, menus, widgets, custom-background, custom-header ### Other themes (13) ### TDG Mobile (TDG-mobile): Version 1.0.4 by Wiredrive, Drew Baker, Daniel Bondurant Ari (ari): Version 1.2 by Elmastudio Clean Retina (clean-retina): Version 3.0.3 by Theme Horse Expositio Theme (expositio): Version 1.0.0 by Wpshower iRibbon (iribbon): Version 2.14 by CyberChimps Responsive (responsive): Version 3.11 by CyberChimps.com Smooci 2 (smooci-2): Version 2.1.3 by Marius-Cristian Donea Twenty Eleven (twentyeleven): Version 2.7 by the WordPress team Twenty Fifteen (twentyfifteen): Version 1.9 by the WordPress team Twenty Ten (twentyten): Version 2.4 by the WordPress team Twenty Twelve (twentytwelve): Version 2.4 by the WordPress team Black and White (wordpress-theme-black-white): Version 2.1 by H&H Color Lab wp_appTouch (wp_apptouch): Version 0.1 by Gino Cote ### Must Use Plugins (1) ### Health Check Disable Plugins: Version 1.3 ### Active Plugins (22) ### Barcode QRcode Generator: Version 1.0.1 by Hiroaki Miyashita Broken Link Checker: Version 1.11.5 by Janis Elsts, Vladimir Prelovac Code Embed: Version 2.2.2 by David Artiss Contact Form 7: Version 5.0.1 by Takayuki Miyoshi Contact Form DB: Version 2.10.26 by Michael Simpson Easy Table: Version 1.0 by Takien Enable Media Replace: Version 3.2.5 by ShortPixel Google Apps Login: Version 3.2 by Dan Lester Google Authenticator: Version 0.48 by Henrik Schack Health Check: Version 1.0.1 by The www.remarpro.com community Hustle: Version 6.0.2 by WPMU DEV Listo: Version 1.2.1 by Takayuki Miyoshi Really Simple CAPTCHA: Version 2.0.1 by Takayuki Miyoshi Reveal IDs: Version 1.5.2 by Oliver Schl?be Shopp: Version 1.3.13 by Ingenesis Limited Simple Maintenance Mode: Version 1.05 by Jeff Bullins SSL Insecure Content Fixer: Version 2.5.0 by WebAware UpdraftPlus - Backup/Restore: Version 1.14.7 by UpdraftPlus.Com, DavidAnderson WP-Invoice: Version 4.1.10 by Usability Dynamics, Inc. WP Donate: Version 1.7 by Ketan Ajani WP Mail SMTP: Version 1.2.5 by WPForms WP Ultimate CSV Importer: Version 5.3.4 by smackcoders ### Inactive Plugins (29) ### Akismet Anti-Spam: Version 4.0.3 by Automattic All In One SEO Pack: Version 2.5 by Michael Torbert Any Mobile Theme Switcher: Version 2.1 by Dinesh Karki Contact Form by BestWebSoft: Version 4.0.9 by BestWebSoft Contact Us Form: Version 1.2 by Kenmore Design LLC Dropdown Menus: Version 1.0 by Robert O'Rourke @ interconnect/it Facebook Page Publish 2: Version 0.4.1 by Dean Williams, Martin Tschirsich Fancybox: Version 1.1.0 by Kevin Sylvestre Google Analytics for WordPress by MonsterInsights: Version 7.0.5 by MonsterInsights Google XML Sitemaps: Version 4.0.9 by Arne Brachhold Hello Dolly: Version 1.6 by Matt Mullenweg Jetpack by WordPress.com: Version 6.1 by Automattic jQuery fitText: Version 1.2 by Ramoonus Ninja Pages: Version 1.4.2 by The WP Ninjas Post / Page Duplicator: Version 1.9 Relative URL: Version 0.1.5 by Tunghsiao Liu Responsive Menu: Version 3.1.14 by Peter Featherstone SharePress: Version 2.2.36 by Aaron Collegeman Shopp+Support: Version 1.0.1 by shopplugin.com Shopp Requirements Check: Version 1.2 by Ingenesis Limited Simple Facebook Connect: Version 1.5 by Otto Simple Tags: Version 2.4.7 by Amaury BALMER TablePress: Version 1.9 by Tobias B?thge WP All Import: Version 3.4.7 by Soflyy WP AppTouch: Version 0.8.2 by Gino Cote WP Responsive Menu: Version 3.0.3 by MagniGenie WP Simple Paypal Shopping cart: Version 4.4.0 by Tips and Tricks HQ, Ruhul Amin, mra13 WPtouch Mobile Plugin: Version 4.3.27 by WPtouch Yoast SEO: Version 7.4.2 by Team Yoast ### Media handling ### Active editor: WP_Image_Editor_GD Imagick Module Version: Imagick not available ImageMagick Version: Imagick not available GD Version: bundled (2.1.0 compatible) Ghostscript Version: 9.05 ### Server ### Server architecture: Linux 3.2.0-58-virtual x86_64 PHP Version: 5.4.24 (Supports 64bit values) PHP SAPI: fpm-fcgi PHP max input variables: 1000 PHP time limit: 120 PHP memory limit: 256M Max input time: 300 Upload max filesize: 40M PHP post max size: 40M cURL Version: 7.27.0 OpenSSL/1.0.1g SUHOSIN installed: No Is the Imagick library available: No ### Database ### Extension: mysqli Server version: 5.5.34 Client version: mysqlnd 5.0.10 - 20111026 - $Id: 2d8f599f49e5e8d2f5ba7112b5c444b3e2e48cdf $ Database prefix: wp_ ### WordPress constants ### ABSPATH: /opt/bitnami/apps/wordpress/htdocs/ WP_HOME: https://www.thedailygrowler.com WP_SITEURL: https://www.thedailygrowler.com WP_DEBUG: Disabled WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG_DISPLAY: Enabled WP_DEBUG_LOG: Disabled SCRIPT_DEBUG: Disabled WP_CACHE: Disabled CONCATENATE_SCRIPTS: Undefined COMPRESS_SCRIPTS: Undefined COMPRESS_CSS: Undefined WP_LOCAL_DEV: Undefined ### Filesystem permissions ### The main WordPress directory: Writable The wp-content directory: Not writable The uploads directory: Writable The plugins directory: Not writable The themes directory: Not writable The Must Use Plugins directory: Not writable
Thanks for your help with this!
Thank you very much, I’ll do some testing using this information to see if i can replicate the behavior you are experiencing after some quick followup questions!
My first thought is that the SSL Insecure Content Fixer plugin may be the reason for your redirect loop, and if you wouldn’t mind doing a quick test for me (you may have to do the cookie clearing if I am wrong)? If you can, please go to the list of installed plugins, you should have a new option under each plugin name called “Troubleshoot”, if you click that under the SSL plugin, it should enter troubleshooting mode with only that one plugin active, if the loops don’t happen when this is done I think we’ve found the source (and then I can look into how we can work around that specific piece ?? )
The updates that seem to time out, but are actually working may be caused by the loopbacks failing to run as they should (which I noticed in the output). I wonder, on the very first tab (The one called Health Check), it would also say loopback failed, and allow you to test without any plugins active, are you able to do this, as I’m curious if it might be related in some way, that will attempt to identify if it’s a plugin issue preventing the loopbacks if nothing else.
Hi Marius,
Sorry for the delay in getting back to you.
You are definitely on to something with the SSL Insecure Content Fixer plugin.
I was able to enter “Troubleshoot” for that one plugin without any error (though I didn’t see any information that might be useful).
As a test, I tried to disable the SSL Insecure Content Fixer plugin and all hell broke loose. I was then unable to access wp-admin (I have FORCE_SSL_LOGIN and FORCE_SSL_ADMIN enabled) and the public website would not format properly via HTTPS. I had to temporarily allow HTTP admin access to enable the SSL Insecure Content Fixer to restore things to normal.
Regarding your question about the loopback (which I’d like to understand), I did previously test the loopback without plugins and it fails with the too many redirects error.
‘Result from testing without any plugins active and a default theme: The loopback request to your site failed, this may prevent WP_Cron from working, along with theme and plugin editors.
Error encountered: (0) Too many redirects’I hope this is helpful to you and you are able to figure something out.
Thanks,
John
G’day,
If you’re using SSL Insecure Content Fixer to fix HTTPS detection (e.g. when behind a proxy server — as it seems you are) then deactivating it will stop the detection fix, and you’ll get a redirection loop.
If you know which method is being used to fix HTTPS detection, you can make the fix permanent and then safely deactivate the plugin.
cheers,
RossHi Ross,
I think I am following you, but please confirm.
Since I am using the HTTP_X_FORWARDED_PROTO method, I can just set the server HTTPS value to ‘on’ and that will let WordPress know not to try to redirect to SSL, but it won’t do what your plugin does to fix HTTP referenced files, correct?
On another non-WordPress site I have, I am using an Apache rewrite rule to do this at the server level, which I assume should work for WordPress as well?
like this:<IfModule setenvif_module> SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on </IfModule>
Thanks for the response!
Cheers,
John
Hi Marius,
I added the Apache rewrite rule from my message to Ross above to my WordPress site and that seems to have resolved ‘Troubleshoot’ issue.
This fix is obviously tied to the AWS load balancer implementation and won’t necessarily work with other load balancers or proxies.
As an idea, you may be able to save the HTTPS environment variable before enabling troubleshooting mode and then set it to the saved value early in your code (if that’s not too late for WordPress purposes).
So, I am personally good, but I am interested in whatever you end up doing.
Best wishes,
John
And one other thing.
I am still getting the loopback error reported, but since adding the rewrite rule the test without plugins is successful.
The loopback request to your site failed, this may prevent WP_Cron from working, along with theme and plugin editors.<br>Error encountered: (0) cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received Result from testing without any plugins active and a default theme: The loopback request to your site completed successfully.
The ‘Test individual plugins’ option revealed that the WP-Donate plugin was breaking WP_Cron. I disabled this plugin and now the Health Check reports the loopback request as successful.
Thanks
@jblakely yes, glad to see you’ve resolved the redirect loop. The plugin can be set to the default HTTPS detection setting once you’ve set the server to handle the detection. It will then only do replacements to clean up insecure content.
If you want to deactivate the plugin, clean up your content using the Better Search Replace plugin as described in Cleaning Up Content.
cheers,
RossI’m glad to see you got things figured out!
I’ve created a task for us to look into potential ways to detect and hopefully prevent this in the future (but that won’t be a part of the upcoming 1.1.0 release though ?? )
I appreciate you taking the time to test and walk through the steps with us!
- The topic ‘Get “Too many redirects” error when trying to access Health Check’ is closed to new replies.