I have solr-4.5.0 configured to work with tomcat7 and zookeeper 3.3.5 (from debian package)
According to many tutorials I have created following Catalina/localhost/solr.xml
file
<Context allowlinking="true" crosscontext="true" debug="1" docBase="/var/lib/tomcat7/webapps/solr.war" priviledged="true">
<Environment name="solr/home" override="true" type="java.lang.String" value="/opt/solr/webapps/solr1" />
</Context>
I have configured solr on 2 machines to work in cloud (using zookeeper to keep configuration).
On both machines, when starting tomcat7, I see following error in catalina.out
:
11693 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – No /solr/home in JNDI
....
12529 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Failed to load file /var/lib/tomcat7/solr/collection1/solrconfig.xml
12532 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config file /var/lib/tomcat7/solr/collection1/solrconfig.xml
The interesting thing is that in the beggining of that file I see:
64 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – Using JNDI solr.home: /opt/solr/webapps/solr1
71 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – new SolrResourceLoader for directory: '/opt/solr/webapps/solr1/'
Of course I would like to configure solr/home in JNDI, not in solr.war. Any idea what might be wrong?
P.S.: This question is not a duplicate of questions like this: How to set solr/home in linux OS? and this: deploy war in Tomcat The difference is that I am defining solr/home but it seems not to work.