java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.SimpleFSDirectory@...: files: indexprops.xml write.lock

I have also met this issue.

Openfire version: 4.3.1;
OS: Windows 2016
Java version: zulu8.36.0.1-ca-jdk8.0.202-win_x64
Monitoring plugin version: 1.7.0

logs:
2019.04.01 12:00:43 org.jivesoftware.openfire.archive.ArchiveIndexer - no segments* file found in org.apache.lucene.store.SimpleFSDirectory@C:\chat\monitoring\search lockFactory=org.apache.lucene.store.SimpleFSLockFactory@283ca875: files: indexprops.xml write.lock

java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.SimpleFSDirectory@C:\chat\monitoring\search lockFactory=org.apache.lucene.store.SimpleFSLockFactory@283ca875: files: indexprops.xml write.lock

at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:634) ~[lucene-core-2.9.4.jar!/:?]

at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:517) ~[lucene-core-2.9.4.jar!/:?]

at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:306) ~[lucene-core-2.9.4.jar!/:?]

at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1596) ~[lucene-core-2.9.4.jar!/:?]

at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1090) ~[lucene-core-2.9.4.jar!/:?]

at org.apache.lucene.index.IndexModifier.init(IndexModifier.java:176) ~[lucene-core-2.9.4.jar!/:?]

at org.apache.lucene.index.IndexModifier.<init>(IndexModifier.java:123) ~[lucene-core-2.9.4.jar!/:?]

at org.jivesoftware.openfire.archive.ArchiveIndexer.updateIndex(ArchiveIndexer.java:250) [monitoring-1.7.0.jar!/:?]

at org.jivesoftware.openfire.archive.ArchiveIndexer$2.run(ArchiveIndexer.java:175) [monitoring-1.7.0.jar!/:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_202]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_202]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_202]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_202]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]

Similar issue are:

[Solution: I then re-created the index and the missing file was created and the error went away]
and

[ Solution: … so I rebuilt my indexes in the monitoring plugin and it created the file where it is needed.]

But the solution is unclear. Still have no idea how to rebuild or recreate the index.

Wait for some experts to answer this question.

I have moved your question to a separate thread as those threads were old and about older versions of Openfire than you use probably. Do you see any real problems aside that error? Messages not being archived or not showing up in the search?

Provide more information about your setup.

Openfire version
OS
Java version
Monitoring plugin version

Also copy here your error, it might looks similar like in that post, but may have some additional information.

Thank you wroot! Updated.

To re-create indexes go to Admin Console. Archiving menu. Archiving Settings. Press Rebuild Index at the bottom.

What i am able to find about these Lucene errors is that there could be no index file (which rebuilding might fix) or that there are permissions issues (Openfire process should have write permissions in that /monitoring/search folder) or maybe lock files are in that folder (stop Openfire, do backup and delete these lock files) https://stackoverflow.com/questions/3802021/no-segments-file-found

Thank you wroot!

What if monitoring plugin is installed, but does not appear as an option on the Admin Console. Is there anyways to rebuild the indexes? I’ve tried uninstalling the plugin and reinstalling it several times. Including stopping Openfire Service and dropping the monitoring.jar files on the plugins folder.
Currently running Openfire 4.7.0 on a Windows 10 Machine.

It shows that is installed

I actually can reach the monitoring page, but looks weird and does not show the monitoring settings.

I can reach the monitoring page by actually typing out the server url

http://serveraddress:9090/plugins/monitoring/archive-search.jsp

This can happen when you’re using an older version of a plugin with a newer version of Openfire. Try to use the latest version of both.

I am running Openfire 4.7.0 and monitoring 2.3.0. Are those okay? Is there away for me to rebuild the indexes even though I don’t have access to the monitoring tab?

Maybe. Try (after backing up everything) to:

  1. Remove the Monitoring plugin
  2. Shut down Openfire
  3. Remove the folder monitoring that is in Openfire’s installation directory
  4. Restart Openfire
  5. Reinstall the Monitoring plugin

I have not tested this. You do this at your own risk. Backup! Backup! Backup!