It's certainly possible to move a core like this. You say you moved
the core. Did you move the core.properties file as well? And did it
point to the _same_ directory as the original (dataDir property)? The
whole purpose of write.lock is to keep two cores from being able to
update the same index at the same time.

If you have a dataDir in the core.properties file _and_ it points to
an absolute directory then this is proper behavior. And also look at
the paths printed out. "/var/www/solr/data/prindex/data/index/" is
where the write.lock file is. This implies that somehow you have two
cores pointing to the same place.

Of course I may be way off base here....

Oh, and I'd shut down the Solr instance before copying anyghing.

Oh2, I'd have all my Solr instances shut down before copying anything.

Oh3, _really_ examine the core.properties file(s) and be sure they
have different names assigned to each core....

Best,
Erick

On Thu, Aug 24, 2017 at 6:52 PM, Phil Scadden <p.scad...@gns.cri.nz> wrote:
> I am slowing moving 6.5.1 from development to production. After installing
> solr on the final test machine, I tried to supply a core by zipping up the
> data directory on development and unzipping on test.
>
> When I go to admin I get:
>
> Write.lock obviously causing a block. So deleted the write.lock and
> restarted. I get the same error! What gives? Is it not possible to move a
> core like this?
>
>
>
> Looking at the log I see:
>
> java.util.concurrent.ExecutionException:
> org.apache.solr.common.SolrException: Unable to create core [prindex]
>
>          at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>
>          at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>
>          at
> org.apache.solr.core.CoreContainer.lambda$load$6(CoreContainer.java:581)
>
>          at
> org.apache.solr.core.CoreContainer$$Lambda$107/390689829.run(Unknown Source)
>
>          at
> com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
>
>          at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>
>          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>
>          at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
>
>          at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$$Lambda$106/671471369.run(Unknown
> Source)
>
>          at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>
>          at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>
>          at java.lang.Thread.run(Thread.java:745)
>
> Caused by: org.apache.solr.common.SolrException: Unable to create core
> [prindex]
>
>          at
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:933)
>
>          at
> org.apache.solr.core.CoreContainer.lambda$load$5(CoreContainer.java:553)
>
>          at
> org.apache.solr.core.CoreContainer$$Lambda$105/1138410383.call(Unknown
> Source)
>
>          at
> com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
>
>          ... 6 more
>
> Caused by: org.apache.solr.common.SolrException:
> /var/www/solr/data/prindex/data/index/write.lock
>
>          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:965)
>
>          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:831)
>
>          at
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:918)
>
>          ... 9 more
>
> Caused by: java.nio.file.NoSuchFileException:
> /var/www/solr/data/prindex/data/index/write.lock
>
>          at
> sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
>
>          at
> sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
>
>          at
> sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
>
>          at sun.nio.fs.UnixPath.toRealPath(UnixPath.java:837)
>
>          at
> org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:104)
>
>          at
> org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
>
>          at
> org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
>
>          at
> org.apache.lucene.store.FilterDirectory.obtainLock(FilterDirectory.java:104)
>
>          at
> org.apache.lucene.index.IndexWriter.isLocked(IndexWriter.java:4773)
>
>          at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:710)
>
>          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:912)
>
>
>
> Notice: This email and any attachments are confidential and may not be used,
> published or redistributed without the prior written consent of the
> Institute of Geological and Nuclear Sciences Limited (GNS Science). If
> received in error please destroy and immediately notify GNS Science. Do not
> copy or disclose the contents.

Reply via email to