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 davers <db...@improvementdirect.com> on 2012/12/19 19:28:19 UTC

Solr 4.0 with Solr Cloud 404

I have setup a solr cloud with one shard for testing with an external
zookeeper server. The cloud shows up fine in the solr admin but when i run a
query on the cloud ex.

http://solr-sa-2.sys.id.build.com:8080/apache-solr-4.0.0/productindex/select?q=manufacturer:*hler

I get the result: 

Server at http://solr-sa-2.sys.id.build.com:8080/solr/productindex returned
non ok status:404, message:Not Found

It seems that it's changing /apache-solr-4.0.0/productindex to
/solr/productindex but I can't find where this is happening.

Here is the relevant part of my sorl.xml

<cores adminPath="/admin/cores" defaultCoreName="productindex"
host="${host:solr-sa-2.sys.id.build.com}" hostPort="${jetty.port:8080}"
hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}">
    <core name="productindex" instanceDir="productindex" />
  </cores>
</solr>



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-with-Solr-Cloud-404-tp4028101.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 4.0 with Solr Cloud 404

Posted by davers <db...@improvementdirect.com>.
So for my setup I should change the host context to apache-solr-4.0.0

would this work?

<cores adminPath="/admin/cores" defaultCoreName="productindex"
host="${host:solr-sa-2.sys.id.build.com}" hostPort="${jetty.port:8080}"
hostContext="${hostContext:apache-solr-4.0.0}"
zkClientTimeout="${zkClientTimeout:15000}"> 
   <core name="productindex" instanceDir="productindex" /> 
 </cores> 
</solr> 



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-with-Solr-Cloud-404-tp4028101p4028112.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 4.0 with Solr Cloud 404

Posted by Mark Miller <ma...@gmail.com>.
The default host for urls is /solr. Looks like you want to run on the root context. In Solr 4.1 this is best done by setting the host to / (either in solr.xml or with the hostContext sys prop). For 4.0 you have to use a host context of "." to run on the root context.

- Mark

On Dec 19, 2012, at 1:28 PM, davers <db...@improvementdirect.com> wrote:

> I have setup a solr cloud with one shard for testing with an external
> zookeeper server. The cloud shows up fine in the solr admin but when i run a
> query on the cloud ex.
> 
> http://solr-sa-2.sys.id.build.com:8080/apache-solr-4.0.0/productindex/select?q=manufacturer:*hler
> 
> I get the result: 
> 
> Server at http://solr-sa-2.sys.id.build.com:8080/solr/productindex returned
> non ok status:404, message:Not Found
> 
> It seems that it's changing /apache-solr-4.0.0/productindex to
> /solr/productindex but I can't find where this is happening.
> 
> Here is the relevant part of my sorl.xml
> 
> <cores adminPath="/admin/cores" defaultCoreName="productindex"
> host="${host:solr-sa-2.sys.id.build.com}" hostPort="${jetty.port:8080}"
> hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}">
>    <core name="productindex" instanceDir="productindex" />
>  </cores>
> </solr>
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-with-Solr-Cloud-404-tp4028101.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 4.0 with Solr Cloud 404

Posted by davers <db...@improvementdirect.com>.
Looking at the solr cloud zookeeper dump from the admin ui it looks like the
base_url zookeeper setting is being set incorrectly 

base_url\":\"http://solr-sa-2.sys.id.build.com:8080/solr

Where can I change the base_url?

My JAVA_OPTS are:
-Dbootstrap_confdir=/srv/apache-solr-4.0.0/productindex/conf/
-Dcollection.configName=productIndex-config -DzkRun
-DzkHost=solr-sa-1.sys.id.build.com:2181 -DnumShards=1



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-with-Solr-Cloud-404-tp4028101p4028110.html
Sent from the Solr - User mailing list archive at Nabble.com.