Skip to content

Connecting to a password secured redis unix socket not working #2374

Closed
@hofrob

Description

@hofrob

Version: What redis-py and what redis version is the issue happening on?

  • Redis server v=6.0.16 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=a3fdef44459b3ad6
  • redis-py 4.3.4

Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure)

  • Ubuntu 22.04
  • python 3.10.4

Description: Description of your issue, stack traces from errors and code that reproduces the issue

I set up a redis server with this config which I include at the end of the default config file (/etc/redis/redis.conf):

port 0
requirepass foobared
unixsocket /var/run/redis/redis-server.sock
unixsocketperm 770

Install redis-py and create this python file:

import redis

redis_inst = redis.Redis()
redis_client = redis_inst.from_url("unix://:foobared/var/run/redis/redis-server.sock")
redis_client.sadd("ABC", 555)

Result: redis.exceptions.AuthenticationError: Authentication required.

Tried this on two separate machines with different venvs. It might just be an issue with the from_url method. I was not able to get to the bottom of this. But since it is mentioned in the docs that this is supported, I wanted to report this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions