Error while trying to index doc on replica
I have a collection that has only one shard. There are two nodes of this shard, a leader and a replica. When trying to index a doc to the leader, everything goes OK: POST xx.x.xx.x/solr/ds_target/update?commit=true { "add": { "doc": { "key1": "value1", "key2": "value2" } } } and get the response: 093 Then i try the same on th replica: POST yy.y.y.y/solr/ds_target/update?commit=true { "add": { "doc": { "key1": "value1", "key2": "value2" } } } response: { "responseHeader": { "status": 500, "QTime": 7754 }, "error": { "msg": "Server at http://172.0.17.180:80/solr/ds_target returned non ok status:500, message:Server Error", "trace": "org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://172.0.17.180:80/solr/ds_target returned non ok status:500, message:Server Error\n\tat org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:372)\n\tat org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)\n\tat org.apache.solr.update.SolrCmdDistributor$1.call(SolrCmdDistributor.java:332)\n\tat org.apache.solr.update.SolrCmdDistributor$1.call(SolrCmdDistributor.java:306)\n\tat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:166)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)\n\tat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:166)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat java.lang.Thread.run(Thread.java:724)\n", "code": 500 } } ... 172.0.17.180 is the leader internal ip Any help? thanks in advance -- View this message in context: http://lucene.472066.n3.nabble.com/Error-while-trying-to-index-doc-on-replica-tp4111504.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Error while trying to index doc on replica
Thanks Erick.. When tailing the log i get several similar errors: INFO - 2014-01-15 18:28:50.250; org.apache.solr.update.processor.LogUpdateProcessor; [ds_target] webapp=/solr path=/update params={distrib.from=http://172.0.60.97:80/solr/ds_target/&update.distrib=TOLEADER&wt=javabin&version=2} {} 0 1 ERROR - 2014-01-15 18:28:50.251; org.apache.solr.common.SolrException; org.noggit.JSONParser$ParseException: JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='add>http://lucene.472066.n3.nabble.com/Error-while-trying-to-index-doc-on-replica-tp4111504p4111507.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Error while trying to index doc on replica
Solved. It was a 'misconfigured' solrconfig.xml Had this: Fixed backing to default and adding a path for json updates: application/json -- View this message in context: http://lucene.472066.n3.nabble.com/Error-while-trying-to-index-doc-on-replica-tp4111504p4111534.html Sent from the Solr - User mailing list archive at Nabble.com.
Leader Election, when?
I have a working Zookeeper ensemble running with 3 instances and also a solrcloud cluster with some solr instances. I've created a collection with settings to 2 shards. Then i: create 1 core on instance1 create 1 core on instance2 create 1 core on instance1 create 1 core on instance2 Just to have this configuration: instance1: shard1_leader, shard2_replica instance2: shard1_replica, shard2_leader If i add 2 cores to instance1 then 2 cores to instance2, both leaders will be on instance1 and no re-election is done. instance1: shard1_leader, shard2_leader instance2: shard1_replica, shard2_replica Back to my ideal scenario (detached leaders), also when i add a third instance with 2 replicas and kill one of my instances running a leader, the election picks the instance that already have a leader. My question is why Zookeeper takes this behavior. Shouldn't it distribute leaders? If i deliver some stress to a double-leader instance, is Zookeeper going to run an election? -- View this message in context: http://lucene.472066.n3.nabble.com/Leader-Election-when-tp4077381.html Sent from the Solr - User mailing list archive at Nabble.com.