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 cleardot <cl...@aol.com> on 2013/05/06 21:25:00 UTC

ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

My SolrJ client uses ConcurrentUpdateSolrServer to index > 50Gs of docs to a
SOLR 3.6 instance on my Linux box.  When running the same client against
SOLR 4.2.1 on EC2 I got the following:


SolrJ client error
====================================================================
request: http://ec2-103-x-x-x.compute-3.amazonaws.com/solr/mycore/update
        at
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer$Runner.run(ConcurrentUpdateSolrServer.java:189)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
12593 [pool-1-thread-2] INFO
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer - finished:
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer$Runner@7eb1cc87
12593 [pool-1-thread-5] INFO
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer - Status for:
doc-123b166-a2fd-11e0-94b3-842b2b170032 is 400
12593 [pool-1-thread-5] ERROR
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer - error
java.lang.Exception: Bad Request



SOLR 4.2.1 log error
======================================================
INFO: [mycore] webapp=/solr path=/update params={} {} 0 0
May 6, 2013 6:13:55 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Missing ContentType
        at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:78)
        at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1817)
        at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:639)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
        at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:679)



I have other SolrJ clients using the 3.6 Solr jars and CommonsHttpSolrServer
to index to SOLR 4.2.1 with no problem, the issue seems to be with
ConcurrentUpdateSolrServer.

UpdateRequestHandler.java seems to be the source of the error.
<https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java>  

I'm wondering if the issue is with the 4.3.1 solrconfig settings for the
/update date handler, currently just 

     <requestHandler name="/update" class="solr.UpdateRequestHandler"/>

Also my ConcurrentUpdateSolrServer constructor does not specify an http
client, I made a few failed attempts at setting content type that way.

any help appreciated!

DK



--
View this message in context: http://lucene.472066.n3.nabble.com/ConcurrentUpdateSolrServer-Missing-ContentType-error-on-SOLR-4-2-1-tp4061160.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

Posted by Shawn Heisey <so...@elyograg.org>.
> I apologize for intruding, Shawn, do you know what can cause empty params
> (i.e. params={}) ?

I've got no idea what is causing this problem on your system. All of the
ideas I've had so far don't seem to apply.

Can you run a packet sniffer on your client to see whether the client is
sending the right info?

Thanks,
Shawn



Re: ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

Posted by Ravi Solr <ra...@gmail.com>.
I apologize for intruding, Shawn, do you know what can cause empty params
(i.e. params={}) ?

Ravi


On Mon, May 6, 2013 at 5:47 PM, Shawn Heisey <so...@elyograg.org> wrote:

> On 5/6/2013 1:25 PM, cleardot wrote:
>
>> My SolrJ client uses ConcurrentUpdateSolrServer to index > 50Gs of docs
>> to a
>> SOLR 3.6 instance on my Linux box.  When running the same client against
>> SOLR 4.2.1 on EC2 I got the following:
>>
>
> <snip>
>
>
>  SOLR 4.2.1 log error
>> ==============================**========================
>> INFO: [mycore] webapp=/solr path=/update params={} {} 0 0
>> May 6, 2013 6:13:55 PM org.apache.solr.common.**SolrException log
>> SEVERE: org.apache.solr.common.**SolrException: Missing ContentType
>>
>
> This isn't the first time I've seen empty params in a Solr log on this
> list, but the other one was with 3.6.2 for both server and client.  Is
> "params={}" what actually got logged, or did you remove the stuff there to
> sanitize your logs on a public list?
>
> Are you by chance setting the response parser on your solr server object
> to something besides the Binary (javabin) parser?  If you are, could you
> remove the setParser call in your client code?  The only time you need to
> change the parser is when you're using SolrJ with a version of Solr that
> does not have the same javabin version.  The javabin version was v1 in Solr
> 1.4.1 and earlier, then v2 in 3.1.0 and later.  The other response parsers
> are less efficient than javabin.
>
> Thanks,
> Shawn
>
>

Re: ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

Posted by cleardot <cl...@aol.com>.
This is resolved, I switched in the 4.2.1 jars and also corrected a mismatch
between the compile and runtime JDKs, for some reason the system was
overriding my JAVA_HOME setting (6.1) and running the client with a 5.0 JVM. 
I did not have to use setParser.

I did try running the 'new' 4.2.1 SolrJ client against SOLR 3.6 and got this
error in the server log:

2013-05-07 16:14:34,835 WARN 
[org.apache.solr.handler.XmlUpdateRequestHandler]
(http-0.0.0.0-18841-Processor15) Unknown attribute doc/field/@update

so I've settled for separate 3.6 and 4.2.1 versions.

Your info helped a lot, thanks Shawn.

DK




--
View this message in context: http://lucene.472066.n3.nabble.com/ConcurrentUpdateSolrServer-Missing-ContentType-error-on-SOLR-4-2-1-tp4061160p4061416.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

Posted by Shawn Heisey <el...@elyograg.org>.
On 5/6/2013 4:06 PM, cleardot wrote:
> Shawn,
>
> I didn't sanitize the log other than the ec2 servername.  The constructor is
>
>         ConcurrentUpdateSolrServer solrServer
>                           = new ConcurrentUpdateSolrServer(solrUrl,
> solrBufferCount, solrThreadCount);
>
> and I don't use setParser at all.
>
> But the SolrJ client is using apache-solr-core-3.6.1.jar and
> apache-solr-solrj-3.6.1.jar while the server is 4.2.1.  Maybe I do need to
> use setParser?

The javabin versions between those two are compatible, but the older 
SolrJ may not send a content type when using javabin, and the newer Solr 
seems to require it.  Perhaps if you do change the parser, it might 
force the issue.  XML isn't quite as efficient as javabin, but it's not 
like it will be super slow either.  Add the following after creating the 
server object:

solrServer.setParser (new XMLResponseParser());

This probably will require adding an import:

import org.apache.solr.client.solrj.impl.XMLResponseParser;

You also might try upgrading SolrJ on your client app.  I'm using SolrJ 
4.2.1 with two different server versions - 3.5.0 and 4.2.1.  It works 
perfectly.

Thanks,
Shawn


Re: ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

Posted by cleardot <cl...@aol.com>.
Shawn,

I didn't sanitize the log other than the ec2 servername.  The constructor is

       ConcurrentUpdateSolrServer solrServer
                         = new ConcurrentUpdateSolrServer(solrUrl,
solrBufferCount, solrThreadCount);

and I don't use setParser at all.

But the SolrJ client is using apache-solr-core-3.6.1.jar and
apache-solr-solrj-3.6.1.jar while the server is 4.2.1.  Maybe I do need to
use setParser?

DK




--
View this message in context: http://lucene.472066.n3.nabble.com/ConcurrentUpdateSolrServer-Missing-ContentType-error-on-SOLR-4-2-1-tp4061160p4061197.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

Posted by Shawn Heisey <so...@elyograg.org>.
On 5/6/2013 1:25 PM, cleardot wrote:
> My SolrJ client uses ConcurrentUpdateSolrServer to index > 50Gs of docs to a
> SOLR 3.6 instance on my Linux box.  When running the same client against
> SOLR 4.2.1 on EC2 I got the following:

<snip>

> SOLR 4.2.1 log error
> ======================================================
> INFO: [mycore] webapp=/solr path=/update params={} {} 0 0
> May 6, 2013 6:13:55 PM org.apache.solr.common.SolrException log
> SEVERE: org.apache.solr.common.SolrException: Missing ContentType

This isn't the first time I've seen empty params in a Solr log on this 
list, but the other one was with 3.6.2 for both server and client.  Is 
"params={}" what actually got logged, or did you remove the stuff there 
to sanitize your logs on a public list?

Are you by chance setting the response parser on your solr server object 
to something besides the Binary (javabin) parser?  If you are, could you 
remove the setParser call in your client code?  The only time you need 
to change the parser is when you're using SolrJ with a version of Solr 
that does not have the same javabin version.  The javabin version was v1 
in Solr 1.4.1 and earlier, then v2 in 3.1.0 and later.  The other 
response parsers are less efficient than javabin.

Thanks,
Shawn