首页 > 解决方案 > 从 Apache Solr 4.7.2 直接升级到 Apache Solr 7.6 的问题?

问题描述

我有一个基于 Apache Solr 的项目,我想将版本从 4.7.2 升级到 7.6,我参考文档https://github.com/cominvent/solr-tools/tree/master/upgradeindex升级索引从 4.7.2 到 5 并得到以下输出。

我不知道如何处理输出。您能否请有人向我建议一个指导方针,以进一步将整个 Solr 索引升级到更高版本。

./upgradeindex.sh -t 5 /home/solr
Target version is 5
Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/4.10.4/lucene-backward-codecs-4.10.4.jar
curl: (7) couldn't connect to host
Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/5.5.4/lucene-backward-codecs-5.5.4.jar
curl: (7) couldn't connect to host
Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/6.6.0/lucene-backward-codecs-6.6.0.jar
######################################################################## 100.0%
Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-core/4.10.4/lucene-core-4.10.4.jar
######################################################################## 100.0%
Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-core/5.5.4/lucene-core-5.5.4.jar
######################################################################## 100.0%
Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-core/6.6.0/lucene-core-6.6.0.jar
######################################################################## 100.0%
Core collection1 - /home/solr/collection1
Exception in thread "main" org.apache.lucene.store.LockObtainFailedException: Lock held by another program: /home/solr/collection1/data/index/write.lock
    at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:118)
    at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
    at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
    at org.apache.lucene.index.CheckIndex.<init>(CheckIndex.java:401)
    at org.apache.lucene.index.CheckIndex.doMain(CheckIndex.java:2671)
    at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:2599)
Exception in thread "main" org.apache.lucene.store.LockObtainFailedException: Lock held by another program: /home/solr/collection1/data/index/write.lock
    at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:118)
    at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
    at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
    at org.apache.lucene.index.CheckIndex.<init>(CheckIndex.java:362)
    at org.apache.lucene.index.CheckIndex.doMain(CheckIndex.java:2307)
    at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:2235)
- Backing up index to /home/solr/collection1/data/index_backup_4.7.0.tgz
- Index version is 4.7.0, checking integrity
Exception in thread "main" org.apache.lucene.store.LockObtainFailedException: Lock held by another program: /home/solr/collection1/data/index/write.lock
    at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:118)
    at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
    at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
    at org.apache.lucene.index.CheckIndex.<init>(CheckIndex.java:362)
    at org.apache.lucene.index.CheckIndex.doMain(CheckIndex.java:2307)
    at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:2235)
- Upgrading 4.x -> 5.x
Exception in thread "main" org.apache.lucene.store.LockObtainFailedException: Lock held by another program: /home/solr/collection1/data/index/write.lock
    at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:118)
    at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
    at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:776)
    at org.apache.lucene.index.IndexUpgrader.upgrade(IndexUpgrader.java:167)
    at org.apache.lucene.index.IndexUpgrader.main(IndexUpgrader.java:78)
DONE

标签: solrluceneupgrade

解决方案


推荐阅读