You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2014/08/23 02:18:13 UTC

[jira] [Comment Edited] (SOLR-5322) core discovery can fail w/NPE and no explanation if a non-readable directory exists

    [ https://issues.apache.org/jira/browse/SOLR-5322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14107743#comment-14107743 ] 

Erick Erickson edited comment on SOLR-5322 at 8/23/14 12:18 AM:
----------------------------------------------------------------

Hmmm, for comparison, I just ran an experiment with the multicore setup where I changed core1/data/index to a-r permissions. Solr starts up, albeit with some warnings, which are way more informative. But core0 is still available. Here's the error:

directory '/Users/Erick/apache/4x/solr/example/multicore/core1/data/index' exists and is a directory, but cannot be listed: list() returned null

Which is much more informative than the core discovery bits. So it seems consistent to log an error and drive on.


was (Author: erickerickson):
Hmmm, for comparison, I just ran an experiment with the multicore setup where I changed core1/data/index to a-r permissions. Solr starts up, albeit with some warnings, which are way more informative. But core0 is still available. Here's the error:

directory '/Users/Erick/apache/4x/solr/example/multicore/core1/data/index' exists and is a directory, but cannot be listed: list() returned null

Which is much more informative than the core discovery bits. So on that basis it seems like the the right thing to do is log an error and drive on.

> core discovery can fail w/NPE and no explanation if a non-readable directory exists
> -----------------------------------------------------------------------------------
>
>                 Key: SOLR-5322
>                 URL: https://issues.apache.org/jira/browse/SOLR-5322
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.5
>         Environment: Centos 6.4
> tomcat6
>            Reporter: Said Chavkin
>            Assignee: Erick Erickson
>
> Core discovery doesn't behave well if it encounters a directory it can't read.  We should either make core discover log & ignore directories such as this, or improve the error message in such a situation if we think it should be fatale.
> steps to reproduce...
> {noformat}
> hossman@frisbee:~/lucene/4x_dev/solr/example$ mkdir solr/NO_READ
> hossman@frisbee:~/lucene/4x_dev/solr/example$ chmod a-r solr/NO_READ/
> hossman@frisbee:~/lucene/4x_dev/solr/example$ java -jar start.jar 
> ...
> 1434 [main] ERROR org.apache.solr.servlet.SolrDispatchFilter  – Could not start Solr. Check solr/home property and the logs
> 1452 [main] ERROR org.apache.solr.core.SolrCore  – null:java.lang.NullPointerException
> 	at org.apache.solr.core.CorePropertiesLocator.discoverUnder(CorePropertiesLocator.java:131)
> 	at org.apache.solr.core.CorePropertiesLocator.discoverUnder(CorePropertiesLocator.java:140)
> 	at org.apache.solr.core.CorePropertiesLocator.discover(CorePropertiesLocator.java:123)
> 	at org.apache.solr.core.CoreContainer.load(CoreContainer.java:240)
> {noformat}
> {panel:title="original bug report"}
> Hello.
> When in solr/home directory exists directory to which solr do not have rights, then solr failed to start with exception
> {noformat}
> 2108 [main] INFO org.apache.solr.core.CoresLocator - Looking for core definitions underneath /var/lib/solr
> 2109 [main] ERROR org.apache.solr.servlet.SolrDispatchFilter - Could not start Solr. Check solr/home property and the logs
> 2138 [main] ERROR org.apache.solr.core.SolrCore - null:java.lang.NullPointerException
>         at org.apache.solr.core.CorePropertiesLocator.discoverUnder(CorePropertiesLocator.java:121)
>         at org.apache.solr.core.CorePropertiesLocator.discoverUnder(CorePropertiesLocator.java:130)
>         at org.apache.solr.core.CorePropertiesLocator.discover(CorePropertiesLocator.java:113)
>         at org.apache.solr.core.CoreContainer.load(CoreContainer.java:226)
>         at org.apache.solr.servlet.SolrDispatchFilter.createCoreContainer(SolrDispatchFilter.java:177)
>         at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:127)
>         at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
>         at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
>         at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
>         at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
>         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
>         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
>         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
>         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> 2138 [main] INFO org.apache.solr.servlet.SolrDispatchFilter - SolrDispatchFilter.init() done
> {noformat}
> For example:
> solr home located on /var/lib/solr
> /var/lib/solr is another file system, it has lost+found directory.
> As result solr can't to star.
> Yours faithfully.
> {panel}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org