AnsweredAssumed Answered

FileNotFoundException on lucene indexes

Question asked by willodotcom on Mar 3, 2008
Latest reply on Mar 3, 2008 by andy
Hi everyone,

Recently the following appeared in the alfreso.log file:


09:23:14,897 ERROR [org.alfresco.repo.transaction.AlfrescoTransactionSupport] After completion (committed) Lucene exception
java.lang.RuntimeException: Failed to delete lucene lock file
        at org.apache.lucene.store.FSDirectory$FSLock.release(FSDirectory.java:430)
        at org.apache.lucene.index.IndexReader.commit(IndexReader.java:493)
        at org.apache.lucene.index.IndexReader.close(IndexReader.java:512)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.doFTSIndexCommit(LuceneIndexerImpl.java:641)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.commit(LuceneIndexerImpl.java:518)
        at org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory.commit(LuceneIndexerAndSearcherFactory.java:671)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.afterCompletion(AlfrescoTransactionSupport.java:638)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:725)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:697)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:534)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy66.index(Unknown Source)
        at org.alfresco.repo.search.impl.lucene.fts.FTSIndexerJob.execute(FTSIndexerJob.java:36)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)


On restarting the server, I get the following when attempting to log in:

java.io.FileNotFoundException: /opt/alfresco_data/lucene-indexes/workspace/SpacesStore/index/_26at.fnm (No such file or directory)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(Unknown Source)
        at org.apache.lucene.store.FSInputStream$Descriptor.<init>(FSDirectory.java:518)
        at org.apache.lucene.store.FSInputStream.<init>(FSDirectory.java:549)
        at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:318)
        at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:53)
        at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:109)
        at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:94)
        at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:122)
        at org.apache.lucene.store.Lock$With.run(Lock.java:109)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:95)
        at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:38)
        at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:288)
        at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl.query(LuceneSearcherImpl.java:221)
        at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:77)
        at org.alfresco.repo.security.person.PersonServiceImpl.getPersonOrNull(PersonServiceImpl.java:142)
        at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:105)
        at org.alfresco.filesys.server.auth.CifsAuthenticator.getHomeFolderForUser(CifsAuthenticator.java:865)
        at org.alfresco.filesys.server.auth.ntlm.AlfrescoAuthenticator.doMD4UserAuthentication(AlfrescoAuthenticator.java:305)
        at org.alfresco.filesys.server.auth.ntlm.AlfrescoAuthenticator.authenticateUser(AlfrescoAuthenticator.java:144)
        at org.alfresco.filesys.server.auth.CifsAuthenticator.processSessionSetup(CifsAuthenticator.java:496)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.procSessionSetup(NTProtocolHandler.java:399)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:213)
        at org.alfresco.filesys.smb.server.SMBSrvSession.run(SMBSrvSession.java:1554)
        at java.lang.Thread.run(Unknown Source)
10:38:01,515 ERROR [org.alfresco.smb.protocol] Closing session due to exception
org.alfresco.repo.search.impl.lucene.LuceneIndexException: Failed to open IndexSarcher for /opt/alfresco_data/lucene-indexes/workspace/SpacesStore//index/
        at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:317)
        at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl.query(LuceneSearcherImpl.java:221)
        at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:77)
        at org.alfresco.repo.security.person.PersonServiceImpl.getPersonOrNull(PersonServiceImpl.java:142)
        at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:105)
        at org.alfresco.filesys.server.auth.CifsAuthenticator.getHomeFolderForUser(CifsAuthenticator.java:865)
        at org.alfresco.filesys.server.auth.ntlm.AlfrescoAuthenticator.doMD4UserAuthentication(AlfrescoAuthenticator.java:305)
        at org.alfresco.filesys.server.auth.ntlm.AlfrescoAuthenticator.authenticateUser(AlfrescoAuthenticator.java:144)
        at org.alfresco.filesys.server.auth.CifsAuthenticator.processSessionSetup(CifsAuthenticator.java:496)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.procSessionSetup(NTProtocolHandler.java:399)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:213)
        at org.alfresco.filesys.smb.server.SMBSrvSession.run(SMBSrvSession.java:1554)
        at java.lang.Thread.run(Unknown Source)

the _26at.fnm file is indeed missing.. any ideas on how to resolve this? I have tried reindexing, but fails with:

12:50:31,267 ERROR [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Transaction reindex failed:
   txn: 1156147477430:b081b63b-30eb-11db-a1a4-d549d10fa87d
org.alfresco.repo.search.impl.lucene.LuceneIndexException: Failed to open IndexSarcher for /opt/alfresco_data/lucene-indexes/workspace/SpacesStore//index/
        at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:317)
        at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl.query(LuceneSearcherImpl.java:221)
        at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:77)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent$ReindexCallback.reindexNodes(FullIndexRecoveryComponent.java:602)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent$ReindexCallback.doInHibernate(FullIndexRecoveryComponent.java:583)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent$4.doWork(FullIndexRecoveryComponent.java:522)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
        at org.alfresco.repo.transaction.TransactionUtil.executeInNonPropagatingUserTransaction(TransactionUtil.java:108)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent.reindexNodes(FullIndexRecoveryComponent.java:529)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent.reindexNodes(FullIndexRecoveryComponent.java:498)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent.access$600(FullIndexRecoveryComponent.java:79)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent$ReindexRunner.run(FullIndexRecoveryComponent.java:378)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: read past EOF
        at org.apache.lucene.store.InputStream.refill(InputStream.java:154)
        at org.apache.lucene.store.InputStream.readByte(InputStream.java:43)
        at org.apache.lucene.store.InputStream.readVInt(InputStream.java:83)
        at org.apache.lucene.index.FieldInfos.read(FieldInfos.java:195)
        at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:55)
        at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:109)
        at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:94)
        at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:122)
        at org.apache.lucene.store.Lock$With.run(Lock.java:109)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:95)
        at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:38)
        at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:288)
        … 14 more

Any help you can give me would be greatly appreciated!

Cheers,

Chris.

Outcomes