redisai Client password/auth process

Viewed 175

I am trying to connect to a redisai server through the redisai-py Client. The server is password protected and the Client is passed host, port, and password as arguments. However, the client times out on a tensorset/get even though it returns a connection object.

import redisai
r = redisai.Client(host='<host>', port=<port>, password='<password>')

in redis-cli, you would

redis-cli
auth <password>
...

which works just fine. There doesn't seem to be a way to perform this action through a redisai-py Client despite it extending the StrictRedis class. Since the Client won't connect without authentication, I cannot access the data.

1 Answers

The solution to accessing the redisai database involved creating inbound port rules focused directly around the VNet the Azure VM nodes were located on.

When connecting with redisai Client, the private IP address is used and the argument for port is left out.

import redisai

r = redisai.Client(host=<Private IP>)
r.ping()
# PONG

The primary node inbound port rules: primary_node_inbound_port_rules

Worker inbound port rule: worker_inbound_port_rule

However, this does not solve the issue around the client hanging and providing authentication when the redisai database is exposed but requires a password.

Related