Message Boards

[LF62GA2] Lucene index error

Tinfo Tinfo, modified 3 Years ago.

[LF62GA2] Lucene index error

New Member Posts: 14 Join Date: 5/14/20 Recent Posts
Hello, i have a problem with Lucene index, suddenly the index stopped working with this error, i've tried to clean the lucene folder and launch a full reindex but after a while the same error appear with a different FileName, the portal has been working fine for years so i don't understand what happened and why reindexing is not working, anyone have suggestions? Thanks.

06:33:24,495 WARN  [liferay/search_writer/SYSTEM_ENGINE-4][ProxyMessageListener:81] com.liferay.portal.kernel.search.SearchException: java.io.IOException: No sub-file with id .fnm found (fileName=_24j.cfs files: [])
com.liferay.portal.kernel.search.SearchException: java.io.IOException: No sub-file with id .fnm found (fileName=_24j.cfs files: [])
	at com.liferay.portal.search.lucene.LuceneIndexWriter.updateDocument(LuceneIndexWriter.java:128)
	at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:85)
	at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:51)
	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: No sub-file with id .fnm found (fileName=_24j.cfs files: [])
	at org.apache.lucene.index.CompoundFileReader.openInput(CompoundFileReader.java:156)
	at org.apache.lucene.index.CompoundFileReader.openInput(CompoundFileReader.java:145)
	at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:74)
	at org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:73)
	at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:115)
	at org.apache.lucene.index.IndexWriter$ReaderPool.get(IndexWriter.java:705)
	at org.apache.lucene.index.IndexWriter$ReaderPool.get(IndexWriter.java:680)
	at org.apache.lucene.index.BufferedDeletesStream.applyDeletes(BufferedDeletesStream.java:245)
	at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3651)
	at org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:3417)
	at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3524)
	at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3506)
	at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3490)
	at com.liferay.portal.search.lucene.IndexAccessorImpl._doCommit(IndexAccessorImpl.java:311)
	at com.liferay.portal.search.lucene.IndexAccessorImpl._commit(IndexAccessorImpl.java:265)
	at com.liferay.portal.search.lucene.IndexAccessorImpl._write(IndexAccessorImpl.java:481)
	at com.liferay.portal.search.lucene.IndexAccessorImpl.updateDocument(IndexAccessorImpl.java:241)
	at com.liferay.portal.search.lucene.LuceneHelperImpl.updateDocument(LuceneHelperImpl.java:737)
	at com.liferay.portal.search.lucene.LuceneHelperUtil.updateDocument(LuceneHelperUtil.java:406)
	at com.liferay.portal.search.lucene.LuceneIndexWriter.updateDocument(LuceneIndexWriter.java:118)
	... 10 more
</init></init>
thumbnail
Jorge Diaz, modified 3 Years ago.

RE: [LF62GA2] Lucene index error

Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
Your index got corrupted.

You have to:
  1. Stop Liferay
  2. Manually delete the lucene index from disk. (its default location is in [LIFERAY_HOME]/data/lucene)
  3. Start Liferay
  4. Execute a full reindex
If you are using a cluster, you have to:
  1. Stop all Liferay nodes
  2. Manually delete the lucene index from disk in all nodes
  3. Start one Liferay node (= it will be the master node)
  4. Execute a full reindex
  5. Once full reindex is done, start the other nodes, they should get the lucene index from the master node.
Be careful with the free space in your Liferey server.
Lucene needs at least same free space than the size of all the lucene index.
If you run out of disk space, any Lucene operation can cause data corruption in the index.
Regards,
Jorge Díaz
Tinfo Tinfo, modified 3 Years ago.

RE: [LF62GA2] Lucene index error

New Member Posts: 14 Join Date: 5/14/20 Recent Posts
Hi Jorge, thanks for the answer but as i wrote i already tried to stop liferay, delete old index, restart liferay and launch a reindex, but during the reindex the same error reapper with diffent FileName.
thumbnail
Jorge Diaz, modified 3 Years ago.

RE: [LF62GA2] Lucene index error

Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
Hi Tinfo,
Did you check you have enough free space in your disk?
There is also a lucene bug that can be related to your problem: https://issues.apache.org/jira/browse/LUCENE-5541
In that bug they say it is more likely to happen in case you have the index in a remote filesystem
Is your lucene or data folder in a remote filesystem?
To avoid throughtput issues it is better to have it in the local filesystem.
Tinfo Tinfo, modified 3 Years ago.

RE: [LF62GA2] Lucene index error

New Member Posts: 14 Join Date: 5/14/20 Recent Posts
Jorge Diaz:

Hi Tinfo,
Did you check you have enough free space in your disk?
There is also a lucene bug that can be related to your problem: https://issues.apache.org/jira/browse/LUCENE-5541
In that bug they say it is more likely to happen in case you have the index in a remote filesystem
Is your lucene or data folder in a remote filesystem?
To avoid throughtput issues it is better to have it in the local filesystem.

Hi Jorge,
we are facing again the same problem, we have plenty of space in our disk and the Lucene index is stored inside the data folder of the Liferay Portal, so not in a remote filesystem, also this portal worked without index problem for years and no changes were made recently, i've read the issue you linked, there is a way to update Lucene to see if this fix the problem? For example we can simply download the updated Lucene jar and copy/paste to the tomcat\webapps\ROOT\WEB-INF\lib folder?Thanks.
thumbnail
Jorge Diaz, modified 3 Years ago.

RE: [LF62GA2] Lucene index error

Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
I  don't  think updating Lucene library directly to ROOT/WEB-INF/lib is a good idea.

Perhaps you could try updating to a more recent version of Liferay.
Liferay 6.2 GA2 is too old, you could try upgrading to latest 6.2 available release (6.2 GA6) updating from 6.2 GA2 should be easy.
However, you should think upgrading to Liferay 7.3, starting with 7.x, we got rid of Lucene library and now Liferay just connect to an external Elasticsearch server.
thumbnail
Olaf Kock, modified 3 Years ago.

RE: [LF62GA2] Lucene index error

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
You should immediately update to GA6 and patch. Then validate if your problem still persists. There's no use in being a couple of bugfix-releases behind and selectively mock around with the environment, making later updates impossible. At the very least try to reproduce on the latest GA of that major version, but keep in mind that even that is outdated by now.