-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClusterAllFailedError: Failed to refresh slots cache. #1003
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 7 days if no further activity occurs, but feel free to re-open a closed issue if needed. |
Have the same issue. Using an AWS elasticache redis (cluster mode enabled with multiple shards). I get the issue when using in-transit encryption and trying to access behind a NAT instance. |
Same issue here |
FWIW, I know this issue is re: clustered but I was fighting with this as well (in-transit encryption on, passworded redis) and this connection string finally got me going, I expect it'd work with a cluster as well:
|
Facing the same issue with 4.11.1 ioredis and redis 3.2.2 |
any updates on this ? |
ioredis @ 4.16.0 My particular issue was a result of an improperly deployed security group on the ElastiCache cluster, so it was truly unable to connect. All seems to work ok with the above library versions! |
The following works for me. Redis version: 5.0.4 on AWS ElasticCache Clustered with TLS and AUTH enabled. Code to connect:
Make sure you are in the right VPC, Subnet and Security group to connect to ElastiCache along with the correct IAM role |
We're having a similar issue. Code to connect:
This code works, but bypasses the cluster for reads, if I understand it correctly:
I can also connect via |
@ion-willo Is your ElastiCache cluster-mode-enabled? If so, I suggest you connect to the single configuration endpoint. |
Hi, I have the same issue using AWS ElastiCache & ioredis: [ElastiCache] [ioredis]
Error: What am I missing ? |
I guess you're missing I can't vouch for all of the following, but FYI:
|
AUTH is not enabled. My current options (and it's still failing): {
slotsRefreshTimeout: 3000,
dnsLookup: (address, callback) => callback(null, address),
redisOptions: {
showFriendlyErrorStack: true,
tls: {
checkServerIdentity: (/*host, cert*/) => {
// skip certificate hostname validation
return undefined
}
},
},
} |
I suggest setting |
I found my mistake, I'm new into ElastiCache and I didn't realize I need to connect from an EC2 or AWS VPN. I fixed that and it worked. |
It's not working with https://github.com/bitnami/bitnami-docker-redis-cluster fixes like |
The only fix that seems to work for me is to up the I wander why the default timeout value is so "dangerously" low. The response to the slots commands just seems to sometimes take 2 or 3 seconds for me. Too bad then that by the time the slots "response" comes the client has already given up... |
This will work without failing if you remove the dnsLookup option. |
set here's our team's full ioredis config
|
Faced similar issue while running redis cluster inside docker container https://github.com/bitnami/containers/tree/main/bitnami/redis-cluster Fixed it using |
@kidus60 your solution worked for me. BTW what does |
i am facing the same issue when using clustered config, i have a none clustered Redis instance so when i am using the normal connection it is works on ec2 vm which is in the same vpc but when deployed on eks with docker i am getting some certificate file not found error. here is my connection config const options = {
port: config.redis.port, // Redis port
host: config.redis.host, // Redis host
family: 4, // 4 (IPv4) or 6 (IPv6)
password: config.redis.password,
db: MAIN_REDIS_DB,
enableAutoPipelining: true,
enableOfflineQueue: false,
tls :{}
}
export const client = new Redis(options); ioredis version = ^4.28.2 |
I am also facing the same issue below is my configuration setup
|
Hi All. i have following error can You help me ?
[ioredis] Unhandled error event: ClusterAllFailedError: Failed to refresh slots cache.
code is following.
`"use strict";
require('./config/config');
const Redis = require('ioredis');
(async()=> {
})();`
The text was updated successfully, but these errors were encountered: