You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ashish Athavale <as...@persistent.com> on 2019/07/18 15:50:05 UTC
Exception while adding data in multiple threads
Hi,
I am getting below exception while adding data into solr. I am adding data concurrently in 20 threads, 100 documents in a batch per thread.
Each documents contains 40 fields and all are indexed.
This issue occurs only when I add in multi threads.
Can you please help out here?
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://10.88.66.154:8983/solr: Invalid version (expected 2, but 95) or the data in not in 'javabin' format
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:643)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:194)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106)
at org.springframework.data.solr.core.SolrTemplate.lambda$saveBeans$3(SolrTemplate.java:227)
at org.springframework.data.solr.core.SolrTemplate$$Lambda$649/753427667.doInSolr(Unknown Source)
at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:167)
Regards
Ashish Athavale | Architect
ashish_athavale@persistent.com<ma...@persistent.com>| Cell: +91-9881137580| Tel: +91-02067034708
Persistent Systems Ltd. | www.persistent.com<http://www.persistent.com>
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
Re: Exception while adding data in multiple threads
Posted by Erick Erickson <er...@gmail.com>.
I doubt multiple threads are the issue here. This looks a lot more like you’re using SolrJ jars on the client that do not match the version running on Solr.
Best,
Erick
> On Jul 18, 2019, at 10:50 AM, Ashish Athavale <as...@persistent.com> wrote:
>
> Hi,
>
> I am getting below exception while adding data into solr. I am adding data concurrently in 20 threads, 100 documents in a batch per thread.
> Each documents contains 40 fields and all are indexed.
> This issue occurs only when I add in multi threads.
>
> Can you please help out here?
>
> Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://10.88.66.154:8983/solr: Invalid version (expected 2, but 95) or the data in not in 'javabin' format
> at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:643)
> at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255)
> at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244)
> at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:194)
> at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106)
> at org.springframework.data.solr.core.SolrTemplate.lambda$saveBeans$3(SolrTemplate.java:227)
> at org.springframework.data.solr.core.SolrTemplate$$Lambda$649/753427667.doInSolr(Unknown Source)
> at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:167)
>
> Regards
> Ashish Athavale | Architect
> ashish_athavale@persistent.com<ma...@persistent.com>| Cell: +91-9881137580| Tel: +91-02067034708
> Persistent Systems Ltd. | www.persistent.com<http://www.persistent.com>
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
Re: Exception while adding data in multiple threads
Posted by Shawn Heisey <ap...@elyograg.org>.
On 7/18/2019 9:50 AM, Ashish Athavale wrote:
> I am getting below exception while adding data into solr. I am adding data concurrently in 20 threads, 100 documents in a batch per thread.
> Each documents contains 40 fields and all are indexed.
> This issue occurs only when I add in multi threads.
>
> Can you please help out here?
>
> Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://10.88.66.154:8983/solr: Invalid version (expected 2, but 95) or the data in not in 'javabin' format
This particular "Invalid version" error almost always means that Solr
returned an error response to the client, and that the body of the
response was formatted as plain text or HTML, rather than the binary
format that the client expected to see. The client had no idea how to
handle it, so it threw the exception.
If the client-side exception does not have "Caused by" data that fully
shows the text of the error response, you may need to check the logfile
on the Solr server to see what error it was sending to the client. That
information may help you or us figure out how to fix it.
Thanks,
Shawn