Overview
This node tests the connectivity and functionality of a Redis server using provided credentials. It is useful for verifying that your Redis instance is accessible, properly configured, and operational before running more complex workflows that depend on Redis.
Common scenarios include:
- Validating Redis connection settings during setup.
- Diagnosing connection or authentication issues with Redis.
- Checking basic Redis commands (PING).
- Testing read/write operations to ensure data can be stored and retrieved.
- Retrieving server information to confirm Redis version and status.
Practical examples:
- Running a "Basic Connection" test to quickly verify if the Redis server responds to PING.
- Performing a "Read/Write Test" to confirm that SET, GET, and DEL commands work as expected.
- Fetching "Server Info" to get details like Redis version, uptime, and operating system.
- Executing the "Complete Test" to run all above checks in one go.
Properties
| Name | Meaning |
|---|---|
| Test Type | Selects which test to perform: - 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 (basic, read/write, info) |
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: Type of connection used (e.g., connection string or host/port).connectionDetails: Summary of connection details (masked connection string or host:port).testType: The type of test performed.tests: An object with keys corresponding to each test run (basic,readwrite,serverInfo), each containing:status:"success"or"error".message: A human-readable message with success or failure indication.- Additional fields depending on the test:
- For basic:
result(usually "PONG"),responseTime(in ms). - For readwrite:
operationsshowing results of SET, GET, DEL commands. - For serverInfo:
infoobject with Redis server details such as version, mode, OS, process ID, TCP port, uptime.
- For basic:
overallStatus:"success"if all tests passed,"partial_success"if some failed.summary: A summary message indicating overall test result.
No binary data output is produced by this node.
Example output snippet:
{
"timestamp": "2024-06-01T12:00:00.000Z",
"connectionType": "connectionString",
"connectionDetails": "redis://user:***@localhost:6379",
"testType": "complete",
"tests": {
"basic": {
"status": "success",
"result": "PONG",
"responseTime": "15ms",
"message": "✅ Basic connection successful"
},
"readwrite": {
"status": "success",
"operations": {
"set": "OK",
"get": "connection_test_value",
"delete": 1
},
"message": "✅ Read/Write operations successful"
},
"serverInfo": {
"status": "success",
"info": {
"redis_version": "7.0.5",
"redis_mode": "standalone",
"os": "Linux 5.10.0-21-amd64 x86_64",
"process_id": "12345",
"tcp_port": "6379",
"uptime_in_seconds": "3600"
},
"message": "✅ Server info retrieved successfully"
}
},
"overallStatus": "success",
"summary": "✅ All tests passed successfully"
}
Dependencies
- Requires an active Redis server accessible via network.
- Requires valid Redis credentials including host, port, password, or a connection string.
- Uses the
ioredislibrary internally to connect and execute Redis commands. - Requires configuration of an API key credential for Redis connection in n8n.
Troubleshooting
Common Issues
- Connection refused: Redis server is not running or unreachable at specified host/port.
- Host not found: Incorrect hostname or IP address.
- Connection timeout: Network issues or firewall blocking access.
- Authentication required / Invalid password: Credentials are missing or incorrect.
- PING timeout: Redis server did not respond within 5 seconds.
Error Messages and Resolutions
"Failed to connect to Redis: ...": Check Redis server availability and credentials."Value mismatch: SET/GET failed": Indicates read/write operations failed; verify permissions and Redis health."Redis connection test failed: Connection refused.": Start Redis server or check network."Redis connection test failed: Host not found.": Verify hostname/IP."Redis connection test failed: Connection timeout.": Check network/firewall."Redis connection test failed: Authentication required.": Provide correct password."Redis connection test failed: Invalid password.": Correct the password in credentials.