Solr 损坏索引异常

Solr corrupt index exception

所以,我在两个不同的节点中有一个 solr 版本 7.7.2 运行。我想将索引数据从一个复制到另一个。所有其他配置文件保持不变(包括核心和 solrconfig.xml)。所以我将数据目录和配置集从一个节点复制粘贴到另一个节点。

现在打开启动服务器,我收到这个异常 -

2022-03-22 14:30:48.754 ERROR (coreContainerWorkExecutor-2-thread-1) [   ] o.a.s.c.CoreContainer Error waiting for SolrCore to be loaded on startup
org.apache.solr.common.SolrException: Unable to create core [master_mpl_Product_default]
    at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1208) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.CoreContainer.lambda$load(CoreContainer.java:699) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197) ~[metrics-core-3.2.6.jar:3.2.6]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_144]
    at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute[=10=](ExecutorUtil.java:209) ~[solr-solrj-7.7.2.jar:7.7.2 d4c30fc2856154f2c1fefc589eb7cd070a415b94 - janhoy - 2019-05-28 23:37:52]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1048) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:874) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1187) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    ... 7 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
    at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2137) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2257) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1106) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:993) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:874) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1187) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    ... 7 more
Caused by: org.apache.lucene.index.CorruptIndexException: Unexpected file read error while reading index. (resource=BufferedChecksumIndexInput(MMapIndexInput(path="/solr/slave-7.7.2/server/server/solr/master_mpl_Product_default/data/index.20210914122914586/segments_5m43")))
    at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:293) ~[lucene-core-7.7.2.jar:7.7.2 d4c30fc2856154f2c1fefc589eb7cd070a415b94 - janhoy - 2019-05-28 23:30:25]
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:845) ~[lucene-core-7.7.2.jar:7.7.2 d4c30fc2856154f2c1fefc589eb7cd070a415b94 - janhoy - 2019-05-28 23:30:25]
    at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:124) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:97) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:257) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:131) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2098) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2257) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1106) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:993) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:874) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1187) ~[solr-core-7.7.2.jar:7.7.2-SNAPSHOT 847b1625ff5e2c7b8069ce276c0fb9f12ffb1aa8 - amritsarkar - 2021-01-07 10:58:40]
    ... 7 more
Caused by: java.nio.file.NoSuchFileException: /solr/slave-7.7.2/server/server/solr/master_mpl_Product_default/data/index.20210914122914586/_h8tk.si
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[?:1.8.0_144]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_144]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_144]
    at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177) ~[?:1.8.0_144]
    at java.nio.channels.FileChannel.open(FileChannel.java:287) ~[?:1.8.0_144]

错误表示在索引文件夹中找不到文件异常。如果我遗漏了什么,请告诉我。

干杯

按照@MatsLindh 的建议,我备份了现有的核心,然后复制了数据。节点现在工作正常。

感谢@MatsLindh 的帮助