elasticsearch/elasticsearch — Issue #1770: RemoteTransportException on _analyze request to specific index
Author: outoftime
Created: 2012-03-08 15:45:50+00:00
State: open

When routing an `_analyze` request to a specific index, we'll see a `RemoteTransportException` intermittently:

{
"error" : "RemoteTransportException[[Wiccan][inet[/10.60.121.149:9301]][indices/analyze/s]]; nested: IOException[Expected handle header, got [101]]; ",
"status" : 500
}

We were able to reproduce with the following cluster characteristics:

* `index.number_of_shards` set to 1
* At least three nodes in the cluster

Sending the analyze request to all three nodes, at least one of them will fail.

Here's a full reduction ([link](https://raw.github.com/gist/2001546/9fe1435ec53ea298eb83d3e9d40d290427e1c537/analyzer-error.sh)):

pkill -f $(pwd)
for i in {0..2}
do
bin/elasticsearch
done
echo -n "waiting for cluster to come up"
until curl -s localhost:9200/_cluster/health?wait_for_status=green > /dev/null
do
echo -n '.'
sleep 1
done
echo ''

curl -XDELETE localhost:9200?pretty=true
echo ''
curl -XPUT localhost:9200/test?pretty=true -d '{"index":{"number_of_shards":1}}'
echo ''
sleep 5
for i in {0..2}
do
curl "localhost:920$i/test/_analyze?pretty=true&text=test"
echo ''
done