tdelboni
tdelboni

Reputation: 93

FileNotFoundException exception upgrading Solr index in DSpace 1.8

I'm upgrading DSpace 1.8 to DSpace 5.2. All went fine but the Solr indexes update. It complains about the absence of file _1j0e.fnm in solr/statistics/data/index. How can I fix it? Here's the exception and the contents of index dir:

mylinux #> ant update_solr_indexes
Buildfile: /opt/dspace/dspace/target/dspace-installer/build.xml

update_solr_indexes:
     [echo] Checking if any Solr indexes (/opt/dspace/deploy/solr/*) need upgrading...
     [echo] Current version of Solr/Lucene: 4.10.2

check_solr_index:
     [echo] Checking if the Solr index at /opt/dspace/deploy/solr/statistics/data/index/ is >= Solr 3.5.0
     [echo] The Solr index in /opt/dspace/deploy/solr/statistics/data/index/ needs an upgrade to Solr 3.5.0

upgrade_solr_index:
     [echo] Upgrading Solr/Lucene Index at /opt/dspace/deploy/solr/statistics/data/index/ to Solr/Lucene 3.5.0.
     [echo] Upgrading the Solr index in /opt/dspace/deploy/solr/statistics/data/index/. Depending on the index size, this may take a while (please be patient)...
     [java] Exception in thread "main" java.io.FileNotFoundException: /opt/dspace/deploy/solr/statistics/data/index/_1j0e.fnm (No such file or directory)
     [java]     at java.io.RandomAccessFile.open(Native Method)
     [java]     at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
     [java]     at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:214)
     [java]     at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:345)
     [java]     at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:74)
     [java]     at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1222)
     [java]     at org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1238)
     [java]     at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1171)
     [java]     at org.apache.lucene.index.IndexUpgrader.upgrade(IndexUpgrader.java:132)
     [java]     at org.apache.lucene.index.IndexUpgrader.main(IndexUpgrader.java:85)

mylinux #> ls -l
total 351716
-rw-r--r-- 1 dspace users 253833167 Set  1 22:00 _1j1m.fdt
-rw-r--r-- 1 dspace users  14114820 Set  1 22:00 _1j1m.fdx
-rw-r--r-- 1 dspace users        90 Set  1 22:00 _1j1m.fnm
-rw-r--r-- 1 dspace users  36393369 Set  1 22:00 _1j1m.frq
-rw-r--r-- 1 dspace users  28841681 Set  1 22:00 _1j1m.prx
-rw-r--r-- 1 dspace users    328616 Set  1 22:00 _1j1m.tii
-rw-r--r-- 1 dspace users  25362797 Set  1 22:00 _1j1m.tis
-rw-r--r-- 1 dspace users    498821 Set  2 10:06 _1j31.fdt
-rw-r--r-- 1 dspace users     25492 Set  2 10:06 _1j31.fdx
-rw-r--r-- 1 dspace users        90 Set  2 10:06 _1j31.fnm
-rw-r--r-- 1 dspace users     57288 Set  2 10:06 _1j31.frq
-rw-r--r-- 1 dspace users     55844 Set  2 10:06 _1j31.prx
-rw-r--r-- 1 dspace users       947 Set  2 10:06 _1j31.tii
-rw-r--r-- 1 dspace users     69004 Set  2 10:06 _1j31.tis
-rw-r--r-- 1 dspace users      1163 Set  2 10:27 _1j32.fdt
-rw-r--r-- 1 dspace users        76 Set  2 10:27 _1j32.fdx
-rw-r--r-- 1 dspace users        90 Set  2 10:27 _1j32.fnm
-rw-r--r-- 1 dspace users        98 Set  2 10:27 _1j32.frq
-rw-r--r-- 1 dspace users         4 Set  2 10:27 _1j32.nrm
-rw-r--r-- 1 dspace users       110 Set  2 10:27 _1j32.prx
-rw-r--r-- 1 dspace users        35 Set  2 10:27 _1j32.tii
-rw-r--r-- 1 dspace users       737 Set  2 10:27 _1j32.tis
-rw-r--r-- 1 dspace users      2073 Set  2 10:44 _1j33.fdt
-rw-r--r-- 1 dspace users       108 Set  2 10:44 _1j33.fdx
-rw-r--r-- 1 dspace users        90 Set  2 10:44 _1j33.fnm
-rw-r--r-- 1 dspace users       182 Set  2 10:44 _1j33.frq
-rw-r--r-- 1 dspace users         4 Set  2 10:44 _1j33.nrm
-rw-r--r-- 1 dspace users       233 Set  2 10:44 _1j33.prx
-rw-r--r-- 1 dspace users        35 Set  2 10:44 _1j33.tii
-rw-r--r-- 1 dspace users       996 Set  2 10:44 _1j33.tis
-rw-r--r-- 1 dspace users      1298 Set  2 11:00 _1j34.fdt
-rw-r--r-- 1 dspace users        68 Set  2 11:00 _1j34.fdx
-rw-r--r-- 1 dspace users        90 Set  2 11:00 _1j34.fnm
-rw-r--r-- 1 dspace users       112 Set  2 11:00 _1j34.frq
-rw-r--r-- 1 dspace users         4 Set  2 11:00 _1j34.nrm
-rw-r--r-- 1 dspace users       140 Set  2 11:00 _1j34.prx
-rw-r--r-- 1 dspace users        35 Set  2 11:00 _1j34.tii
-rw-r--r-- 1 dspace users       864 Set  2 11:00 _1j34.tis
-rw-r--r-- 1 dspace users      3121 Set  2 11:17 _1j35.fdt
-rw-r--r-- 1 dspace users       156 Set  2 11:17 _1j35.fdx
-rw-r--r-- 1 dspace users        90 Set  2 11:17 _1j35.fnm
-rw-r--r-- 1 dspace users       281 Set  2 11:17 _1j35.frq
-rw-r--r-- 1 dspace users         4 Set  2 11:17 _1j35.nrm
-rw-r--r-- 1 dspace users       360 Set  2 11:17 _1j35.prx
-rw-r--r-- 1 dspace users        35 Set  2 11:17 _1j35.tii
-rw-r--r-- 1 dspace users      1516 Set  2 11:17 _1j35.tis
-rw-r--r-- 1 dspace users         0 Set  2 11:18 _1j36.fdt
-rw-r--r-- 1 dspace users         0 Set  2 11:18 _1j36.fdx
-rw-r--r-- 1 dspace users      1398 Set  2 11:17 segments_1djh
-rw-r--r-- 1 dspace users        20 Set  2 11:17 segments.gen
-rw-r--r-- 1 dspace users         0 Set  2 11:18 write.lock

Upvotes: 2

Views: 439

Answers (1)

schweerelos
schweerelos

Reputation: 2189

You must shut down your web application container (probably Tomcat) before you do the ant step while upgrading. The contents of the index directory keep changing while Tomcat is running, which is likely to throw things off. You may also run into write lock problems if you run ant update during an upgrade with Tomcat running.

Upvotes: 1

Related Questions