Closed afernandezod closed 10 months ago
Hey, thanks for opening this issue. Unfortunately I have not been exposed to clustered Redis yet. And I don't think I will be able to set it up for testing anytime soon.
But can you add some more details as to where exactly you are seeing this error? Like in which operation is it being triggered? Thanks!
@wellle I appreciate your response. I already trying to create a new version of the Redis Db but not clustered to try again.
Basically the "MOVED...." error occurs during any of the rmq.open... .methods:
connection, err := rmq.OpenConnection("producer", "tcp", Host, 0, nil)
or
connection, err := rmq.OpenConnectionWithRmqRedisClient("producer", redisClient, nil)
or
connection, err := rmq.OpenConnectionWithRedisClient("producer", redisClient, nil)
Obviously when RedisClient is needed I instantiate one: redisClient := redis.NewClient(&redis.Options{ Addr: Host, DB: 0, MaxRetries: 0, MinRetryBackoff: 0, MaxRetryBackoff: 0, DialTimeout: 0, ReadTimeout: 0, WriteTimeout: 0, PoolFIFO: false, PoolSize: 0, MinIdleConns: 0, MaxConnAge: 0, PoolTimeout: 0, IdleTimeout: 0, IdleCheckFrequency: 0, Limiter: nil, })
Hope this helps and will pay attention when clustered Db are available.
Thanks!!!!!!!
Thanks. Can you also show the full Redis error you are seeing? (please obfuscate any sensitive details if present)
The error has the following format:
MOVED
Here some of the links I read:
https://stackoverflow.com/questions/48232539/aws-redis-cluster-move-error
https://serverfault.com/questions/812156/redis-cluster-error-moved
https://aws.amazon.com/premiumsupport/knowledge-center/elasticache-redis-client-readonly/
I think it was your setup issue, try to amend your config as below
redis.NewClusterClient(&redis.ClusterOptions{ Addrs: nodes, })
@si3nloong Thanks. I tried that also and same results. I think as @wellle mentioned rmq hasn't been exposed to this flavor of clusters. As soon cloud/AWS team changed the condition from clustered to non-clustered, it worked.
So the rmq doest not support Redis in cluster mode? Do they?
Here's a related PR which is fairly close to complete. Maybe there's someone who could pick up this work and address the review comments so it can get merged? 🙏 https://github.com/adjust/rmq/pull/128
Again I'm not sure if this is still a problem. Closing for now. Please reopen if the problem still persists :v:
After reading the "MOVED" error is due to instantiate a client to a clustered redis Db, I tried several options using redis.NewClusterCLienat, redis.NewClient and when ready to establish the connection I tried rmq.OpenConnectionWithRedisClient in order to once having the connection active be able to open the queue (rmq-connection.OpenQueue().
Not sure if I am missing something or clustered redis Db are not in the scope for rmq.
Any help is greatly appreciated.
Here part of the code:
Thanks.