Showing posts with label curl. Show all posts
Showing posts with label curl. Show all posts
Saturday 9 April 2016
Monday 13 April 2015
Elasticseach - Shards allocation error
After follow the Guidelines from Elastic documentation. In
order to recover unassigned shard on TEST Env elasticsearch cluster. I
got this error..
" {"error":" RemoteTransportException[[node01][inet[/ipaddess: 9300]][cluster:admin/reroute]] ; nested: ElasticsearchIllegalArgumentEx ception[[allocate] trying to allocate a primary shard [.shardname1][0], which is disabled]; ","status":400} "
" {"error":"
Resolved with ...
"
#!/bin/bash
for shard in $(curl -XGET http://localhost:9200/_cat/shards | grep UNASSIGNED | awk '{print $2}'); do
# This have to be commented
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands": [
{
"allocate": {
"index": "index_name",
"shard": 1,
"node": "node1",
"allow_primary": true
}
}
]
}'
sleep 5
done
"
#!/bin/bash
for shard in $(curl -XGET http://localhost:9200/_cat/shards | grep UNASSIGNED | awk '{print $2}'); do
# This have to be commented
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands": [
{
"allocate": {
"index": "index_name",
"shard": 1,
"node": "node1",
"allow_primary": true
}
}
]
}'
sleep 5
done
"
:-) Dont worry I managed to fix it and re-assigned the shards ...
Subscribe to:
Posts (Atom)
Mastering Docker Minified Systems: A Step-by-Step Guide with Real Use Cases
Introduction Docker is a powerful platform for developing, shipping, and running applications. Minified Docker systems are optimized for siz...
-
How To Hide and unhide the hard disk Volumes using CMD Commands : First check how many drives are there in my computer and then s...
-
Issue: You go to activate Microsoft Office 2010 and you receive a message stating, “Your copy of Microsoft Office Professional Plus 2010 ca...
-
VMWare Workstation doesn't ship in a deb, so it isn't registered in dpkg (which is why you can't find it in the software center...