Can't delete an ES index


(bowow) #1

I deleted an index from elasticsearch using the command
curl -XDELETE 'http://localhost:9200/twitter/'

and also from the elasticsearch-head plugin interface..however, that index pops up again and populates with data.
I also deleted the logtash config file from the directory. I am not sure why it's doing this?


(Christoph) #2

If it populates again with data you need to find the process that is feeding it. Most likely a logstash instance still running somewhere.


(bowow) #3

I also tried to shutdown the node in the elasticsearch-head plugin interface...it is not even shutting down that node?...I am not sure what's going here..


(bowow) #4

I used

curl -XPOST 'http://localhost:9200/_cluster/nodes/_shutdown'

to shutdown the node and

I get the following error:

{"error":{"root_cause":[{"type":"invalid_index_name_exception","reason":"Invalid index name [cluster], must not start with ''","index":"_cluster"}],"type":"invalid_index_name_exception","reason":"Invalid index name [cluster], must not start with ''","index":"_cluster"},"status":400}[root@mimbo bin]#

what's going on?


(Mark Walkom) #5

What version are you on?


(bowow) #6

I am using:
Logstash version: 2.3.4
Kibana version: 4.5.4
ES version: 2.3.5


(Mark Walkom) #7

_shutdown was removed in 2.X - https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_20_removed_features.html#_literal__shutdown_literal_api


(Chocolate9624) #8

How can I shudown es 2.X ?Thans!


(David Pilato) #9

CTRL+C
kill
service elasticsearch stop

It depends how you started it most likely


(Chocolate9624) #10

Thanks !
I can get the pid. However, this pid is changing dynamically. I can not kill this pid.


(David Pilato) #11

Store it. This is typically what service scripts are doing IIRC.


(Chocolate9624) #12

Thanks!


(system) #13