On 12/21/2011 4:13 AM, Thomas Fischer wrote:
I'm trying to move forward with my solr system from 1.4 to 3.5 and ran into
some problems with solr home.
Is this a known problem?
My solr 1.4 gives me the following messages (amongst many many others…) in
catalina.out:
INFO: No /solr/home in JNDI
INFO: using system property solr.solr.home: '/srv/solr'
INFO: looking for solr.xml: /'/srv/solr'/solr.xml
then finds the solr.xml and proceeds from there (this is multicore).
With solr 3.5 I get:
INFO: No /solr/home in JNDI
INFO: using system property solr.solr.home: '/srv/solr'
INFO: Solr home set to ''/srv/solr'/'
INFO: Solr home set to ''/srv/solr'/./'
SCHWERWIEGEND: java.lang.RuntimeException: Can't find resource '' in classpath
or ''/srv/solr'/./conf/', cwd=/
After that solr is somehow started but not aware of the cores present.
This can be solved by putting a solr.xml file into
$CATALINA_HOME/conf/Catalina/localhost/ with
<Environment name="solr/home" type="java.lang.String" value="/srv/solr"
override="true" />
which results in
INFO: Using JNDI solr.home: /srv/solr
and everything seems to run smoothely afterwards, although solr.xml is never
mentioned.
I would like to know when this changed and why, and why solr 3.5 is looking for
solrconfig.xml instead of solr.xml in solr.home
(Am I the only one who finds it confusing to have the three names
solr.solr.home (system property), solr.home (JNDI), solr/home (Environment
name) for the same object?)
Here's what I have as a commandline option when starting Jetty:
-Dsolr.solr.home=/index/solr
This is what my log from Solr 3.5.0 says at the very beginning.
Dec 14, 2011 8:42:28 AM org.apache.solr.core.SolrResourceLoader
locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Dec 14, 2011 8:42:28 AM org.apache.solr.core.SolrResourceLoader
locateSolrHome
INFO: using system property solr.solr.home: /index/solr
Dec 14, 2011 8:42:28 AM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/index/solr/'
Note that in my log it shows the system property without any kind of
quotes, but in yours, it is surrounded - '/srv/solr'. I am guessing
that wherever you are defining solr.solr.home, you have included those
quotes, and that removing them would probably fix the problem.
If this is indeed the problem, the newer version is probably
interpreting input values much more literally, the old version probably
ran the final path value through a parser that took care of removing the
quotes for you, but that parser also removed certain characters that
some users actually needed. Notice that the quotes are interspersed in
the full solr.xml path in your 1.4 log.
Thanks,
Shawn