{"record":{"id":"1b6e22e166ea6634","repo":"apache/druid","slug":"invalid-port-in-s","errorCode":null,"errorMessage":"Invalid port in %s","messagePattern":"Invalid port in (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java","lineNumber":59,"sourceCode":"  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());\n      poolConfig.setMaxIdle(config.getMaxIdleConnections());\n      poolConfig.setMinIdle(config.getMinIdleConnections());\n\n      JedisCluster cluster = new JedisCluster(\n          nodes,\n          buildClientConfig(config, 0),\n          config.getCluster().getMaxRedirection(),\n          poolConfig","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java#L41-L77","documentation":"RedisCacheFactory.create found a cluster node entry whose port portion is not a valid integer (or the port substring is missing/empty). Each node in the cluster 'nodes' config must be host:port with a numeric port; a bad port makes the node unusable, so an IAE naming the offending node is thrown.","triggerScenarios":"Thrown at extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheFactory.java:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the port in the druid.cache.cluster.nodes config; ports must be numeric (typically 6379 or 16379 for TLS).","Check for typos such as host: or host:abc or copy-pasted whitespace.","Validate all node entries parse to a valid port range (1-65535) before applying the config."],"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"}