Dual indices on one box? Elasticsearch 1.5.0


(Asrozar) #1

Hello all,
I'm having this weird status of green on a single elasticsearch box. There are two instances running and have created two node directories in the indices directory 0 and 1.

I'm using monit to make sure daemons stay up, so I'm assuming that monit has started both daemons. What is the proper way to stop one of the processes (short of kill pid) and move all the data back to node 0. I think this may be causing another issue I've experienced at this discussion Why is my status red? 0 relocating_shards, 0 initializing_shards, and 0 number_of_pending_tasks.

Here are two daemons running:

ps -ef | grep elasticsearch

496       1181     1  6 Jul13 ?        01:20:21 /usr/bin/java -Xms8g -Xmx8g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Delasticsearch -Des.pidfile=/var/run/elasticsearch/elasticsearch.pid -Des.path.home=/usr/share/elasticsearch -cp :/usr/share/elasticsearch/lib/elasticsearch-1.5.0.jar:/usr/share/elasticsearch/lib/*:/usr/share/elasticsearch/lib/sigar/* -Des.default.path.home=/usr/share/elasticsearch -Des.default.path.logs=/var/log/elasticsearch -Des.default.path.data=/opt/elasticsearch/data -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/etc/elasticsearch org.elasticsearch.bootstrap.Elasticsearch
496       1442     1  6 Jul13 ?        01:15:29 /usr/bin/java -Xms8g -Xmx8g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Delasticsearch -Des.pidfile=/var/run/elasticsearch/elasticsearch.pid -Des.path.home=/usr/share/elasticsearch -cp :/usr/share/elasticsearch/lib/elasticsearch-1.5.0.jar:/usr/share/elasticsearch/lib/*:/usr/share/elasticsearch/lib/sigar/* -Des.default.path.home=/usr/share/elasticsearch -Des.default.path.logs=/var/log/elasticsearch -Des.default.path.data=/opt/elasticsearch/data -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/etc/elasticsearch org.elasticsearch.bootstrap.Elasticsearch

(Mark Walkom) #2

Use shard filtering (eg with the node name) to migrate the shards from one index to the other, then shut the empty one down.

Also look at applying node.max_local_storage_nodes.


(system) #3