ConcurrentUpdateSolrServer "Missing ContentType" error on SOLR 4.2.1

2013-05-06 Thread cleardot
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.

  

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

 

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

2013-05-06 Thread cleardot
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

2013-05-07 Thread cleardot
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.


solcloud on tomcat - the 8983 port problem

2013-05-31 Thread cleardot
I know this issue has been answered somewhere.

I've got SolrCloud running under Tomcat 6, the respective settings are

tomcat6.conf
---



I am deliberately running Tomcat on 80 but on SOLR I stuck with 8983 because
it appears to be the default for SolrCloud.


solr.xml
---
  

  


In non-solrcloud mode this works fine for updates and queries.  

In solrcloud mode (Tomcat startup with the added JAVA_OPTS on both hosts)
catalina.out shows shard1 and the embedded zookeeper booting nicely and I
can see the shard2 machine registering with zookeeper.  

But any query to the shard1 machine get the dreaded 

Connection to http://10.xx.xx.185:8983 refused

I use the same security group for both hosts, with these settings:

TCP Port Service
0 - 65535   0.0.0.0/0   
22 (SSH)0.0.0.0/0   
80 (HTTP)   0.0.0.0/0   
89830.0.0.0/0   

I cannot tell whether this is a security group problem or some mismatch
between my SOLR and Tomcat port settings. Any help is appreciated.

Dan




--
View this message in context: 
http://lucene.472066.n3.nabble.com/solcloud-on-tomcat-the-8983-port-problem-tp4067512.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: solcloud on tomcat - the 8983 port problem

2013-05-31 Thread cleardot
That worked.  Thanks both of you (Hoss too).

I had in fact set the solr.xml hostPort on both shards to 80 earlier to
match Tomat.  But I kept getting

INFO: Update state numShards=null message={
  "operation":"state",
  "core_node_name":"10.x.x.105:8983_solr_mycore",
  "numShards":null,
  "shard":"shard2",
  "roles":null,
  "state":"active",
  "core":"mycore",
  "collection":"mycore",
  "node_name":"10.x.x.105:8983_solr",
  "base_url":"http://10.x.x.105:8983/solr"}

when they were initializing (the above being one of many of these INFO
statements).  So 8983 was cached somewhere.  

If you do not explicitly set hostPort will it default to 8983 or to Tomcat's
port from server.xml?

Dan




--
View this message in context: 
http://lucene.472066.n3.nabble.com/solcloud-on-tomcat-the-8983-port-problem-tp4067512p4067522.html
Sent from the Solr - User mailing list archive at Nabble.com.