In theory, with SolrCloiud you can add to any replica and the change gets
propagated automatically to all of the other replicas for that shard. In
theory.
The stack trace message suggests that Solr is trying to parse your input as
JSON when in fact your input is XML. I vaguely recall that Yonik was working
on update and had implemented something with JSON, but I don't recall that
XML was also implemented. (or maybe the work was done in trunk but not
backported to 4x - I just don't recall exactly.) For now, it sounds as if
you have to have to send updates to the primary node of the shard and then
let Solr replicate it. I'll defer to the Cloud experts on the details.
-- Jack Krupansky
-----Original Message-----
From: avenka
Sent: Sunday, July 08, 2012 11:52 AM
To: solr-user@lucene.apache.org
Subject: SolrCloud error while propagating update to primary ZK node
I get a JSON parse error (pasted below) when I send an update to a replica
node. I downloaded solr 4 alpha and followed the instructions at
http://wiki.apache.org/solr/SolrCloud/ and setup numShards=1 with 3 total
servers managed by a zookeeper ensemble, the primary at 8983 and the other
two at 7574 and 8900 respectively.
The error below shows up in the primary's log when I try to add a document
to either replica. The document add fails. I am able to successfully add
documents by directly sending to the primary. How do I correctly add
documents to replicas?
SEVERE: org.apache.noggit.JSONParser$ParseException: JSON Parse Error:
char=<,position=0 BEFORE='<' AFTER='add><doc boost="1.0"><field name="id">2'
at org.apache.noggit.JSONParser.err(JSONParser.java:221)
at org.apache.noggit.JSONParser.next(JSONParser.java:620)
at org.apache.noggit.JSONParser.nextEvent(JSONParser.java:661)
at
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:105)
at
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:95)
at org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:59)
at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at
org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:240)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1561)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
... [snip]
--
View this message in context:
http://lucene.472066.n3.nabble.com/SolrCloud-error-while-propagating-update-to-primary-ZK-node-tp3993760.html
Sent from the Solr - User mailing list archive at Nabble.com.