{
  "schema_version": 2,
  "id": "develop/reference/errors/common/ask",
  "title": "ASK error",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/ask/",
  "summary": "The key's hash slot is moving to another cluster node, and the key may already be there.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "acf88e7116e75213a07c46917232919113173c6fc6ee8e731da9907156b7c635",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "A Redis cluster returns this error while a hash slot is moving from one node to another, for example, while you reshard the cluster. The key you asked for isn't on the node you sent the command to, so it may already be on the new node. The error gives the slot number and the new node's address:\n\n[code example]\n\nIn redis-py, this error is `AskError: 8000 127.0.0.1:6461`."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "During the move, the old node no longer has the key:\n\n[code example]"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "- **Your client doesn't support clusters.** Use a cluster client, which handles `ASK` errors for you, as it does [`MOVED`](https://redis.io/docs/latest/develop/reference/errors/common/moved) errors. In `redis-cli`, add the `-c` option.\n- **You handle redirects yourself.** Send [`ASKING`](https://redis.io/docs/latest/commands/asking) to the node in the error, and then send the command again to that node. Without `ASKING`, the new node replies with `MOVED` and points you back to the old node. Unlike with `MOVED`, don't update your map of the cluster. The slot still belongs to the old node until the move finishes, so send later commands to the old node first.\n\nSee [ASK redirection](https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec#ask-redirection) in the cluster specification."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "ASK 8000 127.0.0.1:6461",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "plaintext",
      "code": "> GET user:{42}:cart\n(error) ASK 8000 127.0.0.1:6461",
      "section_id": "example"
    }
  ]
}
