Home > front end >  Error during importing buld data into Elasticsearch
Error during importing buld data into Elasticsearch

Time:12-19

I'm new to Elasticsearch.

I tried to insert a large amount of data into Elasticsearch with the following command:

curl -H "Content-Type: application/json" -XPUT "127.0.0.1:9200/shakespeare/_bulk" --data-binary @shakespeare_8.0.json

But I get the following error:

{"index":{"_index":"shakespeare","_id":"111394","status":503,"error":{"type":"unavailable_shards_exception","reason":"[shakespeare][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[shakespeare][0]] containing [111396] requests]"}}}

What's wrong with it? Any idea?

CodePudding user response:

check your elasticsearch for the reason why that shard is not active.

for example:

yournodeaddress:9200/_cat/shards?v&h=index,shard,prirep,state,ip,node,store,unassigned.reason,unassigned.for,unassigned.details&s=state

check also if nodes are out of space, it might be blocking the assignment:

yournodeaddress:9200/_cat/nodes?v&s=ip&h=master,ip,name,uptime,disk.used,disk.total,cpu,load_1m,heap.max,heap.current,heap.percent

  • Related