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 Moritz Munte <mo...@gmail.com> on 2017/06/22 12:37:59 UTC

Error after moving index

Hello,

 

I created an index on my local machine (Windows 10) and it works fine there.

After uploading the index to the production server (Linux), the server shows
an error:

 

java.util.concurrent.ExecutionException:
org.apache.solr.common.SolrException: Unable to create core
[contentselect_v3]

        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/382729.run(Unknown
Source)

        at
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(In
strumentedExecutorService.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$e
xecute$0(ExecutorUtil.java:229)

        at
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$$Lambda$
106/7410549.run(Unknown Source)

        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
42)

        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

        at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.solr.common.SolrException: Unable to create core
[contentselect_v3]

        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/10330637.call(Unknown Source)

        at
com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(I
nstrumentedExecutorService.java:197)

        ... 6 more

Caused by: org.apache.solr.common.SolrException: Error opening new searcher

        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: org.apache.solr.common.SolrException: Error opening new searcher

        at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2032)

        at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2152)

        at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1054)

        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:938)

        ... 11 more

Caused by: org.apache.lucene.index.CorruptIndexException: Unexpected file
read error while reading index.
(resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/data/index/segme
nts_2e5r")))

        at
org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:290)

        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:928)

        at
org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:118)

        at
org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:93)

        at
org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSol
rCoreState.java:248)

        at
org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreSt
ate.java:122)

        at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1993)

        ... 14 more

Caused by: java.io.EOFException: read past EOF:
NIOFSIndexInput(path="/data/index/segments_2e5r")

        at
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:33
6)

        at
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java
:140)

        at
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java
:116)

        at
org.apache.lucene.store.BufferedChecksumIndexInput.readBytes(BufferedChecksu
mIndexInput.java:49)

        at org.apache.lucene.store.DataInput.readString(DataInput.java:237)

        at
org.apache.lucene.store.DataInput.readMapOfStrings(DataInput.java:287)

        at
org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:402)

        at
org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:288)

        ... 20 more

 

 

 

 

After doing checkIndex on the index, I get this error:

 

ERROR: could not read any segments file in directory

org.apache.lucene.index.CorruptIndexException: Unexpected file read error
while reading index.
(resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/data/index/segme
nts_2e5r")))

        at
org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:290)

        at
org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:527)

        at org.apache.lucene.index.CheckIndex.doCheck(CheckIndex.java:2769)

        at org.apache.lucene.index.CheckIndex.doMain(CheckIndex.java:2671)

        at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:2597)

Caused by: java.io.EOFException: read past EOF:
NIOFSIndexInput(path="/data/index/segments_2e5r")

        at
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:33
6)

        at
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java
:140)

        at
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java
:116)

        at
org.apache.lucene.store.BufferedChecksumIndexInput.readBytes(BufferedChecksu
mIndexInput.java:49)

        at org.apache.lucene.store.DataInput.readString(DataInput.java:237)

        at
org.apache.lucene.store.DataInput.readMapOfStrings(DataInput.java:287)

        at
org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:402)

        at
org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:288)

        ... 4 more

 

 

I'm wondering what went wrong. I checked the files that I uploaded,
everything seems to be complete, also I uploaded the segments_2e5r again,
still same error.

 

Any Idea?

 

Best

Moritz


Re: Error after moving index

Posted by Erick Erickson <er...@gmail.com>.
"They're just files, man". If you can afford a bit of down-time, you can
shut your Solr down and recursively copy the data directory from your
source to destingation. SCP, rsync, whatever then restart solr.

Do take some care when copying between Windows and *nix that you do a
_binary_ transfer.

If you continually have a problem with transferring between Windows and
*nix we'll have to investigate further. And I'm assuming this is
stand-alone and there's only a single restore going on at a time.....

Best,
Erick

On Thu, Jun 22, 2017 at 9:13 AM, Moritz Michael <mo...@gmail.com>
wrote:

>
>
>
>
>
>
>
>
>                 BTW, is there a better/recommended way to transfer an
> index to another solr?
>
>
>
>
>
>
>
>
>
> On Thu, Jun 22, 2017 at 6:09 PM +0200, "Moritz Michael" <
> moritz.munte@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>                 Hello Michael,
> I used the backup functionality to create a snapshot and uploaded this
> snapshot, so I feel it should be save.
> I'll try it again. Maybe the copy operation wasn't successful.
> BestMoritz
>
>
>
>         _____________________________
> From: Michael Kuhlmann <ku...@solr.info>
> Sent: Donnerstag, Juni 22, 2017 2:50 PM
> Subject: Re: Error after moving index
> To:  <so...@lucene.apache.org>
>
>
> Hi Moritz,
>
> did you stop your local Solr sever before? Copying data from a running
> instance may cause headaches.
>
> If yes, what happens if you copy everything again? It seems that your
> copy operations wasn't successful.
>
> Best,
> Michael
>
> Am 22.06.2017 um 14:37 schrieb Moritz Munte:
> > Hello,
> >
> >
> >
> > I created an index on my local machine (Windows 10) and it works fine
> there.
> >
> > After uploading the index to the production server (Linux), the server
> shows
> > an error:
> .....
>
>
>
>
>
>
>
>
>
>

