ES 2.4 unable to create new index


(fletch) #1

I ran a curl script to create a new index on an existing happy cluster, and found that the shards don't seem to have been allocated. Got the below error when I tried to index a document against the new index.

$ curl -XPOST "d0schpr003.homeadvisor.com:9200/sp-sweeper/sp-sweeper-info/1?routing=816382" -d '{ "spId": 816382, "affiliateUserId": 20163249, "spSweeperPct": 10.0, "affiliateSweeperPct": 0.0 }'

{"error":{"root_cause":[{"type":"unavailable_shards_exception","reason":"[sp-sweeper-a][2] primary shard is not active Timeout: [1m], request: [index {[sp-sweeper][sp-sweeper-info][1], source[{ \"spId\": 816382, \"affiliateUserId\": 20163249, \"spSweeperPct\": 10.0, \"affiliateSweeperPct\": 0.0 }]}]"}],"type":"unavailable_shards_exception","reason":"[sp-sweeper-a][2] primary shard is not active Timeout: [1m], request: [index {[sp-sweeper][sp-sweeper-info][1], source[{ \"spId\": 816382, \"affiliateUserId\": 20163249, \"spSweeperPct\": 10.0, \"affiliateSweeperPct\": 0.0 }]}]"},"status":503}

(fletch) #2

despite the "Timeout" in the error message, when I finally got around to checking the ElasticSearch master node's log file I see:

[2018-01-30 09:14:39,471][WARN ][cluster.action.shard     ] [d0schpr003-node2-master] [sp-sweeper-b][1] received shard failed for target shard [[sp-sweeper-b][1], node[oezV0XSISzaZLtn9NSm2ag], [P], v[1], s[INITIALIZING], a[id=4Epov2YZTY-xyXKWuo_xQg], unassigned_info[[reason=INDEX_CREATED], at[2018-01-30T16:14:39.397Z]]], indexUUID [KJLGaD5HQ_-g-wQyCOqQXg], message [failed to create shard], failure [ElasticsearchException[failed to create shard]; nested: ElasticsearchParseException[Failed to parse setting [index.refresh_interval] with value [1] as a time value: unit is missing or unrecognized]; ]
[sp-sweeper-b][[sp-sweeper-b][1]] ElasticsearchException[failed to create shard]; nested: ElasticsearchParseException[Failed to parse setting [index.refresh_interval] with value [1] as a time value: unit is missing or unrecognized];

Looks like I just needed to change "1" to "1s" for the refresh_interval. doh!


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.