{"record":{"id":"bed924b278064d25","repo":"apache/druid","slug":"invalid-redis-cluster-configuration-s","errorCode":null,"errorMessage":"Invalid redis cluster configuration: %s","messagePattern":"Invalid redis cluster configuration: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java","lineNumber":51,"sourceCode":"import redis.clients.jedis.SslVerifyMode;\n\nimport java.util.Arrays;\nimport java.util.Set;\nimport java.util.stream.Collectors;\n\npublic class RedisCacheFactory\n{\n  public static Cache create(final RedisCacheConfig config)\n  {\n    if (config.getCluster() != null && StringUtils.isNotBlank(config.getCluster().getNodes())) {\n\n      Set<HostAndPort> nodes = Arrays.stream(config.getCluster().getNodes().split(\",\"))\n                                     .map(String::trim)\n                                     .filter(StringUtils::isNotBlank)\n                                     .map(hostAndPort -> {\n                                       int index = hostAndPort.indexOf(':');\n                                       if (index <= 0 || index == hostAndPort.length()) {\n                                         throw new IAE(\"Invalid redis cluster configuration: %s\", hostAndPort);\n                                       }\n\n                                       int port;\n                                       try {\n                                         port = Integer.parseInt(hostAndPort.substring(index + 1));\n                                       }\n                                       catch (NumberFormatException e) {\n                                         throw new IAE(\"Invalid port in %s\", hostAndPort);\n                                       }\n                                       if (port <= 0 || port > 65535) {\n                                         throw new IAE(\"Invalid port in %s\", hostAndPort);\n                                       }\n\n                                       return new HostAndPort(hostAndPort.substring(0, index), port);\n                                     }).collect(Collectors.toSet());\n\n      ConnectionPoolConfig poolConfig = new ConnectionPoolConfig();\n      poolConfig.setMaxTotal(config.getMaxTotalConnections());","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java#L33-L69","documentation":"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.","triggerScenarios":"Thrown at extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}