• Resolved gabrielfilippi

    (@gabrielfilippi)


    I’m using Amazon ElastiCache and I’m not able to connect to it. In my wp-config I configured as follows:

    define( 'WP_REDIS_TIMEOUT', 1 );
    define( 'WP_REDIS_READ_TIMEOUT', 1 );
    define( 'WP_REDIS_DATABASE', "5" );
    define( 'WP_REDIS_CLIENT', 'phpredis' );
    define( 'WP_REDIS_CLUSTER', [
        'tcp://xxxxxxx.rhtapl.XXXXXXXX.com:6379?alias=node-01',
        'tcp://xxxxxxx-ro.XXXXXXXX.com:6379?alias=node-02',
    ] );

    The following error happens:
    Couldn’t map cluster keyspace using any provided seed (RedisClusterException)

    Redis Version: 5.0.5

    Status: Not connected
    Client: PhpRedis (v5.3.4)
    Drop-in: Valid
    Disabled: No
    Ping: 
    Connection Exception: Couldn't map cluster keyspace using any provided seed (RedisClusterException)
    Errors: [
        "Couldn't map cluster keyspace using any provided seed"
    ]
    PhpRedis: 5.3.4
    Relay: Not loaded
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.4.30
    Plugin Version: 2.0.26
    Redis Version: Unknown
    Multisite: No
    Metrics: Disabled
    Metrics recorded: null
    Filesystem: Working
    Global Prefix: "wp_"
    Blog Prefix: "wp_"
    WP_REDIS_CLIENT: "phpredis"
    WP_REDIS_CLUSTER: ["xxxxxxx.rhtapl.XXXXXXXX.com:6379?alias=node-01","tcp://xxxxxxx-ro.XXXXXXXX.com:6379?alias=node-02"]
    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",
        "redis-cache"
    ]
    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",
        "redis-cache",
        "blog_meta"
    ]
    Unflushable Groups: []
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.0.26 by Till Krüss"
    ]
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    You’re not using a real cluster then. Post the output of redis-cli info cluster.

    Thread Starter gabrielfilippi

    (@gabrielfilippi)

    # Server
    redis_version:5.0.5
    redis_git_sha1:0
    redis_git_dirty:0
    redis_build_id:0
    redis_mode:standalone
    os:Amazon ElastiCache
    arch_bits:64
    multiplexing_api:epoll
    atomicvar_api:atomic-builtin
    gcc_version:0.0.0
    process_id:1
    run_id:017c6d5b4b515a432fd5ee8c68ce0e6ef32b5dfc
    tcp_port:6379
    uptime_in_seconds:24904856
    uptime_in_days:288
    hz:10
    configured_hz:10
    lru_clock:13462421
    executable:-
    config_file:-

    # Clients
    connected_clients:3
    client_recent_max_input_buffer:2
    client_recent_max_output_buffer:0
    blocked_clients:0

    # Memory
    used_memory:4303960
    used_memory_human:4.10M
    used_memory_rss:5611520
    used_memory_rss_human:5.35M
    used_memory_peak:6820808
    used_memory_peak_human:6.50M
    used_memory_peak_perc:63.10%
    used_memory_overhead:4282754
    used_memory_startup:4198640
    used_memory_dataset:21206
    used_memory_dataset_perc:20.13%
    allocator_allocated:4534632
    allocator_active:4943872
    allocator_resident:10059776
    used_memory_lua:37888
    used_memory_lua_human:37.00K
    used_memory_scripts:0
    used_memory_scripts_human:0B
    number_of_cached_scripts:0
    maxmemory:436469760
    maxmemory_human:416.25M
    maxmemory_policy:volatile-lru
    allocator_frag_ratio:1.09
    allocator_frag_bytes:409240
    allocator_rss_ratio:2.03
    allocator_rss_bytes:5115904
    rss_overhead_ratio:0.56
    rss_overhead_bytes:-4448256
    mem_fragmentation_ratio:1.32
    mem_fragmentation_bytes:1370320
    mem_not_counted_for_evict:0
    mem_replication_backlog:0
    mem_clients_slaves:0
    mem_clients_normal:83970
    mem_aof_buffer:0
    mem_allocator:jemalloc-5.1.0
    active_defrag_running:0
    lazyfree_pending_objects:0

    # Persistence
    loading:0
    rdb_changes_since_last_save:5
    rdb_bgsave_in_progress:0
    rdb_last_save_time:1657599503
    rdb_last_bgsave_status:ok
    rdb_last_bgsave_time_sec:0
    rdb_current_bgsave_time_sec:-1
    rdb_last_cow_size:188416
    aof_enabled:0
    aof_rewrite_in_progress:0
    aof_rewrite_scheduled:0
    aof_last_rewrite_time_sec:-1
    aof_current_rewrite_time_sec:-1
    aof_last_bgrewrite_status:ok
    aof_last_write_status:ok
    aof_last_cow_size:0

    # Stats
    total_connections_received:1057867
    total_commands_processed:70550142
    instantaneous_ops_per_sec:1
    total_net_input_bytes:1597276780
    total_net_output_bytes:222507797702
    instantaneous_input_kbps:0.03
    instantaneous_output_kbps:4.44
    rejected_connections:0
    sync_full:0
    sync_partial_ok:0
    sync_partial_err:0
    expired_keys:197696
    expired_stale_perc:0.00
    expired_time_cap_reached_count:0
    evicted_keys:0
    keyspace_hits:29690
    keyspace_misses:197979
    pubsub_channels:0
    pubsub_patterns:0
    latest_fork_usec:175
    migrate_cached_sockets:0
    slave_expires_tracked_keys:0
    active_defrag_hits:0
    active_defrag_misses:0
    active_defrag_key_hits:0
    active_defrag_key_misses:0

    # Replication
    role:master
    connected_slaves:0
    master_replid:fd4acda0d18b4ec70e8b4341ffc54aecaff0257e
    master_replid2:0000000000000000000000000000000000000000
    master_repl_offset:5616
    second_repl_offset:-1
    repl_backlog_active:0
    repl_backlog_size:1048576
    repl_backlog_first_byte_offset:1686
    repl_backlog_histlen:3931

    # CPU
    used_cpu_sys:11722.037868
    used_cpu_user:18501.894229
    used_cpu_sys_children:0.035800
    used_cpu_user_children:0.214748

    # SSL
    ssl_enabled:no
    ssl_connections_to_previous_certificate:0
    ssl_connections_to_current_certificate:0
    ssl_current_certificate_not_before_date:(null)
    ssl_current_certificate_not_after_date:(null)
    ssl_current_certificate_serial:0

    # Cluster
    cluster_enabled:0

    # Keyspace
    db2:keys=1,expires=1,avg_ttl=286350

    Plugin Author Till Krüss

    (@tillkruess)

    You’re trying to connect to a cluster, but you’re not running a cluster:

    
    cluster_enabled:0
    
    Thread Starter gabrielfilippi

    (@gabrielfilippi)

    Right, but I tried the conventional way, configuring with the variables below and it doesn’t work either.

    
    define( 'WP_REDIS_HOST', 'ff-cache-xxxxxxxx.cache.amazonaws.com' );
    define("WP_REDIS_PORT", "6379");

    And the following error happens:

    Status: Not connected
    Client: PhpRedis (v5.3.4)
    Drop-in: Valid
    Disabled: No
    Ping: 
    Connection Exception: Connection timed out (RedisException)
    Errors: [
        "Connection timed out"
    ]
    PhpRedis: 5.3.4
    Relay: Not loaded
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.4.30
    Plugin Version: 2.0.26
    Redis Version: Unknown
    Multisite: No
    Metrics: Disabled
    Metrics recorded: null
    Filesystem: Working
    Global Prefix: "wp_"
    Blog Prefix: "wp_"
    WP_REDIS_HOST: "ff-cache-001.rhtapl.0001.use1.cache.amazonaws.com"
    WP_REDIS_PORT: "6379"
    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",
        "redis-cache"
    ]
    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",
        "redis-cache",
        "blog_meta"
    ]
    Unflushable Groups: []
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.0.26 by Till Krüss"
    ]

    I already tried modifying the WP_REDIS_TIMEOUT and WP_REDIS_READ_TIMEOUT parameters to 0, 5 and 10 and nothing happened.

    Plugin Author Till Krüss

    (@tillkruess)

    You PHP server probably can’t access the Redis server. Try connecting via redis-cli first on that machine to ensure it’s not a network issue.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Couldn’t map cluster keyspace using any provided seed’ is closed to new replies.