Comments (2)
@Vector-Cross Your error is clear as day what the problem is redis.exceptions.ResponseError: WRONGPASS invalid username-password pair or user is disabled.
it is not a problem of reaching your nodes in any way. You get there and commands is sent there. The problem is that either your password you provided in your python code is wrong, or you have not deployed the correct password to all nodes in your cluster.
The only case you have here tho is that if you can show you configured the password correct and that you can prove that when sending the authentication command, the password is not the same as your variable REDIS_PASSWORD
from redis-py-cluster.
I'm pretty sure the REDIS_PASSWORD
is correct. My problem is I cann't connect the first node.
How to explain the following cases.
First, check password. code passed.
>>> from rediscluster import RedisCluster
>>> startup_nodes = [
... {"host": "192.168.0.113", "port": 6379},
... {"host": "192.168.0.113", "port": 6380},
... {"host": "192.168.0.114", "port": 6379}, 【# key "test" in this Node, can connect when not the first config】
... {"host": "192.168.0.114", "port": 6380},
... {"host": "192.168.0.115", "port": 6379},
... {"host": "192.168.0.115", "port": 6380}
... ]
>>> redis_store = RedisCluster(
... startup_nodes=startup_nodes,
... skip_full_coverage_check=True,
... password='Lj12369874.')
>>> redis_store.get("test") 【# Now can connect, means PASSWORD is correct】
【b'OK'】
Code not pass when Switch the squence of Startup_nodes
>>> from rediscluster import RedisCluster
>>> startup_nodes = [
... {"host": "192.168.0.114", "port": 6379}, 【# key "test" in this Node, switch to top cann't connect】
... {"host": "192.168.0.113", "port": 6379},
... {"host": "192.168.0.113", "port": 6380},
... {"host": "192.168.0.114", "port": 6380},
... {"host": "192.168.0.115", "port": 6379},
... {"host": "192.168.0.115", "port": 6380}
... ]
>>> redis_store = RedisCluster(
... startup_nodes=startup_nodes,
... skip_full_coverage_check=True,
... password='Lj12369874.')
>>> redis_store.get("test") 【# Now can not connect, just switch the squence of Startup_nodes】
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 1606, in get
return self.execute_command('GET', name)
File "/usr/local/lib/python3.7/site-packages/rediscluster/client.py", line 555, in execute_command
return self._execute_command(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/rediscluster/client.py", line 714, in _execute_command
raise e
File "/usr/local/lib/python3.7/site-packages/rediscluster/client.py", line 630, in _execute_command
connection.send_command(*args)
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 726, in send_command
check_health=kwargs.get('check_health', True))
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 698, in send_packed_command
self.connect()
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 567, in connect
self.on_connect()
File "/usr/local/lib/python3.7/site-packages/rediscluster/connection.py", line 60, in on_connect
super(ClusterConnection, self).on_connect()
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 643, in on_connect
auth_response = self.read_response()
File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 756, in read_response
raise response
redis.exceptions.ResponseError: WRONGPASS invalid username-password pair or user is disabled.
from redis-py-cluster.
Related Issues (20)
- archive repo since redis-py is cluster compatible HOT 6
- Redis Cluster cannot be connected. Please provide at least one reachable node. when connecting to cluster HOT 2
- Support of Redis v4.1 HOT 1
- get wrong return value "OK" from redis HOT 1
- how to use ACL in redis cluster client HOT 1
- TypeError: unsupported operand type(s) for +: 'int' and 'str' HOT 1
- version 2.1.3 raise rediscluster.exceptions.MovedError when connect redis cluster HOT 4
- Is need to connection pool disconect? HOT 2
- ClusterWithReadReplicasConnectionPool with read_from_replicas causes dump. HOT 1
- KeyError:636 -> BaseException HOT 2
- Support for PSYNC HOT 1
- rediscluster.exceptions.ClusterError: TTL exhausted HOT 4
- Is there any params for RedisCluster __init__, to let redis know when did idle client connection should be kicked out HOT 3
- ImportError: cannot import name 'SlotNotCoveredError' from 'rediscluster.exceptions' HOT 1
- Turn off vervose logging HOT 4
- Best practice for deletion from Redis HOT 2
- Please update so that it can be installed on Python 3.11 HOT 2
- use redis-py-cluster unable to connect to redis cluster in python 2.7 HOT 2
- is ClusterBlockingConnectionPool work in gevent? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-py-cluster.