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 Modassar Ather <mo...@gmail.com> on 2014/04/14 06:05:13 UTC

Core is not getting loaded with copied index.

Hi,

I indexed few documents under a core of Solr 4.6.1 instance deployed on
Tomcat and copied the same index to other Solr instance with a core having
same configurations.
Before copying the index, source Solr instance was stopped. But when I
start the other instance with the copied index it throws following
exception due to which the core is not getting loaded.

Apr 10, 2014 1:00:28 PM org.apache.solr.update.
SolrIndexWriter finalize
SEVERE: SolrIndexWriter was not closed prior to finalize(), indicates a bug
-- POSSIBLE RESOURCE LEAK!!!
Apr 10, 2014 1:00:28 PM org.apache.solr.update.SolrIndexWriter close
SEVERE: Error closing IndexWriter, trying rollback
java.lang.NullPointerException
        at
org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:981)
        at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:931)
        at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:893)
        at
org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:132)
        at
org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:185)
        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)
        at java.lang.ref.Finalizer.access$100(Finalizer.java:32)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:190)

Kindly share your thoughts on this issue.

Regards,
Modassar

Re: Core is not getting loaded with copied index.

Posted by Modassar Ather <mo...@gmail.com>.
Thanks Shawn for your suggestion.

Earlier the write permission was set only on the *data *directory. Per your
suggestion after providing write access to
*data/index* folder and all the files under it the core gets loaded.

Regards,
Modassar


On Tue, Apr 15, 2014 at 10:12 AM, Shawn Heisey <so...@elyograg.org> wrote:

> On 4/14/2014 10:25 PM, Modassar Ather wrote:
> > Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain
> > timed out: NativeFSLock@<path>/data/index/write.lock:
> > java.io.FileNotFoundException: <path>/data/index/write.lock (Permission
> > denied)
>
> This sounds like the user (the one that's running Solr) does not have
> write permission to the index directory.  That user should have full
> access to the data directory and everything under it.
>
> Thanks,
> Shawn
>
>

Re: Core is not getting loaded with copied index.

Posted by Shawn Heisey <so...@elyograg.org>.
On 4/14/2014 10:25 PM, Modassar Ather wrote:
> Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain
> timed out: NativeFSLock@<path>/data/index/write.lock:
> java.io.FileNotFoundException: <path>/data/index/write.lock (Permission
> denied)

This sounds like the user (the one that's running Solr) does not have
write permission to the index directory.  That user should have full
access to the data directory and everything under it.

Thanks,
Shawn


Re: Core is not getting loaded with copied index.

Posted by Modassar Ather <mo...@gmail.com>.
Hi,

The index is the fresh one (older index deleted) and there is no soft
commit on them.
There are other logs available a part of which is as follows:

Apr 11, 2014 9:34:49 AM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Unable to create core:
corename
    at
org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:986)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:606)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:251)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:243)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    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:744)
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:834)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:625)
    at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:562)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:597)
    ... 8 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1477)
    at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1589)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:821)
    ... 11 more

Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain
timed out: NativeFSLock@<path>/data/index/write.lock:
java.io.FileNotFoundException: <path>/data/index/write.lock (Permission
denied)

At same time when the index copied contains the *write.lock* file it
complains with following error.

Apr 15, 2014 9:51:29 AM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Unable to create core:
corename
        at
org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:986)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:606)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:251)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:243)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        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:744)
Caused by: org.apache.solr.common.SolrException: Index locked for write for
core corename
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:834)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:625)


Thanks,
Modassar



On Mon, Apr 14, 2014 at 11:08 AM, Shawn Heisey <so...@elyograg.org> wrote:

> On 4/13/2014 10:05 PM, Modassar Ather wrote:
> > I indexed few documents under a core of Solr 4.6.1 instance deployed on
> > Tomcat and copied the same index to other Solr instance with a core
> having
> > same configurations.
> > Before copying the index, source Solr instance was stopped. But when I
> > start the other instance with the copied index it throws following
> > exception due to which the core is not getting loaded.
> >
> > Apr 10, 2014 1:00:28 PM org.apache.solr.update.
> > SolrIndexWriter finalize
> > SEVERE: SolrIndexWriter was not closed prior to finalize(), indicates a
> bug
> > -- POSSIBLE RESOURCE LEAK!!!
> > Apr 10, 2014 1:00:28 PM org.apache.solr.update.SolrIndexWriter close
> > SEVERE: Error closing IndexWriter, trying rollback
> > java.lang.NullPointerException
> >         at
> > org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:981)
> >         at
> org.apache.lucene.index.IndexWriter.close(IndexWriter.java:931)
> >         at
> org.apache.lucene.index.IndexWriter.close(IndexWriter.java:893)
> >         at
> > org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:132)
> >         at
> > org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:185)
> >         at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
> >         at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)
> >         at java.lang.ref.Finalizer.access$100(Finalizer.java:32)
> >         at
> java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:190)
>
> Did you delete any existing index and tlog directories on the target
> server before you copied the index over?  If you are using soft commits
> at all, you should copy the tlog directory in addition to the index
> directory.
>
> Are there any other error messages in the log?  Is there more detail to
> this error?
>
> Thanks,
> Shawn
>
>

Re: Core is not getting loaded with copied index.

Posted by Shawn Heisey <so...@elyograg.org>.
On 4/13/2014 10:05 PM, Modassar Ather wrote:
> I indexed few documents under a core of Solr 4.6.1 instance deployed on
> Tomcat and copied the same index to other Solr instance with a core having
> same configurations.
> Before copying the index, source Solr instance was stopped. But when I
> start the other instance with the copied index it throws following
> exception due to which the core is not getting loaded.
> 
> Apr 10, 2014 1:00:28 PM org.apache.solr.update.
> SolrIndexWriter finalize
> SEVERE: SolrIndexWriter was not closed prior to finalize(), indicates a bug
> -- POSSIBLE RESOURCE LEAK!!!
> Apr 10, 2014 1:00:28 PM org.apache.solr.update.SolrIndexWriter close
> SEVERE: Error closing IndexWriter, trying rollback
> java.lang.NullPointerException
>         at
> org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:981)
>         at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:931)
>         at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:893)
>         at
> org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:132)
>         at
> org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:185)
>         at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
>         at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)
>         at java.lang.ref.Finalizer.access$100(Finalizer.java:32)
>         at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:190)

Did you delete any existing index and tlog directories on the target
server before you copied the index over?  If you are using soft commits
at all, you should copy the tlog directory in addition to the index
directory.

Are there any other error messages in the log?  Is there more detail to
this error?

Thanks,
Shawn