redis/jedis · error · JedisClusterOperationException

Cluster slots list is empty.

Error message

Cluster slots list is empty.

What it means

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.

Solutions

  1. Verify the cluster is properly created and all nodes joined (redis-cli cluster info shows cluster_state:ok)
  2. Retry against a different seed node that has a populated slots view
  3. Check network connectivity and that the contacted node is not a fresh/unassigned instance
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/main/java/redis/clients/jedis/JedisClusterInfoCache.java:151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of redis/jedis@6dac31d4c2 (2026-09-08). Data as JSON: /api/errors/26b0c3b780a429a9. Report an issue: GitHub.

Appendix: source

Thrown at src/main/java/redis/clients/jedis/JedisClusterInfoCache.java:151

      slots.addAll(getAssignedSlotArray(slotInfo));
    }
    Collections.sort(slots);
    if (slots.size() != Protocol.CLUSTER_HASHSLOTS) {
      return false;
    }
    for (int i = 0; i < Protocol.CLUSTER_HASHSLOTS; ++i) {
      if (i != slots.get(i)) {
        return false;
      }
    }
    return true;
  }

  public void discoverClusterNodesAndSlots(Connection jedis) {
    List<Object> slotsInfo = executeClusterSlots(jedis);
    if (System.getProperty(INIT_NO_ERROR_PROPERTY) == null) {
      if (slotsInfo.isEmpty()) {
        throw new JedisClusterOperationException("Cluster slots list is empty.");
      }
      if (!checkClusterSlotSequence(slotsInfo)) {
        throw new JedisClusterOperationException("Cluster slots have holes.");
      }
    }
    w.lock();
    try {
      reset();
      for (Object slotInfoObj : slotsInfo) {
        List<Object> slotInfo = (List<Object>) slotInfoObj;

        if (slotInfo.size() <= MASTER_NODE_INDEX) {
          continue;
        }

        List<Integer> slotNums = getAssignedSlotArray(slotInfo);

        // hostInfos

View on GitHub (pinned to 6dac31d4c2)