redis-field-engineering / redis-sql-trino

Real-time Indexed SQL Queries for Redis
MIT License
34 stars 4 forks source link

Connection fails with Redis servers that don't support `HELLO` command #7

Closed jruaux closed 1 year ago

jruaux commented 1 year ago

Reported by @antonum: Trying to run Redis-SQL with Redis Cloud. URL and Password are passed to fieldengineering/redis-sql container as environment:

Trino container eventually fails with:

trino  | 1) [Guice/ErrorInCustomProvider]: RedisConnectionException: Unable to connect to myinstance.com/<unresolved>:10467
trino  |   at RediSearchClientModule.createRediSearchSession(RediSearchClientModule.java:53)
trino  |   while locating RediSearchSession

At the same time when connecting to that Redis Cloud instance with MONITOR - it shows that the client sends the following:

23:57:20.569 [0 1.2.3.4:52420] "HELLO" "3" "AUTH" "default" "XXXXXX"
antonum commented 1 year ago

The change doesn't include the container ENVs. I've updated redisearch.properties.template and setup.sh to include REDISEARCH_RESP2 and rebuild of the image locally.

For some reason, it is now complaining about the username being empty, so I had to specify REDISEARCH_USERNAME=default. With the explicit username and REDISEARCH_RESP2=true trino successfully starts and is able to connect to Redis Cloud.