1. Knowledge Base
  2. Enterprise self-hosting

Troubleshooting Redis

We require that your Redis instance is running in cluster mode. To verify if a Redis instance is running in cluster mode, you can use the CLUSTER INFO command in the Redis command-line interface (CLI) or a Redis client library. Here are the steps you can follow:

  1. Open a Redis command-line interface or use a Redis client library to connect to the Redis instance you want to check.

  2. Run the CLUSTER INFO command by typing CLUSTER INFO in the CLI or using the appropriate method in your client library. This command returns information about the Redis cluster, including the number of nodes, the cluster state, and other configuration details.

  3. Check the cluster_state value in the output. If the value is ok, then the Redis instance is running in cluster mode. If the value is fail, then the cluster is not currently functioning correctly and may require further investigation.

Here's an example of the output you might see when running the CLUSTER INFO command:

cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:1
cluster_stats_messages_sent:2452
cluster_stats_messages_received:4109

Redis URL

Here are some troubleshooting steps you can perform to debug a Redis url:

  1. Check the syntax: Make sure that the URL is properly formatted with the correct syntax. Redis URLs typically start with redis://, followed by the hostname and port number.

  2. Check the hostname: Ensure that the hostname in the connection string is correct and resolvable. Try pinging the hostname from your within the host and container to ensure that it is accessible from your system.

  3. Check the port number: Verify that the port number in the connection string matches the port number that Redis is listening on. By default, Redis listens on port 6379.

  4. Check the authentication details: If your Redis instance is configured to require authentication, make sure that the password in the connection string is correct. You can test authentication by connecting to the Redis instance with a Redis client tool.

  5. Check the firewall: Ensure that your firewall is not blocking the Redis port. If you're connecting to a remote Redis instance, make sure that the appropriate firewall rules are in place.

  6. Check the Redis logs: Check the Redis logs for any errors or warnings that may be related to the connection issue. The Redis logs are typically located in the /var/log/redis/ directory.

  7. Test the connection: Try connecting to the Redis instance with a Redis client tool, such as the redis-cli command-line tool or a GUI tool like Redis Desktop Manager. This can help you identify any issues with the connection string or with the Redis instance itself.

Redis TLS

If you require your connections between nodes to use TLS please be sure to use Redis 7.0 or higher and you have modified your .conf file. More details can be found at https://redis.io/docs/management/security/encryption