elasticsearch-reindex
elasticsearch-reindex copied to clipboard
Reindex fails - socket hang up on initial search
Node v5.7.1 Elasticsearch-reindex v1.1.14
Attempting to reindex from one index into another, using the following:
elasticsearch-reindex -f https://hostname.es.amazonaws.com/originalindex/log-type -t https://hostname.es.amazonaws.com/newindex/ index-script.js
Results in the following error:
Elasticsearch ERROR: 2016-08-11T15:37:35Z
Error: Request error, retrying
POST https://hostname.es.amazonaws.com/originalindex/NCSA-common-log-format/_search?search_type=scan&scroll=1m&size=100 => socket hang up
at Log.error (/temp/.nvm/versions/node/v5.7.1/lib/node_modules/elasticsearch-reindex/node_modules/elasticsearch/src/lib/log.js:225:56)
at checkRespForFailure (/temp/.nvm/versions/node/v5.7.1/lib/node_modules/elasticsearch-reindex/node_modules/elasticsearch/src/lib/transport.js:240:18)
at HttpConnector.
The same result if the last argument (the custom index script) is omitted.
Note the the URL being POSTed to in the log above is accessible via curl and returns
{ "_scroll_id": "somestuff==", "took": 17, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 176434, "max_score": 0, "hits": [] } }
+1
I have experienced the same and I think it may be an underlying elasticsearch.js issue. Possibly it's related to https://github.com/elastic/elasticsearch-js/issues/433. FWIW when I set --sniff_cluster false
I don't see these request errors anymore, so you may want to give that a try.
I'm experiencing the same, --sniff_cluster false as suggested above by @danpaz worked for me as well :+1:
👍 I'm also experiencing the same problem and setting --sniff_cluster false worked for me too.