• Resolved Mikey

    (@mikey-d)


    I was able to connect to Redis 3.x, but upgraded to 6.x and now need to use the ACL connection and am unsure how I should set the array in wp-config.

    Is this the correct format or should it be something else?

    define('WP_REDIS_PASSWORD', '['user', 'password']');

    Diagnostics is showing this:

    Connection Exception: NOAUTH Authentication required. (RedisException)
    Errors: [
        "NOAUTH Authentication required."
    ]
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Would you mind posting the diagnostics from the plugin’s settings?

    You’ll have to use PhpRedis as the client most likely.

    Plugin Author Till Krüss

    (@tillkruess)

    The correct auth would be:

    
    define('WP_REDIS_PASSWORD', ['user', 'password']);
    
    Thread Starter Mikey

    (@mikey-d)

    Switched out the config for your syntax, disabled, ran flushall, enabled.

    Current wp-config:

    //Begin Redis config
    
    define('WP_REDIS_PASSWORD', ['default', 'password']);
    define('WP_REDIS_HOST', '127.0.0.1');
    define('WP_REDIS_PORT', '6379');
    define('WP_REDIS_CLIENT', 'pecl' );
    define('WP_REDIS_SERIALIZER', 'Redis::SERIALIZER_PHP' );
    define('WP_REDIS_DISABLE_BANNERS', 'true');

    Diagnostics:

    Status: Not Connected
    Client: PhpRedis (v5.3.1)
    Drop-in: Valid
    Disabled: No
    Ping: 
    Connection Exception: NOAUTH Authentication required. (RedisException)
    Errors: [
        "NOAUTH Authentication required."
    ]
    Redis Extension: 5.3.1
    Predis Client: Not found
    PHP Version: 7.4.7
    Redis Version: Unknown
    Multisite: No
    Global Prefix: "db2p_"
    Blog Prefix: "db2p_"
    WP_REDIS_PREFIX: "domain.com"
    WP_CACHE_KEY_SALT: "domain.com"
    Global Groups: [
        "blog-details",
        "blog-id-cache",
        "blog-lookup",
        "global-posts",
        "networks",
        "rss",
        "sites",
        "site-details",
        "site-lookup",
        "site-options",
        "site-transient",
        "users",
        "useremail",
        "userlogins",
        "usermeta",
        "user_meta",
        "userslugs"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "themes",
        "blog-details",
        "blog-id-cache",
        "blog-lookup",
        "global-posts",
        "networks",
        "rss",
        "sites",
        "site-details",
        "site-lookup",
        "site-options",
        "site-transient",
        "users",
        "useremail",
        "userlogins",
        "usermeta",
        "user_meta",
        "userslugs",
        "blog_meta"
    ]
    Unflushable Groups: []
    Drop-ins: 
     - advanced-cache.php v by 
     - Redis Object Cache Drop-In v2.0.3 by Till Krüss
    
    Plugin Author Till Krüss

    (@tillkruess)

    The plugin only recognizes:

    
    WP_REDIS_PREFIX: "domain.com"
    WP_CACHE_KEY_SALT: "domain.com"
    

    You need to move the other configuration much higher in your wp-config.php.

    Thread Starter Mikey

    (@mikey-d)

    This is the top of my wp-config:

    
    <?php
    //Begin Redis config
    define('WP_REDIS_PASSWORD', ['default', 'password']);
    define('WP_REDIS_HOST', '127.0.0.1');
    define('WP_REDIS_PORT', '6379');
    define('WP_REDIS_CLIENT', 'pecl' );
    define('WP_REDIS_SERIALIZER', 'Redis::SERIALIZER_PHP' );
    define('WP_REDIS_DISABLE_BANNERS', 'true');
    // END Redis config	
    
    define('WP_CACHE', true); // Added by WP Rocket
    define('WP_CACHE_KEY_SALT', 'domain.com');
    
    /**
     * The base configuration for WordPress
    Plugin Author Till Krüss

    (@tillkruess)

    Your diagnostics don’t reflect that, so it must be a configuration issue on your end.

    I just tested ACL connections and it works for me on v2.0.3: https://imgur.com/a/MXn11DB

    Thread Starter Mikey

    (@mikey-d)

    I decided to start looking over stuff from the start, pretending like I was installing from scratch. I tried turning auth off in the config file and now it connects perfectly.

    Do you have anything specific set for that section in your own config file?

    Plugin Author Till Krüss

    (@tillkruess)

    I’m using a default Redis config and ran this command:

    
    acl setuser admin on >secret allcommands allkeys
    

    Can you provide me admin access to your installation to have a closer look?

    Thread Starter Mikey

    (@mikey-d)

    To clarify, the auth was for /etc/redis/redis.conf

    I still have the acl user listed above which I was able to connect to.

    I messaged you on WordPress dev slack channel if you want to coordinate login info

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Redis Not Connected with ACL’ is closed to new replies.