• Resolved dcivera

    (@dcivera)


    Hello,

    For some reason. I can’t login into WordPress after I enable object caching and have to disable it.

    I don’t know if it’s related, but I can’t flush the cache once it’s enabled (get an error saying “Object cache could not be flushed.”)

    I tried wp cache flush and redis-cli flushall.

    I tried to disable all my plugin. I also didn’t find any errors in the Apache or redis-server logs.

    I noticed that the file object-cache.php doesn’t get created in /wp-content. I only have the advanced-cache.php

    Finally, here’s the result when I run diagnostic after enabling the cache. Thanks a lot for your help.

    Status: Connected
    Client: PhpRedis (v5.1.1)
    Drop-in: Valid
    Ping: 1
    Redis Extension: 5.1.1
    Predis Client: 1.1.1
    PHP Version: 7.4.3
    Redis Version: 5.0.7
    Multisite: No
    Global Prefix: "theprefix"
    Blog Prefix: "theprefix"
    WP_REDIS_DATABASE: 1
    WP_CACHE_KEY_SALT: "thesalt"
    WP_REDIS_PASSWORD: "****************************************************************"
    Global Groups: {
        "0": "blog-details",
        "1": "blog-id-cache",
        "2": "blog-lookup",
        "3": "global-posts",
        "4": "networks",
        "5": "rss",
        "6": "sites",
        "7": "site-details",
        "8": "site-lookup",
        "9": "site-options",
        "10": "site-transient",
        "11": "users",
        "12": "useremail",
        "13": "userlogins",
        "14": "usermeta",
        "15": "user_meta",
        "16": "userslugs",
        "33": "blog_meta"
    }
    Ignored Groups: [
        "counts",
        "plugins",
        "themes"
    ]
    Unflushable Groups: []
    Dropins: 
     - advanced-cache.php v by 
     - Redis Object Cache Drop-In v1.5.9 by Till Krüss
    Plugins: 
     - Akismet Anti-Spam v4.1.5 by Automattic (Active)
     - AMP v1.5.3 by AMP Project Contributors (Active)
     - Classic Editor v1.5 by WordPress Contributors (Active)
     - Convert Plus v3.5.8 by Brainstorm Force (Active)
     - Health Check & Troubleshooting v1.4.4 by The www.ads-software.com community (Active)
     - Hello Dolly v1.7.2 by Matt Mullenweg (Active)
     - Inactive Logout v1.9.5 by Deepen Bajracharya (Inactive)
     - Redis Object Cache v1.5.9 by Till Krüss (Active)
     - ShortPixel Image Optimizer v4.18.0 by ShortPixel (Inactive)
     - Simple History v2.33.2 by P?r Thernstr?m (Active)
     - Slider Revolution v6.2.8 by ThemePunch (Active)
     - Supreme Shortcodes v2.0.1 by Supreme Factory (Active)
     - tagDiv Cloud Library v1.5 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Composer v2.6 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Mobile Theme v1.4 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Newsletter v1.5 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Social Counter v4.7 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Standard Pack v1.0 BETA | built on 06.05.2020 14:38 by tagDiv (Active)
     - Two Factor Authentication v1.7.2 by David Nutbourne + David Anderson, original plugin by Oskar Hane (Inactive)
     - WordPress RSS Feed Retriever v1.6.1 by Theme Mason (Active)
     - WPBakery Page Builder v6.2.0 by Michael M - WPBakery.com (Active)
     - WP fail2ban (Premium) v4.2.8 by Charles Lecklider (Active)
     - WP Rocket v3.5.5.1 by WP Media (Active)
     - WP Security Audit Log v4.0.3 by WP White Security (Active)
     - Yoast SEO v14.1 by Team Yoast (Active)
    
    • This topic was modified 4 years, 9 months ago by dcivera.
