redis-rb-cluster icon indicating copy to clipboard operation
redis-rb-cluster copied to clipboard

I cannot set a password on this client

Open Shabirmean opened this issue 4 years ago • 1 comments

Hi,

I am trying to test my cluster using these ruby clients. But I constantly get the following error:

error Can't reach a single startup node. NOAUTH Authentication required

I have tried:

startup_nodes = [
        {:host => "redis-cluster-service", :port => 6379, :password => 'pass'}
    ]

startup_nodes = [
        {:host => "redis-cluster-service", :port => 6379, password: 'pass'}
    ]

RedisCluster.new(startup_nodes,32,:timeout => 0.1,:password => 'pass')
RedisCluster.new(startup_nodes,32,:timeout => 0.1, password: 'pass')
RedisCluster.new(startup_nodes,32,:timeout => 0.1,:auth_pass => 'pass')=

None of them seem to work. Any help with regards to this would be of great help.

Best Shabir

Shabirmean avatar Aug 04 '20 03:08 Shabirmean

The example is of the old client code,. After hours of toil I found that the following works:

rc = Redis.new(cluster: startup_nodes,:timeout => 0.1, replica: true, password: 'PASSWORD')

Would be nice if the docs were updated.

Shabirmean avatar Aug 04 '20 05:08 Shabirmean