I want to use livekit-server with redis-sentinel b...
# ask-ai
l
I want to use livekit-server with redis-sentinel but I got an error on start :
Copy code
could not list nodes: ERR unknown command 'hvals', with args beginning with: 'nodes'
t
Thanks for reaching out, Hugo. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like you’re encountering the error
ERR unknown command 'hvals'
because a data command like
HVALS
is being sent directly to a Redis Sentinel node instead of a Redis master or replica. Just to clarify, Sentinel nodes are designed for monitoring and managing failover—they don’t handle data commands. To help you fix this, please make sure your LiveKit server is set up properly to work with Redis Sentinel: 1. In your
config.yaml
, try removing the
address
field under the
redis
section. Instead, specify
sentinel_master_name
and
sentinel_addresses
. Here’s an example:
Copy code
redis:
  sentinel_master_name: livekit
  sentinel_addresses:
    - livekit-redis-node-0.livekit-redis-headless:26379
    - livekit-redis-node-1.livekit-redis-headless:26379
Make sure that the
sentinel_master_name
exactly matches the name your master Redis instance is registered under in Sentinel (like
livekit
in this example). Also, a few additional tips: • Avoid sending data commands directly to Sentinel nodes—they’re not meant for that. Always use the Redis master node for data queries. • You can test connectivity to Sentinel nodes with
redis-cli
and check the master’s address by running
SENTINEL get-master-addr-by-name
. • To get more insight, consider enabling debug logging in LiveKit by setting
logging.level: debug
in your configuration. This will show detailed Redis connection logs. If you have any questions or run into other issues, please don’t hesitate to reach out—I’m here to help! Sources: cmd/server/main.go | redis/redis.go