jprante / elasticsearch-knapsack

Knapsack plugin is an import/export tool for Elasticsearch
Apache License 2.0
472 stars 77 forks source link

Cannot abort stack exports #112

Open nanasta opened 8 years ago

nanasta commented 8 years ago

Hi, We use elasticsearch Version: 1.5.1 and elasticsearch-knapsack-1.5.2.0.jar When issuing following command there seems to be stack exports: curl -XPOST "http://localhost:9200/_export/state" {"count":20,"states":[{"mode":"export","started":"2016-03-31T17:56:02.036Z","path":"file:///tmp/zms_user_idx.201603311455.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T17:57:21.008Z","path":"file:///tmp/201603311457.zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:09:47.376Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:11:53.964Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:14:35.856Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:16:01.496Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:16:41.821Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:17:00.996Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:19:29.524Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:20:44.189Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:22:03.172Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:22:27.848Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:33:58.656Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:35:21.976Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:38:24.292Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:39:32.548Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:44:25.936Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:46:22.856Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:47:33.309Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"},{"mode":"export","started":"2016-03-31T18:48:43.600Z","path":"file:///tmp/zms_user_idx.zip","node_name":"lhvmsrv369"}]}

I want to kill all these exports. I am issuing: curl -XPOST 'http://localhost:9200/_export/abort' but I am getting: {"aborted":false}

Could you please inform me how i can terminate these exports? (curl -XPOST "http://localhost:9200/_export/state" should return {"count":0,"states":[]})

thanks

jprante commented 8 years ago

knapsack 1.5.2.0 is very old. Can you use latest for 1.5.2, i.e. 1.5.2.2 ?

The issue is harmless. If the files given in path are not changing, export is done. Maybe it's compatibility problem between Elasticsearch 1.5.1 and 1.5.2

nanasta commented 8 years ago

Thank you i will also try 1.5.2.2. We have developed an automation to export the index and importing it in another cluster and i am wondering if you know where this information regarding export state is stored. Is it stored inside an index or file?Is there a way to manually delete these entries?

thanks in advance

jprante commented 8 years ago

The knapsack state is written into the cluster state. Because cluster state API in 1.5 has changed a lot of times, it is possible there are some bugs. The entries are not persistent, so they should disappear with a cluster restart.