Setting number_of_shards but couldn't resolve host


(Alice) #1

when I set the shards number, it throws such problem:
curl -XPUT 'l0.62.179.32:9200/my_index/pretty' -H 'Content-Type: application/json' -d'
{
"settings": {
"number_of_shards" : 2,
"number_of_replicas" : 0
}
}
'
curl: (6) Couldn't resolve host 'l0.62.179.32'

Could anyone give me some advice?


(Christian Dahlqvist) #2

Is the first character in the IP address a digit? It does not look like a 1.


(Alice) #3

Oh, Yeah. You are so smart. Thanks a lot.


(Alice) #4

But it still has the problem like this:
SZX1000355659:/home/2:9200/my_index/_settings?pretty' -H 'Content-Type: application/json' -d'

{
"number_of_shards" : 2,
"number_of_replicas" : 0
}'
{
"error" : {
"root_cause" : [
{
"type" : "remote_transport_exception",
"reason" : "[node-3][10.62.183.178:9302][indices:admin/settings/update]"
}
],
"type" : "illegal_argument_exception",
"reason" : "Can't update non dynamic settings [[index.number_of_shards]] for open indices [[my_index/QF5ARy2VQ6G0t8BzZEI86g]]"
},
"status" : 400
}


(Christian Dahlqvist) #5

Once an index has been created, you can not change the number of shards, only the number of replicas.


(Alice) #6

Thanks. If so, how we scale out the storage of primary shards?


(Christian Dahlqvist) #7

Let us keep this discussion to your other thread: How does the elasticsearch expand capacity and shrink capacity?


(Alice) #8

Ok, thanks a lot.


(system) #9

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