Redis Connection Test icon

Redis Connection Test

Test Redis connection and credentials

Overview

This node tests the connectivity and functionality of a Redis server using various test types. It is useful for verifying that your Redis credentials and connection details are correct and that the Redis server is accessible and operational. The node supports basic connectivity checks, read/write operations, retrieving server information, or running all these tests together.

Practical examples:

  • Quickly verify if your Redis instance is reachable before running workflows that depend on it.
  • Confirm that your Redis credentials have the necessary permissions to perform read/write operations.
  • Retrieve key server metadata such as version, mode, and uptime to monitor Redis health.

Properties

Name Meaning
Test Type Select the type of test to run:
- Basic Connection: Test basic Redis connection (PING)
- Read/Write Test: Test read/write operations (SET/GET/DEL)
- Server Info: Get Redis server information
- Complete Test: Run all tests above

Output

The node outputs a JSON object containing detailed results of the selected test(s). The structure includes:

  • timestamp: ISO string of when the test was run.
  • connectionType: How the connection was made (e.g., connection string or host/port).
  • connectionDetails: Sanitized connection info (password masked if present).
  • testType: The selected test type.
  • tests: An object with keys corresponding to each test performed (basic, readwrite, serverInfo), each containing:
    • status: "success" or "error".
    • message: A human-readable summary with success or failure icons.
    • Additional fields depending on the test:
      • For basic: result (usually "PONG"), responseTime in milliseconds.
      • For readwrite: Results of set, get, and delete operations.
      • For serverInfo: Parsed Redis server info like version, mode, OS, process ID, TCP port, and uptime.
  • overallStatus: "success" if all tests passed, "partial_success" if some failed.
  • summary: Summary message indicating overall test result.

No binary data output is produced by this node.

Dependencies

  • Requires an active Redis server accessible via provided credentials.
  • Needs an API key credential or equivalent authentication token configured in n8n for Redis access.
  • Uses the ioredis library internally to manage Redis connections and commands.

Troubleshooting

Common issues and error messages:

  • Connection refused: Indicates the Redis server is not running or unreachable at the specified host/port. Verify server status and network accessibility.
  • Host not found: The hostname or IP address is incorrect or DNS resolution failed. Check the connection details.
  • Connection timeout: Network issues or firewall blocking the connection. Ensure Redis port is open and reachable.
  • Authentication required / Invalid password: Credentials are missing or incorrect. Double-check the password or API key used.
  • PING timeout: The Redis server did not respond to the ping command within 5 seconds. This may indicate server overload or network latency.
  • Value mismatch in read/write test: The value retrieved from Redis does not match what was set, indicating possible permission issues or Redis misconfiguration.

To resolve errors, verify credentials, network settings, and Redis server health. Use the detailed error messages returned by the node to pinpoint the problem.

Links and References

Discussion