{"record":{"id":"26b0c3b780a429a9","repo":"redis/jedis","slug":"cluster-slots-list-is-empty","errorCode":null,"errorMessage":"Cluster slots list is empty.","messagePattern":"Cluster slots list is empty\\.","errorType":"exception","errorClass":"JedisClusterOperationException","httpStatus":null,"severity":"error","filePath":"src/main/java/redis/clients/jedis/JedisClusterInfoCache.java","lineNumber":151,"sourceCode":"      slots.addAll(getAssignedSlotArray(slotInfo));\n    }\n    Collections.sort(slots);\n    if (slots.size() != Protocol.CLUSTER_HASHSLOTS) {\n      return false;\n    }\n    for (int i = 0; i < Protocol.CLUSTER_HASHSLOTS; ++i) {\n      if (i != slots.get(i)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  public void discoverClusterNodesAndSlots(Connection jedis) {\n    List<Object> slotsInfo = executeClusterSlots(jedis);\n    if (System.getProperty(INIT_NO_ERROR_PROPERTY) == null) {\n      if (slotsInfo.isEmpty()) {\n        throw new JedisClusterOperationException(\"Cluster slots list is empty.\");\n      }\n      if (!checkClusterSlotSequence(slotsInfo)) {\n        throw new JedisClusterOperationException(\"Cluster slots have holes.\");\n      }\n    }\n    w.lock();\n    try {\n      reset();\n      for (Object slotInfoObj : slotsInfo) {\n        List<Object> slotInfo = (List<Object>) slotInfoObj;\n\n        if (slotInfo.size() <= MASTER_NODE_INDEX) {\n          continue;\n        }\n\n        List<Integer> slotNums = getAssignedSlotArray(slotInfo);\n\n        // hostInfos","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/JedisClusterInfoCache.java#L133-L169","documentation":"Thrown by discoverClusterNodesAndSlots when CLUSTER SLOTS returns an empty list, meaning the Redis cluster cannot report any slot topology — typically the node is not part of an initialized cluster or cluster state is broken. Guarded by the INIT_NO_ERROR_PROPERTY system property used in tests.","triggerScenarios":"Thrown at src/main/java/redis/clients/jedis/JedisClusterInfoCache.java:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the cluster is properly created and all nodes joined (redis-cli cluster info shows cluster_state:ok)","Retry against a different seed node that has a populated slots view","Check network connectivity and that the contacted node is not a fresh/unassigned instance"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}