On 10/30/2013 9:24 AM, Elena Camossi wrote:
Hi everyone,
I'm trying to configure Solr 4.5.0 on Linux red Hat to work with CKAN and
Tomcat, but Solr cannot initialize the core (I'm configuring just one core,
but this is likely to change in the next future. I'm using contexts for this
set up). Tomcat is working correctly, and list solr among running
applications. When I open the Solr dashboard, the Solr instance is running
but I see this error
SolrCore Initialization Failures
ckan-schema-2.0:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Could not load config file /usr/share/solr/ckan/conf/solrconfig.xml
<snip>
The content of my solr.xml for core settings (/usr/share/solr/solr.xml, in
my installation) is
<solr persistent="true" sharedLib="lib">
<cores adminPath="/admin/cores" defaultCoreName="ckan">
<core name ="ckan-schema-2.0" instanceDir="ckan/conf"> <property
name="dataDir" value="/var/lib/solr/data/ckan" /></core>
</cores>
</solr>
Typically, instanceDir will not have the "conf" on it - it should just
be "ckan" for this. Solr automatically adds the conf when it is looking
for the configuration.
Later you show that you have dataDir defined in solrconfig.xml -- take
that out entirely. The dataDir is specified in solr.xml, putting it in
solrconfig.xml also is just asking for problems -- especially if you
ever end up sharing the solrconfig.xml between more than one core, which
is what happens with SolrCloud. Also, evidence seems to suggest that
the ${dataDir} substitution that used to work in older versions was a
fluke. After a recent rigorous properties cleanup, it is no longer
supported, unless you actually define that as a java system property.
Finally, make sure that the permissions of all paths leading to both the
symlink for your conf directory and the actual conf directory are
readable to the tomcat user, not just root.