Cannot connect to redis-stack container running on Docker
Closed this issue · 4 comments
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").
Can you confirm which version of redisvl you are on? Also can you confirm which command you use to start redis?
@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.
Still unable to reproduce this issue... here is my code run from the root of redis-vl-python (for quick schema access)
from redisvl.index import SearchIndex
idx = SearchIndex.from_yaml("schemas/schema.yaml")
idx.connect("redis://localhost:6379")This is assuming you have redis stack running on localhost:6379.
redis-cli module list
1) 1) "name"
2) "search"
3) "ver"
4) (integer) 21005
5) "path"
6) "/opt/redis-stack/lib/redisearch.so"
7) "args"
8) 1) "MAXSEARCHRESULTS"
2) "10000"
3) "MAXAGGREGATERESULTS"
4) "10000"
2) 1) "name"
2) "RedisCompat"
3) "ver"
4) (integer) 1
5) "path"
6) "/opt/redis-stack/lib/rediscompat.so"
7) "args"
8) (empty array)
3) 1) "name"
2) "ReJSON"
3) "ver"
4) (integer) 20803
5) "path"
6) "/opt/redis-stack/lib/rejson.so"
7) "args"
8) (empty array)
4) 1) "name"
2) "timeseries"
3) "ver"
4) (integer) 11202
5) "path"
6) "/opt/redis-stack/lib/redistimeseries.so"
7) "args"
8) (empty array)
5) 1) "name"
2) "bf"
3) "ver"
4) (integer) 20802
5) "path"
6) "/opt/redis-stack/lib/redisbloom.so"
7) "args"
8) (empty array)
6) 1) "name"
2) "redisgears_2"
3) "ver"
4) (integer) 20020
5) "path"
6) "/opt/redis-stack/lib/redisgears.so"
7) "args"
8) 1) "v8-plugin-path"
2) "/opt/redis-stack/lib/libredisgears_v8_plugin.so"
Closing due to inactivity, but happy to revisit if reproduceable.