Re: Error after moving index

Posted by Susheel Kumar <su...@gmail.com>.
Usually we index directly into Prod solr than copying from local/lower
environments.  If that works in your scenario, i would suggest to directly
index into Prod than copying/restoring from local Windows env to Linux.

On Thu, Jun 22, 2017 at 12:13 PM, Moritz Michael <mo...@gmail.com>
wrote:

>
>
>
>
>
>
>
>
>                 BTW, is there a better/recommended way to transfer an
> index to another solr?
>
>
>
>
>
>
>
>
>
> On Thu, Jun 22, 2017 at 6:09 PM +0200, "Moritz Michael" <
> moritz.munte@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>                 Hello Michael,
> I used the backup functionality to create a snapshot and uploaded this
> snapshot, so I feel it should be save.
> I'll try it again. Maybe the copy operation wasn't successful.
> BestMoritz
>
>
>
>         _____________________________
> From: Michael Kuhlmann <ku...@solr.info>
> Sent: Donnerstag, Juni 22, 2017 2:50 PM
> Subject: Re: Error after moving index
> To:  <so...@lucene.apache.org>
>
>
> Hi Moritz,
>
> did you stop your local Solr sever before? Copying data from a running
> instance may cause headaches.
>
> If yes, what happens if you copy everything again? It seems that your
> copy operations wasn't successful.
>
> Best,
> Michael
>
> Am 22.06.2017 um 14:37 schrieb Moritz Munte:
> > Hello,
> >
> >
> >
> > I created an index on my local machine (Windows 10) and it works fine
> there.
> >
> > After uploading the index to the production server (Linux), the server
> shows
> > an error:
> .....
>
>
>
>
>
>
>
>
>
>

Re: Error after moving index

Posted by Moritz Michael <mo...@gmail.com>.


	
		
		
	
		
		BTW, is there a better/recommended way to transfer an index to another solr?
		

		
	





On Thu, Jun 22, 2017 at 6:09 PM +0200, "Moritz Michael" <mo...@gmail.com> wrote:













	
		
		
	
		
		Hello Michael,
I used the backup functionality to create a snapshot and uploaded this snapshot, so I feel it should be save. 
I'll try it again. Maybe the copy operation wasn't successful. 
BestMoritz
		

		
	_____________________________
From: Michael Kuhlmann <ku...@solr.info>
Sent: Donnerstag, Juni 22, 2017 2:50 PM
Subject: Re: Error after moving index
To:  <so...@lucene.apache.org>


Hi Moritz,

did you stop your local Solr sever before? Copying data from a running
instance may cause headaches.

If yes, what happens if you copy everything again? It seems that your
copy operations wasn't successful.

Best,
Michael

Am 22.06.2017 um 14:37 schrieb Moritz Munte:
> Hello,
>
>  
>
> I created an index on my local machine (Windows 10) and it works fine there.
>
> After uploading the index to the production server (Linux), the server shows
> an error:
.....










Re: Error after moving index

Posted by Moritz Michael <mo...@gmail.com>.
	
		
		
	
		
		Hello Michael,
I used the backup functionality to create a snapshot and uploaded this snapshot, so I feel it should be save. 
I'll try it again. Maybe the copy operation wasn't successful. 
BestMoritz
		

		
	_____________________________
From: Michael Kuhlmann <ku...@solr.info>
Sent: Donnerstag, Juni 22, 2017 2:50 PM
Subject: Re: Error after moving index
To:  <so...@lucene.apache.org>


Hi Moritz,

did you stop your local Solr sever before? Copying data from a running
instance may cause headaches.

If yes, what happens if you copy everything again? It seems that your
copy operations wasn't successful.

Best,
Michael

Am 22.06.2017 um 14:37 schrieb Moritz Munte:
> Hello,
>
>  
>
> I created an index on my local machine (Windows 10) and it works fine there.
>
> After uploading the index to the production server (Linux), the server shows
> an error:
.....





Re: Error after moving index

Posted by Michael Kuhlmann <ku...@solr.info>.
Hi Moritz,

did you stop your local Solr sever before? Copying data from a running
instance may cause headaches.

If yes, what happens if you copy everything again? It seems that your
copy operations wasn't successful.

Best,
Michael

Am 22.06.2017 um 14:37 schrieb Moritz Munte:
> Hello,
>
>  
>
> I created an index on my local machine (Windows 10) and it works fine there.
>
> After uploading the index to the production server (Linux), the server shows
> an error:
.....