I tried adding in two ways with the same outcome: (1) using solrj to call HttpSolrServer.add(docList) using BinaryRequestWriter; (2) using DataImportHandler to import directly from a database through a db-data-config.xml file.
The document I'm adding has a long primary key id field and a few other string and timestamp fields. I also added a long _version_ field coz the URL said so. I've been using this schema without problems with 3.6 for a while and it works fine when added to the primary in 4.0. "Mark Miller-3 [via Lucene]" <ml-node+s472066n3993780...@n3.nabble.com> wrote: Can you show us exactly how you are adding the document? Eg, what update handler are you using, and what is the document you are adding? On Jul 8, 2012, at 12:52 PM, avenka wrote: > 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. - Mark Miller lucidimagination.com _____________________________________________ If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/SolrCloud-error-while-propagating-update-to-primary-ZK-node-tp3993760p3993780.html To unsubscribe from SolrCloud error while propagating update to primary ZK node, click here. NAML -- View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-error-while-propagating-update-to-primary-ZK-node-tp3993760p3993781.html Sent from the Solr - User mailing list archive at Nabble.com.