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 Mike Thomsen <mi...@gmail.com> on 2014/12/20 20:27:51 UTC

Solr cannot find solr.xml even though it's there

I'm getting the following stacktrace with Solr 4.5.0

SEVERE: null:org.apache.solr.common.SolrException: Could not load SOLR
configuration
        at org.apache.solr.core.ConfigSolr.fromFile(ConfigSolr.java:71)
        at org.apache.solr.core.ConfigSolr.fromSolrHome(ConfigSolr.java:98)
        at org.apache.solr.servlet.SolrDispatchFilter.loadConfigSolr(SolrDispatchFilter.java:144)
        at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:175)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:127)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4830)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5510)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
/solr.xml cannot start Solrcommon.SolrException: solr.xml does not
exist in /opt/solr/solr-shard1
        at org.apache.solr.core.ConfigSolr.fromFile(ConfigSolr.java:60)
        ... 20 more

I went so far as to set the permissions on solr-shard1 to global
read/write/execute (777) and yet it still cannot load the file. It doesn't
say there's a parse error or anything constructive. Any ideas as to what is
going on?

Re: Solr cannot find solr.xml even though it's there

Posted by Shawn Heisey <ap...@elyograg.org>.
On 12/20/2014 3:26 PM, Mike Thomsen wrote:
> It's supposed to be a simple two shard configuration of SolrCloud with two
> copies of Solr running in different tomcat servers on the same box. I can
> read the solr.xml just fine as that user (vagrant) and checked out the
> permissions and there's nothing obviously wrong there.

Do you have something like selinux or apparmor enabled on the system
that might be interfering with system permissions?  Redhat operating
systems ship with selinux enabled, and I believe that Ubuntu ships with
apparmor enabled.  These can cause *very* strange things to happen.
Unless you want to provide custom configs to allow Solr to work, you
should probably disable anything like this.

Side issue: Solr (including cloud) is a lot more straightforward if you
only run one Solr instance per machine, hosting multiple cores.
Normally, the only time you should run more than one Solr instance per
machine is if you are setting up a proof of concept for SolrCloud and
want to do it on a single machine.

There have been some situations where people have gotten better
performance from running multiple Solr instances on a machine, rather
than multiple cores in one instance.  My opinion is that if you are able
to get better performance from multiple instances, that's probably a
bug, unless the reason performance is better is because of shorter GC
pauses (smaller heap per instance).

Thanks,
Shawn


Re: Solr cannot find solr.xml even though it's there

Posted by Mike Thomsen <mi...@gmail.com>.
It's supposed to be a simple two shard configuration of SolrCloud with two
copies of Solr running in different tomcat servers on the same box. I can
read the solr.xml just fine as that user (vagrant) and checked out the
permissions and there's nothing obviously wrong there.

On Sat, Dec 20, 2014 at 3:40 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 12/20/2014 12:27 PM, Mike Thomsen wrote:
> >         at java.lang.Thread.run(Thread.java:745)
> > /solr.xml cannot start Solrcommon.SolrException: solr.xml does not
> > exist in /opt/solr/solr-shard1
> >         at org.apache.solr.core.ConfigSolr.fromFile(ConfigSolr.java:60)
> >         ... 20 more
> >
> > I went so far as to set the permissions on solr-shard1 to global
> > read/write/execute (777) and yet it still cannot load the file. It
> doesn't
> > say there's a parse error or anything constructive. Any ideas as to what
> is
> > going on?
>
> If you log on to the system as the user that is attempting to start the
> container ... can you read that solr.xml file?
>
> These commands would check the permissions at each point in that path so
> you can see if the user in question has the appropriate rights at each
> level.
>
> ls -ald /.
> ls -ald /opt/.
> ls -ald /opt/solr/.
> ls -ald /opt/solr/solr-shard1/.
> ls -ald /opt/solr/solr-shard1/solr.xml
>
> It does seem odd that your solr home would be at a directory called
> solr-shard1 ... it makes more sense to me that it would be /opt/solr ...
> and that the solr.xml would live there.  Only you know what your
> directory structure is, though.
>
> Thanks,
> Shawn
>
>

Re: Solr cannot find solr.xml even though it's there

Posted by Shawn Heisey <ap...@elyograg.org>.
On 12/20/2014 12:27 PM, Mike Thomsen wrote:
>         at java.lang.Thread.run(Thread.java:745)
> /solr.xml cannot start Solrcommon.SolrException: solr.xml does not
> exist in /opt/solr/solr-shard1
>         at org.apache.solr.core.ConfigSolr.fromFile(ConfigSolr.java:60)
>         ... 20 more
> 
> I went so far as to set the permissions on solr-shard1 to global
> read/write/execute (777) and yet it still cannot load the file. It doesn't
> say there's a parse error or anything constructive. Any ideas as to what is
> going on?

If you log on to the system as the user that is attempting to start the
container ... can you read that solr.xml file?

These commands would check the permissions at each point in that path so
you can see if the user in question has the appropriate rights at each
level.

ls -ald /.
ls -ald /opt/.
ls -ald /opt/solr/.
ls -ald /opt/solr/solr-shard1/.
ls -ald /opt/solr/solr-shard1/solr.xml

It does seem odd that your solr home would be at a directory called
solr-shard1 ... it makes more sense to me that it would be /opt/solr ...
and that the solr.xml would live there.  Only you know what your
directory structure is, though.

Thanks,
Shawn