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 Reem <re...@gmail.com> on 2018/07/22 01:41:19 UTC

Collection created error: Can't find resource 'solrconfig.xml'

I have Solr-7.2.1 running on a cluster of 32 linux nodes/servers (+ a node that hosts ZooKeeper). I wanted to create a collection with the following command:
[solr@node-n03 solr]$ curl "node-n03:8983/solr/admin/collections?action=CREATE&name=web&numShards=32&replicationFactor=1&maxShardsPerNode=1&collection.configName=web"

Before that I uploaded the configuration into ZooKeeper using this command:
./server/scripts/cloud-scripts/zkcli.sh -zkhost node-n01:2181 -cmd upconfig -confname web -confdir /share/solr-7.2.1/server/configs/web

However, I'm getting this error for the 32 nodes:
…"IP.IP.IP.56:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.56:8983/solr: Error CREATEing SolrCore 'web_shard13_replica_n24': Unable to create core [web_shard13_replica_n24] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server" …

I have posted more details (including the full error message) and updates on the question here:

https://stackoverflow.com/questions/51458097/solr-collectio-created-erorr-cant-find-resource-solrconfig-xml

Do you have any idea on how to solve this problem?

Reem

RE: Collection created error: Can't find resource 'solrconfig.xml'

Posted by Reem <re...@gmail.com>.
Thanks for your reply Erich, that was really helpful!

From: Erick Erickson
Sent: Sunday, July 22, 2018 7:26 AM
To: solr-user
Subject: Re: Collection created error: Can't find resource 'solrconfig.xml'

From your SO post:

"I've also created a directory /configs (as indicated by the error) on
every node and copied the 'web' configset files
(/share/solr/server/solr/web) that I want to use for overriding the
collection default configuration. However, this didn't solve the
problem."

Do not copy files around like this, not only is it unnecessary, but it
also masks (at best) the real problem. I'd urge you to remove all
those directories, not so much that Solr will be confused as their
presence will be confusing later.

The problem has to be that you didn't really upload the configs to the
right place. Go to the admin UI page, cloud>>tree and then in the
right pane you should be seeing a view of your Zookeeper data, and
there should be a /configs node. Under that node you should see all of
the configsets you've uploaded, including a "web" znode with all the
files below it you'd expect. Be sure to look here on a node other than
node-n01, all your Solr nodes' admin screens should show the exact
same Zookeeper (tree) information.

Some possiblities:

> you didn't upload the configs to the Zookeeper ensemble that's being used by the rest of Solr. The upconfig command uses "-zkhost node-n01:2181", do all of the other Solr instances also start with "-z node-n01:2181"?

> your configset in Zookeeper is a level too low or high or just in some unexpected place.

> your Solr instances aren't all pointing to the same Zookeeper ensemble that you uploaded your "web" configset to.

> you're somehow running embedded Zookeeper on one node


How do you start your Solr instances? Do they all use the proper
external Zookeeper ensemble? Those messages rather look like you
aren't starting your Solr instances in cloud mode. I can;t make that
square with your create command knowing they're there, but you get the
idea.

How do you start your Zookeeper ensemble?

As for why you can use "techproducts", again I think you're pointing
to different ZKs.

Best,
Erick

On Sat, Jul 21, 2018 at 6:41 PM, Reem <re...@gmail.com> wrote:
> I have Solr-7.2.1 running on a cluster of 32 linux nodes/servers (+ a node that hosts ZooKeeper). I wanted to create a collection with the following command:
> [solr@node-n03 solr]$ curl "node-n03:8983/solr/admin/collections?action=CREATE&name=web&numShards=32&replicationFactor=1&maxShardsPerNode=1&collection.configName=web"
>
> Before that I uploaded the configuration into ZooKeeper using this command:
> ./server/scripts/cloud-scripts/zkcli.sh -zkhost node-n01:2181 -cmd upconfig -confname web -confdir /share/solr-7.2.1/server/configs/web
>
> However, I'm getting this error for the 32 nodes:
> …"IP.IP.IP.56:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.56:8983/solr: Error CREATEing SolrCore 'web_shard13_replica_n24': Unable to create core [web_shard13_replica_n24] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server" …
>
> I have posted more details (including the full error message) and updates on the question here:
>
> https://stackoverflow.com/questions/51458097/solr-collectio-created-erorr-cant-find-resource-solrconfig-xml
>
> Do you have any idea on how to solve this problem?
>
> Reem


Re: change the ranking function

Posted by Shawn Heisey <ap...@elyograg.org>.
On 7/25/2018 10:46 PM, Reem wrote:
> The way I found to change the ranking function is by setting the similarity property of text fields in schema.xml as follows:
> `<similarity class="solr.LMDirichletSimilarityFactory"/>`
>
> However, this means we can only set the similarity/ranking function only in indexing time. As Solr is built over Lucene which allows changing the ranking function in search time, I find it not logical that Solr doesn’t support it, so it seems I’m missing something here!

That setting will change the similarity used for both index and query.  
I am not aware of any way in Solr to specify a different similarity for 
index than what is used for query.  It wouldn't surprise me to learn 
that this is possible when writing Lucene code directly.

Thanks,
Shawn


Re: change the ranking function

Posted by Joël Trigalo <jo...@trovit.com>.
Hi,

It is not possible in general because similarities are computing norms at
index time. (
https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/similarities/Similarity.java#L46
)
My understanding is that you should double a field and set different
similarity to the new field in order to be able to change similarity for
every query. If someone has a better idea, I am also interested.


On Thu, Jul 26, 2018 at 8:51 AM Reem <re...@gmail.com> wrote:

> Hello,
>
> Is it possible to change the ranking function (e.g., BM25Similarity,
> ClassicSimilarity, LMDirichletSimilarity, etc) in search time?
>
> The way I found to change the ranking function is by setting the
> similarity property of text fields in schema.xml as follows:
> `<similarity class="solr.LMDirichletSimilarityFactory"/>`
>
> However, this means we can only set the similarity/ranking function only
> in indexing time. As Solr is built over Lucene which allows changing the
> ranking function in search time, I find it not logical that Solr doesn’t
> support it, so it seems I’m missing something here!
>
> Any idea on how to achieve this?
>
> Reem
>

change the ranking function

Posted by Reem <re...@gmail.com>.
Hello,

Is it possible to change the ranking function (e.g., BM25Similarity, ClassicSimilarity, LMDirichletSimilarity, etc) in search time?

The way I found to change the ranking function is by setting the similarity property of text fields in schema.xml as follows:
`<similarity class="solr.LMDirichletSimilarityFactory"/>`

However, this means we can only set the similarity/ranking function only in indexing time. As Solr is built over Lucene which allows changing the ranking function in search time, I find it not logical that Solr doesn’t support it, so it seems I’m missing something here!

Any idea on how to achieve this?

Reem

Re: Collection created error: Can't find resource 'solrconfig.xml'

Posted by Erick Erickson <er...@gmail.com>.
From your SO post:

"I've also created a directory /configs (as indicated by the error) on
every node and copied the 'web' configset files
(/share/solr/server/solr/web) that I want to use for overriding the
collection default configuration. However, this didn't solve the
problem."

Do not copy files around like this, not only is it unnecessary, but it
also masks (at best) the real problem. I'd urge you to remove all
those directories, not so much that Solr will be confused as their
presence will be confusing later.

The problem has to be that you didn't really upload the configs to the
right place. Go to the admin UI page, cloud>>tree and then in the
right pane you should be seeing a view of your Zookeeper data, and
there should be a /configs node. Under that node you should see all of
the configsets you've uploaded, including a "web" znode with all the
files below it you'd expect. Be sure to look here on a node other than
node-n01, all your Solr nodes' admin screens should show the exact
same Zookeeper (tree) information.

Some possiblities:

> you didn't upload the configs to the Zookeeper ensemble that's being used by the rest of Solr. The upconfig command uses "-zkhost node-n01:2181", do all of the other Solr instances also start with "-z node-n01:2181"?

> your configset in Zookeeper is a level too low or high or just in some unexpected place.

> your Solr instances aren't all pointing to the same Zookeeper ensemble that you uploaded your "web" configset to.

> you're somehow running embedded Zookeeper on one node


How do you start your Solr instances? Do they all use the proper
external Zookeeper ensemble? Those messages rather look like you
aren't starting your Solr instances in cloud mode. I can;t make that
square with your create command knowing they're there, but you get the
idea.

How do you start your Zookeeper ensemble?

As for why you can use "techproducts", again I think you're pointing
to different ZKs.

Best,
Erick

On Sat, Jul 21, 2018 at 6:41 PM, Reem <re...@gmail.com> wrote:
> I have Solr-7.2.1 running on a cluster of 32 linux nodes/servers (+ a node that hosts ZooKeeper). I wanted to create a collection with the following command:
> [solr@node-n03 solr]$ curl "node-n03:8983/solr/admin/collections?action=CREATE&name=web&numShards=32&replicationFactor=1&maxShardsPerNode=1&collection.configName=web"
>
> Before that I uploaded the configuration into ZooKeeper using this command:
> ./server/scripts/cloud-scripts/zkcli.sh -zkhost node-n01:2181 -cmd upconfig -confname web -confdir /share/solr-7.2.1/server/configs/web
>
> However, I'm getting this error for the 32 nodes:
> …"IP.IP.IP.56:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.56:8983/solr: Error CREATEing SolrCore 'web_shard13_replica_n24': Unable to create core [web_shard13_replica_n24] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server" …
>
> I have posted more details (including the full error message) and updates on the question here:
>
> https://stackoverflow.com/questions/51458097/solr-collectio-created-erorr-cant-find-resource-solrconfig-xml
>
> Do you have any idea on how to solve this problem?
>
> Reem