[
https://issues.apache.org/jira/browse/SOLR-13383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16813251#comment-16813251
]
AntonyJohnson commented on SOLR-13383:
--------------------------------------
i have 3nodes in solr cluster
{code:java}
[Tue Apr 09 10:31:01 UTC root@hawkeye-common ~]# curl
'http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json'
{
"responseHeader":{
"status":0,
"QTime":2},
"cluster":{
"collections":{},
"live_nodes":["solr1-demotest.rbtest.skavard.com:8983_solr",
"solr2-demotest.rbtest.skavard.com:8983_solr",
"solr3-demotest.rbtest.skavard.com:8983_solr"]}}
{code}
this is the cmd which have used to create a collection
{code:java}
[Tue Apr 09 10:31:45 UTC root@hawkeye-common ~]# curl
"http://internal-stg-rbtest-demo74-solr-elb-918015379.us-east-1.elb.amazonaws.com:8983/solr/admin/collections?action=CREATE&name=my_collection_3&numShards=1&replicationFactor=3"
{
"responseHeader":{
"status":0,
"QTime":4693},
"success":{
"solr2-demotest.rbtest.skavard.com:8983_solr":{
"responseHeader":{
"status":0,
"QTime":3108},
"core":"my_collection_3_shard1_replica_n2"},
"solr1-demotest.rbtest.skavard.com:8983_solr":{
"responseHeader":{
"status":0,
"QTime":3140},
"core":"my_collection_3_shard1_replica_n4"},
"solr3-demotest.rbtest.skavard.com:8983_solr":{
"responseHeader":{
"status":0,
"QTime":3150},
"core":"my_collection_3_shard1_replica_n1"}},
"warning":"Using _default configset. Data driven schema functionality is
enabled by default, which is NOT RECOMMENDED for production use. To turn it
off: curl http://{host:port}/solr/my_collection_3/config -d
'{\"set-user-property\": {\"update.autoCreateFields\":\"false\"}}'"}
{code}
when i add 2 more servers into that cluster it will automatically added
{code:java}
[Tue Apr 09 10:36:08 UTC root@hawkeye-common ~]# curl
'http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json'
{
"responseHeader":{
"status":0,
"QTime":1},
"cluster":{
"collections":{
"my_collection_3":{
"pullReplicas":"0",
"replicationFactor":"3",
"shards":{"shard1":{
"range":"80000000-7fffffff",
"state":"active",
"replicas":{
"core_node3":{
"core":"my_collection_3_shard1_replica_n1",
"base_url":"http://solr3-demotest.rbtest.skavard.com:8983/solr",
"node_name":"solr3-demotest.rbtest.skavard.com:8983_solr",
"state":"active",
"type":"NRT",
"force_set_state":"false"},
"core_node5":{
"core":"my_collection_3_shard1_replica_n2",
"base_url":"http://solr2-demotest.rbtest.skavard.com:8983/solr",
"node_name":"solr2-demotest.rbtest.skavard.com:8983_solr",
"state":"active",
"type":"NRT",
"force_set_state":"false",
"leader":"true"},
"core_node6":{
"core":"my_collection_3_shard1_replica_n4",
"base_url":"http://solr1-demotest.rbtest.skavard.com:8983/solr",
"node_name":"solr1-demotest.rbtest.skavard.com:8983_solr",
"state":"active",
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
"maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
"znodeVersion":5,
"configName":"my_collection_3.AUTOCREATED"}},
"live_nodes":["10.42.3.159:8983_solr",
"solr1-demotest.rbtest.skavard.com:8983_solr",
"10.42.2.68:8983_solr",
"solr2-demotest.rbtest.skavard.com:8983_solr",
"solr3-demotest.rbtest.skavard.com:8983_solr"]}}
{code}
but the collection can't shared this is the problem here
> auto-scaling not working in solr7.4 - autoaddreplica
> ----------------------------------------------------
>
> Key: SOLR-13383
> URL: https://issues.apache.org/jira/browse/SOLR-13383
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: config-api
> Affects Versions: 7.4
> Environment: Production
> Reporter: AntonyJohnson
> Priority: Blocker
> Labels: performance
> Fix For: 7.4.1
>
> Attachments: 3collections.PNG
>
>
> We're able to create new server via auto-scaling for our solr cluster 7.4
> version. But the newly created server is not adding in our solr cluster
> automatically. Is there any settings or configurations we need to add in
> order to add the replica automatically in cluster for any collections.
> *commands used:*
> {code:java}
> curl
> "http://localhost:8983/solr/admin/collections?action=CREATE&name=my_collection_3&numShards=1&replicationFactor=3&autoAddReplicas=true"
> {code}
> Currently 3 nodes are in our cluster and i'm trying to add 4th nod but its
> not getting added in solr 7.4 version. The same scenario is working fine in
> solr 7.5 version.
> *scaling policy used:*
> {code:java}
> 1)
> curl http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> "set-cluster-policy" : [{
> "replica" : "1",
> "shard" : "#EACH",
> "node" : "#ANY",
> }]
> }'
> 2)###Node Added Trigger
> curl http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> "set-trigger": {
> "name" : "node_added_trigger",
> "event" : "nodeAdded",
> "waitFor" : "5s",
> "preferredOperation": "ADDREPLICA",
> "enabled" : true,
> "actions" : [
> {
> "name" : "compute_plan",
> "class": "solr.ComputePlanAction"
> },
> {
> "name" : "execute_plan",
> "class": "solr.ExecutePlanAction"
> }
> ]
> }
> }'
> 3)###Node Lost Trigger
> curl http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> "set-trigger": {
> "name" : "node_lost_trigger",
> "event" : "nodeLost",
> "waitFor" : "5s",
> "preferredOperation": "DELETENODE",
> "enabled" : true,
> "actions" : [
> {
> "name" : "compute_plan",
> "class": "solr.ComputePlanAction"
> },
> {
> "name" : "execute_plan",
> "class": "solr.ExecutePlanAction"
> }
> ]
> }
> }'
> {code}
> Note the same policy(2,3) not working in 7.4
> *Errors:*
> {code:java}
> [Mon Apr 08 11:52:00 UTC root@hawkeye-common ~]# curl
> http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> > "set-trigger": {
> > "name" : "node_added_trigger",
> > "event" : "nodeAdded",
> > "waitFor" : "5s",
> > "preferredOperation": "ADDREPLICA",
> > "enabled" : true,
> > "actions" : [
> > {
> > "name" : "compute_plan",
> > "class": "solr.ComputePlanAction"
> > },
> > {
> > "name" : "execute_plan",
> > "class": "solr.ExecutePlanAction"
> > }
> > ]
> > }
> > }'
> {
> "responseHeader":{
> "status":400,
> "QTime":5},
> "result":"failure",
> "WARNING":"This response format is experimental. It is likely to change in
> the future.",
> "error":{
> "metadata":[
> "error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject",
> "root-error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject"],
> "details":[{
> "set-trigger":{
> "name":"node_added_trigger",
> "event":"nodeAdded",
> "waitFor":"5s",
> "preferredOperation":"ADDREPLICA",
> "enabled":true,
> "actions":[{
> "name":"compute_plan",
> "class":"solr.ComputePlanAction"},
> {
> "name":"execute_plan",
> "class":"solr.ExecutePlanAction"}]},
> "errorMessages":["Error validating trigger config node_added_trigger:
> TriggerValidationException{name=node_added_trigger,
> details='{preferredOperation=unknown property}'}"]}],
> "msg":"Error in command payload",
> "code":400}}
> [Mon Apr 08 11:52:09 UTC root@hawkeye-common ~]#
> [Mon Apr 08 11:52:16 UTC root@hawkeye-common ~]# curl
> http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> > "set-trigger": {
> > "name" : "node_lost_trigger",
> > "event" : "nodeLost",
> > "waitFor" : "5s",
> > "preferredOperation": "DELETENODE",
> > "enabled" : true,
> > "actions" : [
> > {
> > "name" : "compute_plan",
> > "class": "solr.ComputePlanAction"
> > },
> > {
> > "name" : "execute_plan",
> > "class": "solr.ExecutePlanAction"
> > }
> > ]
> > }
> > }'
> {
> "responseHeader":{
> "status":400,
> "QTime":1},
> "result":"failure",
> "WARNING":"This response format is experimental. It is likely to change in
> the future.",
> "error":{
> "metadata":[
> "error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject",
> "root-error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject"],
> "details":[{
> "set-trigger":{
> "name":"node_lost_trigger",
> "event":"nodeLost",
> "waitFor":"5s",
> "preferredOperation":"DELETENODE",
> "enabled":true,
> "actions":[{
> "name":"compute_plan",
> "class":"solr.ComputePlanAction"},
> {
> "name":"execute_plan",
> "class":"solr.ExecutePlanAction"}]},
> "errorMessages":["Error validating trigger config node_lost_trigger:
> TriggerValidationException{name=node_lost_trigger,
> details='{preferredOperation=unknown property}'}"]}],
> "msg":"Error in command payload",
> "code":400}}
> {code}
> We're able to create new server via auto-scaling for our solr cluster 7.4
> version. But the newly created server is not adding in our solr cluster
> automatically. Is there any settings or configurations we need to add in
> order to add the replica automatically in cluster for any collections.
> commands used: curl
> "http://localhost:8983/solr/admin/collections?action=CREATE&name=my_collection_3&numShards=1&replicationFactor=3&autoAddReplicas=true"
> Currently 3 nodes are in our cluster and i'm trying to add 4th nod but its
> not getting added in solr 7.4 version. The same scenario is working fine in
> solr 7.5 version.
> scaling policy used:
> 1)
> curl http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> "set-cluster-policy" : [{
> "replica" : "1",
> "shard" : "#EACH",
> "node" : "#ANY",
> }]
> }'
> 2)###Node Added Trigger
> curl http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> "set-trigger": {
> "name" : "node_added_trigger",
> "event" : "nodeAdded",
> "waitFor" : "5s",
> "preferredOperation": "ADDREPLICA",
> "enabled" : true,
> "actions" : [
> {
> "name" : "compute_plan",
> "class": "solr.ComputePlanAction"
> },
> {
> "name" : "execute_plan",
> "class": "solr.ExecutePlanAction"
> }
> ]
> }
> }'
> 3)###Node Lost Trigger
> curl http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> "set-trigger": {
> "name" : "node_lost_trigger",
> "event" : "nodeLost",
> "waitFor" : "5s",
> "preferredOperation": "DELETENODE",
> "enabled" : true,
> "actions" : [
> {
> "name" : "compute_plan",
> "class": "solr.ComputePlanAction"
> },
> {
> "name" : "execute_plan",
> "class": "solr.ExecutePlanAction"
> }
> ]
> }
> }'
> Note the same policy(2,3) not working in 7.4
> Errors:
> {code:java}
> [Mon Apr 08 11:52:00 UTC root@hawkeye-common ~]# curl
> http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> > "set-trigger": {
> > "name" : "node_added_trigger",
> > "event" : "nodeAdded",
> > "waitFor" : "5s",
> > "preferredOperation": "ADDREPLICA",
> > "enabled" : true,
> > "actions" : [
> > {
> > "name" : "compute_plan",
> > "class": "solr.ComputePlanAction"
> > },
> > {
> > "name" : "execute_plan",
> > "class": "solr.ExecutePlanAction"
> > }
> > ]
> > }
> > }'
> {
> "responseHeader":{
> "status":400,
> "QTime":5},
> "result":"failure",
> "WARNING":"This response format is experimental. It is likely to change in
> the future.",
> "error":{
> "metadata":[
> "error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject",
> "root-error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject"],
> "details":[{
> "set-trigger":{
> "name":"node_added_trigger",
> "event":"nodeAdded",
> "waitFor":"5s",
> "preferredOperation":"ADDREPLICA",
> "enabled":true,
> "actions":[{
> "name":"compute_plan",
> "class":"solr.ComputePlanAction"},
> {
> "name":"execute_plan",
> "class":"solr.ExecutePlanAction"}]},
> "errorMessages":["Error validating trigger config node_added_trigger:
> TriggerValidationException{name=node_added_trigger,
> details='{preferredOperation=unknown property}'}"]}],
> "msg":"Error in command payload",
> "code":400}}
> [Mon Apr 08 11:52:09 UTC root@hawkeye-common ~]#
> [Mon Apr 08 11:52:16 UTC root@hawkeye-common ~]# curl
> http://localhost:8983/solr/admin/autoscaling -H
> 'Content-type:application/json' -d '{
> > "set-trigger": {
> > "name" : "node_lost_trigger",
> > "event" : "nodeLost",
> > "waitFor" : "5s",
> > "preferredOperation": "DELETENODE",
> > "enabled" : true,
> > "actions" : [
> > {
> > "name" : "compute_plan",
> > "class": "solr.ComputePlanAction"
> > },
> > {
> > "name" : "execute_plan",
> > "class": "solr.ExecutePlanAction"
> > }
> > ]
> > }
> > }'
> {
> "responseHeader":{
> "status":400,
> "QTime":1},
> "result":"failure",
> "WARNING":"This response format is experimental. It is likely to change in
> the future.",
> "error":{
> "metadata":[
> "error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject",
> "root-error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject"],
> "details":[{
> "set-trigger":{
> "name":"node_lost_trigger",
> "event":"nodeLost",
> "waitFor":"5s",
> "preferredOperation":"DELETENODE",
> "enabled":true,
> "actions":[{
> "name":"compute_plan",
> "class":"solr.ComputePlanAction"},
> {
> "name":"execute_plan",
> "class":"solr.ExecutePlanAction"}]},
> "errorMessages":["Error validating trigger config node_lost_trigger:
> TriggerValidationException{name=node_lost_trigger,
> details='{preferredOperation=unknown property}'}"]}],
> "msg":"Error in command payload",
> "code":400}}
> {code}
> if any new sever added into that cluster the data(collection) must be added
> as a replica in that cluster.[AddReplica Automatically added in version 7.5]
> https://i.stack.imgur.com/DgEbL.png
> Kindly help me to resolve this case.
> I need a exact trigger which will perform a AutoAddReplica Action
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]