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 Tom Burton-West <tb...@umich.edu> on 2012/08/23 18:18:44 UTC

Solr 4.0 beta : Is collection1 hard coded somewhere?

I removed the string "collection1" from my solr.xml file in solr home and
modified my solr.xml file as follows:

  <cores adminPath="/admin/cores" defaultCoreName="foobar1" host="${host:}"
hostPort="${jetty.port:}" zkClientTimeout="${zkClientTimeout:15000}">
    <core name="foobarcorename" instanceDir="." />
  </cores>
Then I restarted Solr.

However, I keep getting messages about
"Can't find resource 'solrconfig.xml' in classpath or
'/l/solrs/dev/solrs/4.0/1/collection1/conf/'"
And the log messages show that Solr is trying to create the collection1
instance

"Aug 23, 2012 12:06:02 PM org.apache.solr.core.CoreContainer create
INFO: Creating SolrCore 'collection1' using instanceDir:
/l/solrs/dev/solrs/4.0/3/collection1
Aug 23, 2012 12:06:02 PM org.apache.solr.core.SolrResourceLoader <init>"
I think somehow the previous solr.xml configuration is being stored on disk
somewhere and loaded.

Any clues?

Tom

Re: Solr 4.0 beta : Is collection1 hard coded somewhere?

Posted by Tom Burton-West <tb...@umich.edu>.
The answer is yes.   "collection1" is defined as the default core name in
CoreContainer.java on line 94 or so.   I have opened a jira issue for this
and other issues related to the documentation of solr.xml and Solr core
configuration issues for Solr 4.0

https://issues.apache.org/jira/browse/SOLR-3753

On Thu, Aug 23, 2012 at 1:04 PM, Tom Burton-West <tb...@umich.edu> wrote:

> I did not describe the problems correctly.
>
> I have 3 solr shards with solr homes .../solrs/4.0/1  .../solrs/4.0/2 and
> .../solrs/4.0/2solrs/3
>
> For shard 1 I have a solr.xml file with the modifications described in the
> previous message.  For that instance, it appears that the problem is that
> the semantics of specifing the instancedir have changed between 3.6 and
> 4.0.
>
> I specified the instancedir as  instanceDir="."
>
> However, I get this error in the log:
>
> "Cannot create directory: /l/solrs/dev/solrs/4.0/1/./data/index"
>
> Note that instead of using Solr home /l/solrs/dev/solrs/4.0/1 (what I
> would expect for the relative path "."), that Solr appears to be appending
> "." to Solr home.
> The solr.xml file says that paths are relative to the "installation
> directory".  Perhaps that needs to be clarified in the file.
>
>
> For shards 2 and 3, I tried not using a solr.xml file and I did not create
> a "collection1" subdirectory.  For these solr instances, I got the messages
> about collection1 and files not being found in the $SOLRHOME/collection1
> path
>
> " Can't find resource 'solrconfig.xml' in classpath or
> '/l/solrs/dev/solrs/4.0/3/collection1/conf/',
> cwd=/l/local/apache-tomcat-dev"
> Looking at the logs it appears that "collection1" is specified as the
> default core somewhere:
>
> Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer$Initializer
> initialize
> INFO: looking for solr.xml: /l/solrs/dev/solrs/4.0/3/solr.xml
> Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer <init>
> INFO: New CoreContainer 1281149250
> Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer$Initializer
> initialize
> INFO: no solr.xml file found - using default
> Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer load
> INFO: Loading CoreContainer using Solr Home: '/l/solrs/dev/solrs/4.0/3/'
> Aug 23, 2012 12:42:47 PM org.apache.solr.core.SolrResourceLoader <init>
> INFO: Creating SolrCore 'collection1' using instanceDir:
> /l/solrs/dev/solrs/4.0/3/collection1
>
> Is this default of "collection1" specified in some other config file or
> hardcoded into Solr somewhere?
>
> If using a core is mandatory with Solr 4.0 , the CoreAdmin wiki page and
> the release notes should point this out.
>
>
> Tom
>
>
>
>

Re: Solr 4.0 beta : Is collection1 hard coded somewhere?

Posted by Tom Burton-West <tb...@umich.edu>.
I did not describe the problems correctly.

I have 3 solr shards with solr homes .../solrs/4.0/1  .../solrs/4.0/2 and
.../solrs/4.0/2solrs/3

For shard 1 I have a solr.xml file with the modifications described in the
previous message.  For that instance, it appears that the problem is that
the semantics of specifing the instancedir have changed between 3.6 and
4.0.

I specified the instancedir as  instanceDir="."

However, I get this error in the log:

"Cannot create directory: /l/solrs/dev/solrs/4.0/1/./data/index"

Note that instead of using Solr home /l/solrs/dev/solrs/4.0/1 (what I would
expect for the relative path "."), that Solr appears to be appending "." to
Solr home.
The solr.xml file says that paths are relative to the "installation
directory".  Perhaps that needs to be clarified in the file.


For shards 2 and 3, I tried not using a solr.xml file and I did not create
a "collection1" subdirectory.  For these solr instances, I got the messages
about collection1 and files not being found in the $SOLRHOME/collection1
path

" Can't find resource 'solrconfig.xml' in classpath or
'/l/solrs/dev/solrs/4.0/3/collection1/conf/',
cwd=/l/local/apache-tomcat-dev"
Looking at the logs it appears that "collection1" is specified as the
default core somewhere:

Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer$Initializer
initialize
INFO: looking for solr.xml: /l/solrs/dev/solrs/4.0/3/solr.xml
Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer <init>
INFO: New CoreContainer 1281149250
Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer$Initializer
initialize
INFO: no solr.xml file found - using default
Aug 23, 2012 12:42:47 PM org.apache.solr.core.CoreContainer load
INFO: Loading CoreContainer using Solr Home: '/l/solrs/dev/solrs/4.0/3/'
Aug 23, 2012 12:42:47 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Creating SolrCore 'collection1' using instanceDir:
/l/solrs/dev/solrs/4.0/3/collection1

Is this default of "collection1" specified in some other config file or
hardcoded into Solr somewhere?

If using a core is mandatory with Solr 4.0 , the CoreAdmin wiki page and
the release notes should point this out.


Tom