Org.elasticsearch.action.NoShardAvailableActionException in elasticsearch
When I try to publish multiple documents in an elastic search index, the below exception is thrown and the insert is incomplete.
org.elasticsearch.action.NoShardAvailableActionException
elasticsearch verion is used: elasticsearch-1.7.2
An exception:
Caused by: org.elasticsearch.action.NoShardAvailableActionException: [test_events_20170805][0] null
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.perform(TransportShardSingleOperationAction.java:175)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.start(TransportShardSingleOperationAction.java:155)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$TransportHandler.messageReceived(TransportShardSingleOperationAction.java:258)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$TransportHandler.messageReceived(TransportShardSingleOperationAction.java:240)
at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:222)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:114)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
Thanks in advance!
Below is my cluster health: curl -XGET ' http: // localhost: 9200 / _cluster / health? Pretty = true '
{
"cluster_name" : "test-services",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 377,
"active_shards" : 377,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 377,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0
}
Following is the index creation template
{
"template" : "test_events_*"
, "settings" : {
"analysis": {
"analyzer": {
"std_with_spaces": {
"type": "custom",
"tokenizer": "keyword",
"filter": ["lowercase", "asciifolding"]
}
}
}
, "number_of_shards" : 1
}
, "mappings" :
{ "TestEvent" : { "dynamic": "strict", "_meta" : { "authority": "com.test", "type": "published", "version": "1" }, "properties" : {
"aliasName" : { "type" : "string", "description" : "The aliasName is free text human readable name." }
, "description" : { "type" : "string", "description" : "The description is a free human readable text describing or naming the object." }
, "id" : { "type" : "string", "index" : "not_analyzed", "description" : "Master resource identifier" }
, "association" : { "type" : "string", "index" : "not_analyzed", "description" : "Contains links or IDs to associated documents and content." }
, "name" : { "type" : "string", "analyzer" : "std_with_spaces", "description" : "The name is any free human readable and possibly non unique text naming the object." }
, "tag" : { "type" : "string" }
, "recordDateTime" : { "type" : "date" }
, "systemOfRecord" : { "type" : "string", "analyzer" : "std_with_spaces" }
, "createdDateTime" : { "type" : "date" }
}}}
}
Below is a snippet of data input script:
PUT /website/blog/123 /* this might not be correct, written for an idea*/
{
"id": "EDE-1",
"description": "Just trying this out...",
"createdDateTime": "2017-08-28T02:12:21",
"recordDateTime": "2017-08-28T02:12:21",
"aliasName": "test",
"name": "test_name",
"association": "test_association",
"tag": "tag1",
"systemOfRecord": "record1"
}
Note: the data input snippet is the data layout I created. But in general, the data is passed to my application in a csv file. The app converts the csv data to a json object and inserts it into the stale index.
+1
source to share
No one has answered this question yet
See similar questions:
or similar: