I added --requirepass=
in dragonfly.conf but I can’t find the equivalent option for username, and apparently python’s redis cli cannot authenticate to the admin port without a user anymore (I think after 6.x) so:
client = redis.Redis(
decode_responses=True, host=host, port=port, password=mypass)
will throw:
Error: Failed to connect to localhost:6378, exc: invalid username-password pair or user is disabled.
which is the user, or how can I connect without a user but with a password please?
according to all online references I see, the default user should : “default”
r = redis.Redis(host="localhost", port=6379, username="default", password="admin", db=0)
but it doesnt work for me in ubuntu (installed from the deb package 1.14), it still throws the invalid username-password pair message
And this:
client = redis.Redis(
decode_responses=True, host=host, port=port, db=0)
client.auth(password="mypass")
throws:
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/redis/connection.py", line 1086, in get_connection
connection.connect()
File "/home/user/.local/lib/python3.10/site-packages/redis/connection.py", line 276, in connect
self.on_connect()
File "/home/user/.local/lib/python3.10/site-packages/redis/connection.py", line 379, in on_connect
self.read_response()
File "/home/user/.local/lib/python3.10/site-packages/redis/connection.py", line 500, in read_response
response = self._parser.read_response(disable_decoding=disable_decoding)
File "/home/user/.local/lib/python3.10/site-packages/redis/_parsers/resp2.py", line 15, in read_response
result = self._read_response(disable_decoding=disable_decoding)
File "/home/user/.local/lib/python3.10/site-packages/redis/_parsers/resp2.py", line 38, in _read_response
raise error
redis.exceptions.AuthenticationError: Authentication required.
The default user for password is indeed “default”. If you want to set up other users this is acl configurations. Did you try to connect to the server using redis cli with your password and this worked? is it only python redis client issue?