Viewing 15 replies - 1 through 15 (of 27 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    After enabling the object cache dropin in wp-content, do you still have any issues?

    Thread Starter dcivera

    (@dcivera)

    Not sure what you mean by enabling dropin in `wp-content.

    As of now, things have gotten worse. I enabled caching. All my browser windows got logged out with no way of logging back in.

    When I try wp redis disable it tells me Error: Object cache could not be disabled. Same when I run ‘wp cache flushand even deactivating the plugin through wordpress-cli does nothing. Even after Iflushall`.

    I also created an empty object-cache.php file, but when I do I can’t even enable caching any more since the interface tells me An unknown object cache drop-in was found. To use Redis, please replace it now. I assumed the plugin was only using advanced-cache.php.

    • This reply was modified 4 years, 9 months ago by dcivera.
    Thread Starter dcivera

    (@dcivera)

    Ok, just got this email:

    An error of type E_ERROR was caused in line 215 of the file /var/www/html/domain/public_html/wp-content/plugins/redis-cache/redis-cache.php. Error message: Uncaught Error: Call to undefined method WP_Object_Cache::redis_status() in /var/www/html/domain/public_html/wp-content/plugins/redis-cache/redis-cache.php:215
    Stack trace:
    #0 /var/www/html/domain/public_html/wp-content/plugins/redis-cache/redis-cache.php(193): RedisObjectCache->get_redis_status()
    #1 /var/www/html/domain/public_html/wp-content/plugins/redis-cache/includes/admin-page.php(42): RedisObjectCache->get_status()
    #2 /var/www/html/domain/public_html/wp-content/plugins/redis-cache/redis-cache.php(105): require_once('/var/www/html/w...')
    #3 /var/www/html/domain/public_html/wp-includes/class-wp-hook.php(287): RedisObjectCache->show_admin_page()
    #4 /var/www/html/domain/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
    #5 /var/www/html/domain/public_html/wp-includes/plugin.php(478): WP_Hook->do_action()
    #6 /var/www/html/domain/public_html/wp-admin/admin.php(254): do_action()
    #7 /va
    
    • This reply was modified 4 years, 9 months ago by dcivera.
    Plugin Author Till Krüss

    (@tillkruess)

    1. Delete the /wp-content/object-cache.php file.
    2. Do a full flush of your Redis server: redis-cli flushall
    3. Make sure your database is empty.
    4. Go to “Settings -> Redis” and tap on “Enable Cache”

    Thread Starter dcivera

    (@dcivera)

    Sorry, nothing is working.

    I did all the steps you mentioned, deactivated the plugin, flushed the cache with wp-cli. Then reactivated it. Still the same issue.

    I tried to set WP_REDIS_HOST in wp-config. I set it to 127.0.0.0 and localhost, but it’s the same.

    I also set maxmemory 128mb and maxmemory-policy allkeys-lfu in ~redis.conf` for good measure.

    I ran monitor in redis-cli and I see the plugin working. I see the object-cache.php (I didn’t realize the file got deleted when you disabled object cache). When I run info keyspace, I see the DB, but for the life of me I can’t figure out why the WP admin gets stuck. I enter my user name and password, press submit and it shows the login screen again.

    • This reply was modified 4 years, 9 months ago by dcivera.
    • This reply was modified 4 years, 9 months ago by dcivera.
    • This reply was modified 4 years, 9 months ago by dcivera.
    Plugin Author Till Krüss

    (@tillkruess)

    You’ll have to be more specific. What exactly isn’t working, what’s the current status?

    Thread Starter dcivera

    (@dcivera)

    As I mentioned, I can’t log into WordPress once the plugin is activated. I get to the login screen, enter my user name and password, and instead of logging me in, it presents the login screen again.

    The problem goes away when I Disable Object Cache.

    Additionally, when I Enable Object Cache and the plugin connects to Redis, I can’t flush the cache. When I press the button, it tells me there was an error. Similarly, I can’t use wp-cli to flush the cache or disable redis-cache. It also throws Error: Object cache could not be disabled.

    • This reply was modified 4 years, 9 months ago by dcivera.
    Plugin Author Till Krüss

    (@tillkruess)

    What does that print?

    
    redis-cli flushall
    redis-cli dbsize
    
    Thread Starter dcivera

    (@dcivera)

    127.0.0.1:6379> flushall
    OK
    127.0.0.1:6379> dbsize
    (integer) 0
    127.0.0.1:6379> 
    
    Plugin Author Till Krüss

    (@tillkruess)

    Ok, great. Now when you enable the object cache in “Settings > Redis”, what happens?

    Thread Starter dcivera

    (@dcivera)

    When I click Enable Object Cache

    1. I see

    Status: Connected
    Client: PhpRedis (v5.1.1)
    Key Prefix: wlikjwe9812wklj

    I also attached a copy of the diagnostic at the end of this message

    2. The WordPress login screen is no longer working. When I enter my username and password and press enter, instead of loging me in, it asks me to enter my username and password again.

    3. When I press the Flush Cache button, I see Object cache could not be flushed.

    4. When I press Disable Object Cache the WordPress login screen is usable again.

    
    Status: Connected
    Client: PhpRedis (v5.1.1)
    Drop-in: Valid
    Ping: 1
    Redis Extension: 5.1.1
    Predis Client: 1.1.1
    PHP Version: 7.4.3
    Redis Version: 5.0.7
    Multisite: No
    Global Prefix: "dlkd90ldsf_"
    Blog Prefix: "dlkd90ldsf_"
    WP_REDIS_HOST: "127.0.0.1"
    WP_REDIS_DATABASE: 1
    WP_CACHE_KEY_SALT: "wlikjwe9812wklj"
    WP_REDIS_PASSWORD: "****************************************************************"
    Global Groups: {
        "0": "blog-details",
        "1": "blog-id-cache",
        "2": "blog-lookup",
        "3": "global-posts",
        "4": "networks",
        "5": "rss",
        "6": "sites",
        "7": "site-details",
        "8": "site-lookup",
        "9": "site-options",
        "10": "site-transient",
        "11": "users",
        "12": "useremail",
        "13": "userlogins",
        "14": "usermeta",
        "15": "user_meta",
        "16": "userslugs",
        "33": "blog_meta"
    }
    Ignored Groups: [
        "counts",
        "plugins",
        "themes"
    ]
    Unflushable Groups: []
    Dropins: 
     - advanced-cache.php v by 
     - Redis Object Cache Drop-In v1.5.9 by Till Krüss
    Plugins: 
     - Akismet Anti-Spam v4.1.5 by Automattic (Active)
     - AMP v1.5.3 by AMP Project Contributors (Active)
     - Classic Editor v1.5 by WordPress Contributors (Active)
     - Convert Plus v3.5.8 by Brainstorm Force (Active)
     - Health Check & Troubleshooting v1.4.4 by The www.ads-software.com community (Active)
     - Hello Dolly v1.7.2 by Matt Mullenweg (Active)
     - Inactive Logout v1.9.5 by Deepen Bajracharya (Inactive)
     - Redis Object Cache v1.5.9 by Till Krüss (Active)
     - ShortPixel Image Optimizer v4.18.0 by ShortPixel (Inactive)
     - Simple History v2.33.2 by P?r Thernstr?m (Active)
     - Slider Revolution v6.2.8 by ThemePunch (Active)
     - Supreme Shortcodes v2.0.1 by Supreme Factory (Inactive)
     - tagDiv Cloud Library v1.5 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Composer v2.6 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Mobile Theme v1.4 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Newsletter v1.5 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Social Counter v4.7 | built on 06.05.2020 14:38 by tagDiv (Active)
     - tagDiv Standard Pack v1.0 BETA | built on 06.05.2020 14:38 by tagDiv (Active)
     - Two Factor Authentication v1.7.2 by David Nutbourne + David Anderson, original plugin by Oskar Hane (Inactive)
     - WordPress RSS Feed Retriever v1.6.1 by Theme Mason (Active)
     - WPBakery Page Builder v6.2.0 by Michael M - WPBakery.com (Active)
     - WP fail2ban (Premium) v4.2.8 by Charles Lecklider (Inactive)
     - WP Rocket v3.5.5.1 by WP Media (Active)
     - WP Security Audit Log v4.0.3 by WP White Security (Active)
     - Yoast SEO v14.1 by Team Yoast (Inactive)
    
    Plugin Author Till Krüss

    (@tillkruess)

    Try deleting all your cookies for the domain and try logging in again.

    Also, try using WP_REDIS_DATABASE=8 or whatever to make sure there are no conflicts.

    Thread Starter dcivera

    (@dcivera)

    Just tried it and nothing. Cleared all cache and cookies from the browser. Set WP_REDIS_DATABASE=8. I also added WP_REDIS_SELECTIVE_FLUSH=true (it wasn’t set before), but that didn’t do anything either, so I removed it.

    Thank you so much for sticking with me on this. I’m sure I must be an edge case, so I greatly appreciated it.

    Just one thought, could the fact that the domain isn’t publically available cause the issue? It’s a staging server at the moment, so /etc/hosts on my machine and the server’s is pointing the server’s IP. I don’t see why, but I’m at a loss.

    Thanks again for your help.

    P.S I’m encountering the issue on Safari, Chrome, and Firefox

    • This reply was modified 4 years, 9 months ago by dcivera.
    • This reply was modified 4 years, 9 months ago by dcivera.
    Plugin Author Till Krüss

    (@tillkruess)

    Looks like it’s not a browser issue and the site not being publicly available isn’t a problem. I’ve seen the redirect-login-loop before, but never related to Redis, usually it was a SSL/TLS issue or related to cookies.

    I’m tempted to say, disable all your other plugins (since it’s staging) and see if it’s a conflict with another plugin.

    Thread Starter dcivera

    (@dcivera)

    Thanks again for your perseverance.

    Before contacting you, I had enabled troubleshooting mode, but after your suggestion, I manually deactivated all plugins, but unfortunately, the issue is still there.

    Should I try to remove the SSL certificate and Certbot?

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Can’t login after enabling object cache’ is closed to new replies.