# Execute reindex and the task is not found

**URL:** https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414
**Category:** Elasticsearch
**Created:** [July 22, 2021, 4:40pm UTC](https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414 "2021-07-22T16:40:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![asasas234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asasas234/32/113152_2.png) [@asasas234](https://discuss.elastic.co/u/asasas234)
#### Post date: [July 22, 2021, 4:40pm UTC](https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414/1 "2021-07-22T16:40:44Z")

</div>

First I execute the reindex

```auto
POST _reindex?wait_for_completion=false
{
  "conflicts": "proceed",
  "source": {
    "index": "wh_crm_student_order_2020.11.09"
  },
  "dest": {
    "index": "wh_crm_student_order_new_2020.11.09",
    "version_type": "external"
  }
}

```

reindex will return me 1 task ID which is yXafjEXKSu65EXqOuquJzg:2194095

Then I found that I couldn't find out the details of the task by the following request, the whole .task index is

```auto
GET /.tasks/_doc/yXafjEXKSu65EXqOuquJzg:2194095

```

But when I execute the following request, I can find the task I'm executing in all the tasks in the whole cluster, but I can't check only this one task by task ID, I want to understand why this happens, this situation is occasional

```auto
GET /_tasks

```

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 23, 2021, 12:57am UTC](https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414/2 "2021-07-23T00:57:07Z")

</div>

Try

`GET /_tasks/<task_id>`

`GET /_tasks/yXafjEXKSu65EXqOuquJzg:2194095`

---

<div class="post-metadata">

### Author: ![asasas234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asasas234/32/113152_2.png) [@asasas234](https://discuss.elastic.co/u/asasas234)
#### Post date: [July 23, 2021, 2:16am UTC](https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414/3 "2021-07-23T02:16:19Z")

</div>

I tried it, my version is 7.4.2 and it returns the following

```auto
{
  "error": "Incorrect HTTP method for uri [/.tasks/yXafjEXKSu65EXqOuquJzg:2194095?pretty] and method [GET], allowed: [POST]",
  "status": 405
}

```

Need to use `GET /.tasks/_doc/yXafjEXKSu65EXqOuquJzg:2194095`

But this time, after I executed the reindex, I was able to get a new one by using `GET /.tasks/_doc/yXafjEXKSu65EXqOuquJzg:2194095` And did not check the task, But when the task is executed, after going to check, the task data can be successfully checked, I am wondering why this is?

Before the task is executed, I can be sure that the index .tasks is empty and there is no data

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 23, 2021, 2:25am UTC](https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414/4 "2021-07-23T02:25:00Z")

</div>

Same syntax in [7.4 Documents](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/tasks.html)

You tried what command are you still putting the `.` in the command?

In general accessing the `.` (system indices) directly is not generally a good idea / not a supported API use at your own risk.

Directly from the 7.4 docs...

### Task management API

The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible.

Returns information about the tasks currently executing in the cluster.

### Request

`GET /_tasks/<task_id>`

`GET /_tasks`

---

<div class="post-metadata">

### Author: ![asasas234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asasas234/32/113152_2.png) [@asasas234](https://discuss.elastic.co/u/asasas234)
#### Post date: [July 23, 2021, 2:40am UTC](https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414/5 "2021-07-23T02:40:37Z")

</div>

> [@stephenb](#):
>
> Returns information about the tasks currently executing in the cluster.

Oh, my bad. It should be \_tasks and I wrote it as .tasks 。。。

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 20, 2021, 2:41am UTC](https://discuss.elastic.co/t/execute-reindex-and-the-task-is-not-found/279414/6 "2021-08-20T02:41:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
