Can anyone tell me if in the daemon script of elasticsearch in the deb
package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate
elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of elastic search (without deb package)
To everything work as expected when I bring the clusters back, I have to
perform an API shutdown in all nodes (I do a flush before it, but just to
make sure, I don't think it's necessary)
And then everything works fine when I start the nodes again.
But if kill any (or all) of the nodes, I usually get a missing shard when I
bring the cluster back.
I investigated a little bit in the /etc/init.d/elasticsearch script and
stop doesn't seem to do that:
stop)
log_daemon_msg "Stopping $DESC"
set +e
if [ -f "$PID_FILE" ]; then
start-stop-daemon --stop --pidfile "$PID_FILE" \
--user "$ES_USER" \
--retry=TERM/20/KILL/5 >/dev/null
if [ $? -eq 1 ]; then
log_progress_msg "$DESC is not running but pid file
exists, cleaning up"
elif [ $? -eq 3 ]; then
PID="cat $PID_FILE"
log_failure_msg "Failed to stop $DESC (pid $PID)"
exit 1
fi
rm -f "$PID_FILE"
else
log_progress_msg "(not running)"
fi
log_end_msg 0
set -e
Can anyone tell me if in the daemon script of elasticsearch in the deb package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of Elasticsearch (without deb package)
To everything work as expected when I bring the clusters back, I have to perform an API shutdown in all nodes (I do a flush before it, but just to make sure, I don't think it's necessary)
Can anyone tell me if in the daemon script of elasticsearch in the deb
package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate
elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of Elasticsearch (without deb package)
To everything work as expected when I bring the clusters back, I have to
perform an API shutdown in all nodes (I do a flush before it, but just to
make sure, I don't think it's necessary)
And then everything works fine when I start the nodes again.
But if kill any (or all) of the nodes, I usually get a missing shard when
I bring the cluster back.
I investigated a little bit in the /etc/init.d/elasticsearch script and
stop doesn't seem to do that:
stop)
log_daemon_msg "Stopping $DESC"
set +e
if [ -f "$PID_FILE" ]; then
start-stop-daemon --stop --pidfile "$PID_FILE" \
--user "$ES_USER" \
--retry=TERM/20/KILL/5 >/dev/null
if [ $? -eq 1 ]; then
log_progress_msg "$DESC is not running but pid
file exists, cleaning up"
elif [ $? -eq 3 ]; then
PID="cat $PID_FILE"
log_failure_msg "Failed to stop $DESC (pid $PID)"
exit 1
fi
rm -f "$PID_FILE"
else
log_progress_msg "(not running)"
fi
log_end_msg 0
set -e
Can anyone tell me if in the daemon script of elasticsearch in the deb
package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate
elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of Elasticsearch (without deb package)
To everything work as expected when I bring the clusters back, I have to
perform an API shutdown in all nodes (I do a flush before it, but just to
make sure, I don't think it's necessary)
And then everything works fine when I start the nodes again.
But if kill any (or all) of the nodes, I usually get a missing shard when
I bring the cluster back.
I investigated a little bit in the /etc/init.d/elasticsearch script and
stop doesn't seem to do that:
stop)
log_daemon_msg "Stopping $DESC"
set +e
if [ -f "$PID_FILE" ]; then
start-stop-daemon --stop --pidfile "$PID_FILE" \
--user "$ES_USER" \
--retry=TERM/20/KILL/5 >/dev/null
if [ $? -eq 1 ]; then
log_progress_msg "$DESC is not running but pid
file exists, cleaning up"
elif [ $? -eq 3 ]; then
PID="cat $PID_FILE"
log_failure_msg "Failed to stop $DESC (pid $PID)"
exit 1
fi
rm -f "$PID_FILE"
else
log_progress_msg "(not running)"
fi
log_end_msg 0
set -e
Can anyone tell me if in the daemon script of elasticsearch in the deb package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of Elasticsearch (without deb package)
To everything work as expected when I bring the clusters back, I have to perform an API shutdown in all nodes (I do a flush before it, but just to make sure, I don't think it's necessary)
Can anyone tell me if in the daemon script of elasticsearch in the deb
package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate
elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of Elasticsearch (without deb package)
To everything work as expected when I bring the clusters back, I have to
perform an API shutdown in all nodes (I do a flush before it, but just to
make sure, I don't think it's necessary)
And then everything works fine when I start the nodes again.
But if kill any (or all) of the nodes, I usually get a missing shard
when I bring the cluster back.
I investigated a little bit in the /etc/init.d/elasticsearch script and
stop doesn't seem to do that:
stop)
log_daemon_msg "Stopping $DESC"
set +e
if [ -f "$PID_FILE" ]; then
start-stop-daemon --stop --pidfile "$PID_FILE" \
--user "$ES_USER" \
--retry=TERM/20/KILL/5 >/dev/null
if [ $? -eq 1 ]; then
log_progress_msg "$DESC is not running but pid
file exists, cleaning up"
elif [ $? -eq 3 ]; then
PID="cat $PID_FILE"
log_failure_msg "Failed to stop $DESC (pid $PID)"
exit 1
fi
rm -f "$PID_FILE"
else
log_progress_msg "(not running)"
fi
log_end_msg 0
set -e
I probably used kill -9 (SIGKILL) option when I got the missing shard.
or SIGINT.
Not sure if it's possible to get this error with SIGTERM. (Actually, I really don't think so.)
Question: Where you still indexing when you killed ES?
On Thu, Aug 30, 2012 at 7:31 AM, David Pilato david@pilato.fr wrote:
I never lose a shard when I killed ES or used the service elasticsearch stop command.
I don't understand why you have a missing shard each time.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Can anyone tell me if in the daemon script of elasticsearch in the deb package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of Elasticsearch (without deb package)
To everything work as expected when I bring the clusters back, I have to perform an API shutdown in all nodes (I do a flush before it, but just to make sure, I don't think it's necessary)
Can anyone tell me if in the daemon script of elasticsearch in the deb
package do the "stop" option works like it's done when I perform a kill?
I worried about this, because almost everytime I use kill to terminate
elasticsearch, I come back with a missing shard. =/
I am talking about a hard install of Elasticsearch (without deb
package)
To everything work as expected when I bring the clusters back, I have
to perform an API shutdown in all nodes (I do a flush before it, but just
to make sure, I don't think it's necessary)
And then everything works fine when I start the nodes again.
But if kill any (or all) of the nodes, I usually get a missing shard
when I bring the cluster back.
I investigated a little bit in the /etc/init.d/elasticsearch script and
stop doesn't seem to do that:
stop)
log_daemon_msg "Stopping $DESC"
set +e
if [ -f "$PID_FILE" ]; then
start-stop-daemon --stop --pidfile "$PID_FILE" \
--user "$ES_USER" \
--retry=TERM/20/KILL/5 >/dev/null
if [ $? -eq 1 ]; then
log_progress_msg "$DESC is not running but pid
file exists, cleaning up"
elif [ $? -eq 3 ]; then
PID="cat $PID_FILE"
log_failure_msg "Failed to stop $DESC (pid
$PID)"
exit 1
fi
rm -f "$PID_FILE"
else
log_progress_msg "(not running)"
fi
log_end_msg 0
set -e
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.