apache/druid · error · IllegalArgumentException
Invalid redis cluster configuration
Error message
Invalid redis cluster configuration: %s
What it means
RedisCacheFactory.create rejected a cluster node string that lacks a host:port separator (or has an empty host/port). While parsing the comma-separated cluster 'nodes' config each entry must be of the form host:port; a malformed entry cannot become a HostAndPort, so the factory raises an IAE naming the bad node string.
Solutions
- Fix the druid.cache.cluster.nodes config so every entry is host:port (e.g. redis1:6379,redis2:6379).
- Remove empty entries or trailing commas from the node list.
- Validate the nodes string before deployment; split on commas and check each contains exactly one colon with non-empty parts.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java:51 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/bed924b278064d25.
Report an issue: GitHub.
Appendix: source
Thrown at extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java:51
import redis.clients.jedis.SslVerifyMode;
import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;
public class RedisCacheFactory
{
public static Cache create(final RedisCacheConfig config)
{
if (config.getCluster() != null && StringUtils.isNotBlank(config.getCluster().getNodes())) {
Set<HostAndPort> nodes = Arrays.stream(config.getCluster().getNodes().split(","))
.map(String::trim)
.filter(StringUtils::isNotBlank)
.map(hostAndPort -> {
int index = hostAndPort.indexOf(':');
if (index <= 0 || index == hostAndPort.length()) {
throw new IAE("Invalid redis cluster configuration: %s", hostAndPort);
}
int port;
try {
port = Integer.parseInt(hostAndPort.substring(index + 1));
}
catch (NumberFormatException e) {
throw new IAE("Invalid port in %s", hostAndPort);
}
if (port <= 0 || port > 65535) {
throw new IAE("Invalid port in %s", hostAndPort);
}
return new HostAndPort(hostAndPort.substring(0, index), port);
}).collect(Collectors.toSet());
ConnectionPoolConfig poolConfig = new ConnectionPoolConfig();
poolConfig.setMaxTotal(config.getMaxTotalConnections());View on GitHub (pinned to 9b90983fd2)