redis / redis-vl-python

Redis Vector Library (RedisVL) interfaces with Redis' vector database for realtime semantic search, RAG, and recommendation systems.
https://www.redisvl.com/
MIT License
222 stars 35 forks source link

Cannot connect to redis-stack container running on Docker #235

Open mwomick opened 1 week ago

mwomick commented 1 week ago

On SearchIndex.connect(...), I am getting the following message:

redisvl.exceptions.RedisModuleVersionError: Required Redis db module search >= 20600 OR searchlight >= 20600 not installed. See Redis Stack docs at https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/.

The ports are properly redirected to localhost. Redis Insight works and is hosted at localhost:8001 where it was directed.

If I run

docker exec -it redis-stack redis-cli
> MODULE LIST

It shows

...
6) 1) "name"
   2) "search"
   3) "ver"
   4) (integer) 21005
   ...

However, if I print the modules (client.module_list()) from the redisvl.redis.connection.get_modules method, I get an empty list.

I think it is not connecting at all. The exact same exception and message (redisvl.exceptions.RedisModuleVersionError: Required Redis db module search >= 20600 OR searchlight >= 20600 not installed. See Redis Stack docs at https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/.) occurs if the container is not running.

I have tried connecting in various ways, via SearchIndex.set_client(redisClient) and also SearchIndex.connect(redis_url="redis://localhost:6379").

tylerhutcherson commented 1 week ago

Can you confirm which version of redisvl you are on? Also can you confirm which command you use to start redis?

mwomick commented 1 week ago

@tylerhutcherson Yes, the redisvl version is 0.3.4 and the command to start the Docker is the one found on the website (https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/docker/): docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest.