23

I am trying to reindex using following line:

POST _reindex
{
  "source": {
    "index": "poi_201705"
  },
  "dest": {
    "index": "poi_dev_2"
  }
}

But I am getting following error in kibana console:

{
  "statusCode": 504,
  "error": "Gateway Time-out",
  "message": "Client request timeout"
}

Can anybody tell me what is this issue and how can get rid of it.

S S
  • 1,443
  • 2
  • 12
  • 42

2 Answers2

55

504 simply means that the request is still running but the HTTP connection from Kibana to ES timed out.

You can still see the request going on by using the task management API like this:

GET _tasks?actions=*reindex&detailed

If you want to run the task asynchronously you can also do it with the following command:

POST _reindex?wait_for_completion=false

This will return a task id whose progress can then be checked with:

GET _tasks/<task-id>
Val
  • 207,596
  • 13
  • 358
  • 360
  • yes the request is still running. But I check using _cat?indices. my source store.size of poi_201705 832.7mb but store.size of poi_dev_2 is 824.2mb while docs.count remain same – S S Aug 15 '18 at 04:36
  • 1
    which is normal right? since you reindex the source index into the destination index, the document count will be the same in both indices (provided that the destination index was initially empty). Don't worry about the store size, that's not a relevant figure, only the doc count matters – Val Aug 15 '18 at 04:38
  • will have questions soon. I am just a newbie in elasticsearch – S S Aug 15 '18 at 04:47
  • 1
    Thanks for the answer. Could you please update with `POST _reindex?wait_for_completion=false` in order to run task async at the first place? – Anton Mar 01 '22 at 13:27
  • 2
    @Anton good idea, done! – Val Mar 01 '22 at 13:47
  • I am facing the same problem, but on a _search query. Using the GET _tasks returns only a json with a key: `nodes` and nothing more. Is there a solution for this? – Alexandru DuDu Apr 28 '22 at 09:18
  • @AlexandruDuDu please create a question for your issue – Val Apr 28 '22 at 10:57
-1

you need to check index management part in kibana. Your index already started to create :)

Musab Dogan
  • 1,811
  • 1
  • 6
  • 8