Openfire server - Monitoring plugin is absent

Guys, good time of the day.
Ubuntu Server 20.04.3, clean install of openfire_4.7.0 + plugin “Monitoring Service” 2.3.0.
There is no monitoring of message archives - there is no “Archiving” item on the “Server” tab at all.
Screenshots attached.
Please help me decide, thanks in advance.

Please review your Openfire logs to find any clues.

Sorry for the last post.
During the installation of the plugin, an error appears in the log:

"e[33mWARN e[m [pool-30-thread-1]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - 
2022.01.27 13:50:23 e[33mWARN e[m [pool-30-thread-1]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - Lucene index directory '/usr/share/openfire/monitoring/search' does not exist, but cannot be created!
2022.01.27 13:50:23 e[1;31mERRORe[m [pool-30-thread-1]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - An exception occurred while trying to load the Lucene property file that's expected to exist in: /usr/share/openfire/monitoring/search
java.io.FileNotFoundException: /usr/share/openfire/monitoring/search/indexprops.xml (No such file or directory)"

For some reason, the file is not created, despite the fact that all users have full rights to this directory (/usr/share/openfire/monitoring/search).
Just in case, I attach the log itself:
13:48 - server start (without plugin installed)
13:50 - plugin installation
13:52 - restart plugin from web interface
13:53 - restart openfire server

Thanks for any hint!
openfire.log (92.9 КБ)

This sounds like a difference between who owns the files and can access the directories and the user that is running the Openfire process. Can you verify that those two match?

1 Like

Yes, sure

administrator@testsrv:~$ ps aux | grep openfire
openfire   10012  0.8 12.7 3551844 507668 ?      Sl   14:29   0:19 /bin/java -server -DopenfireHome=/usr/share/openfire -Dlog4j.configurationFile=/usr/share/openfire/lib/log4j2.xml -Dlog4j2.formatMsgNoLookups=true -Dopenfire.lib.dir=/usr/share/openfire/lib -classpath /usr/share/openfire/lib/startup.jar -jar /usr/share/openfire/lib/startup.jar
adminis+   11879  0.0  0.0   6432   724 pts/0    S+   15:09   0:00 grep --color=auto openfire
administrator@testsrv:~$ sudo ls -l /usr/share/openfire/plugins/monitoring/
total 68
-rw-r--r-- 1 openfire openfire 21550 янв 27 13:52 changelog.html
drwxr-xr-x 4 openfire openfire  4096 янв 27 13:52 classes
drwxr-xr-x 4 openfire openfire  4096 янв 27 13:52 database
drwxr-xr-x 2 openfire openfire  4096 янв 27 13:52 i18n
drwxr-xr-x 2 openfire openfire  4096 янв 27 13:52 lib
-rw-r--r-- 1 openfire openfire   814 янв 27 13:52 logo_large.gif
-rw-r--r-- 1 openfire openfire   592 янв 27 13:52 logo_small.gif
-rw-r--r-- 1 openfire openfire  1983 янв 27 13:52 plugin.xml
-rw-r--r-- 1 openfire openfire  4363 янв 27 13:52 readme.html
drwxrwxrwx 2 openfire openfire  4096 янв 27 14:19 search	       <----- this catalog
drwxr-xr-x 6 openfire openfire  4096 янв 27 13:52 web

it turns out that the server is started as the openfire user and this user has full rights to the necessary directories

I noticed the same problem. I use the same ubuntu server, same openfire server and the same monitoring plugin. Maybe it’s a problem because I use java 11 jdk? What do you think?

I don’t think it’s in java. I have 8 JRE installed

1 Like

I understand that no one can help in solving this problem…

Hi I was having the same problem. even having done a complete removal of the plugin at the Admin page.

Take a look at your logs… it’s complaining about the directory /usr/share/openfire/monitoring/search, not the same that plugins/monitoring/search

You can safely rename the directory /usr/share/openfire/monitoring to /usr/share/openfire/monitoring.bak. After that:

mkdir /usr/share/openfire/monitoring
chown openfire.openfire /usr/share/openfire/monitoring

Once restarted, openfire will recreate the database. In my case I use a mysql backend and the history was kept.

2023.03.03 13:21:56 INFO  [pool-6-thread-4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Unable to find a Lucene index in MMapDirectory@/usr/share/openfire/monitoring/msgsearch lockFactory=org.apache.lucene.store.NativeFSLockFactory@18dc4d7e. rebuilding.
2023.03.03 13:21:56 DEBUG [pool-6-thread-4]: org.jivesoftware.openfire.container.PluginManager - Initialized plugin 'monitoring'.
2023.03.03 13:21:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Rebuilding the Lucene index...
2023.03.03 13:21:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Removing old data from directory: /usr/share/openfire/monitoring/msgsearch
2023.03.03 13:21:57 INFO  [pool-6-thread-4]: org.jivesoftware.openfire.container.PluginManager - Successfully loaded plugin 'monitoring-2.4.1'.
2023.03.03 13:21:57 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - ... started to index MUC messages to rebuild the Lucene index.
2023.03.03 13:21:57 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... started to index messages to rebuild the Lucene index.
2023.03.03 13:21:57 DEBUG [pool-4-thread-1]: org.apache.jasper.compiler.JspRuntimeContext - Compilation classpath initialized: /usr/share/openfire/plugins/monitoring/classes/:/usr/share/openfire/plugins/monitoring/database/:/usr/share/openfire/plugins/monitoring/i18n/:/usr/share/openfire/plugins/monitoring/web/:/tmp/jetty-0_0_0_0-7070-classes-_monitoring-any-8858201909859668459/jsp:/usr/share/openfire/plugins/monitoring/classes:/usr/share/openfire/plugins/monitoring/database:/usr/share/openfire/plugins/monitoring/i18n:/usr/share/openfire/plugins/monitoring/web
2023.03.03 13:21:57 DEBUG [pool-4-thread-1]: org.apache.jasper.servlet.JspServlet - Scratch dir for the JSP engine is: [/tmp/jetty-0_0_0_0-7070-classes-_monitoring-any-8858201909859668459/jsp]
2023.03.03 13:21:57 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... identified 103027 conversations.
2023.03.03 13:21:57 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... started to index conversations to rebuild the Lucene index.
2023.03.03 13:22:10 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - ... processed 172844 messages so far.
2023.03.03 13:22:12 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - ... finished the entire result set. Processed 201784 messages in total.
2023.03.03 13:22:12 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - ... finished indexing MUC messages to update the Lucene index. Lasted indexed message date 2023-03-03T12:06:19.609Z
2023.03.03 13:22:12 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - Updating modification date to: 2023-03-03T12:06:19.609Z
2023.03.03 13:22:12 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - Finished rebuilding the Lucene index. Duration: PT15.702S
2023.03.03 13:22:32 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... processed 467883 messages so far.
2023.03.03 13:22:41 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... finished indexing conversations to rebuild the Lucene index..
2023.03.03 13:22:41 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - Updating modification date to: 2023-03-03T12:13:03.931Z
2023.03.03 13:22:41 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - Finished rebuilding the Lucene index. Duration: PT44.639S
2023.03.03 13:22:42 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... processed 932771 messages so far.
2023.03.03 13:22:44 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... finished the entire result set. Processed 1065775 messages in total.
2023.03.03 13:22:44 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... finished indexing messages to update the Lucene index. Lasted indexed message date 2023-03-03T12:21:06.491Z
2023.03.03 13:22:44 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Updating modification date to: 2023-03-03T12:21:06.491Z
2023.03.03 13:22:44 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Finished rebuilding the Lucene index. Duration: PT47.732S
2023.03.03 13:22:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - Updating the Lucene index...
2023.03.03 13:22:56 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - Updating the Lucene index...
2023.03.03 13:22:56 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - Last modification date: 1677845179609
2023.03.03 13:22:56 DEBUG [pool-monitoring2]: org.jivesoftware.openfire.archive.ArchiveIndexer[MUCSEARCH] - ... started to index MUC messages since 2023-03-03T12:06:19.609Z to update the Lucene index.
2023.03.03 13:22:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - Last modification date: 1677845583931
2023.03.03 13:22:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... finding all conversations modified since: 2023-03-03T12:13:03.931Z
2023.03.03 13:22:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... identified 23 conversations.
2023.03.03 13:22:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... loading meta-data for all to-be-updated conversations.
2023.03.03 13:22:56 DEBUG [pool-monitoring4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Updating the Lucene index...
2023.03.03 13:22:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... deleting all to-be-updated conversations from the index.
2023.03.03 13:22:56 DEBUG [pool-monitoring4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Last modification date: 1677846066491
2023.03.03 13:22:56 DEBUG [pool-monitoring4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... started to index messages since 2023-03-03T12:21:06.491Z to update the Lucene index.
2023.03.03 13:22:56 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - ... started to index conversations to update the Lucene index.
2023.03.03 13:22:56 DEBUG [pool-monitoring4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... finished the entire result set. Processed 1 messages in total.
2023.03.03 13:22:56 DEBUG [pool-monitoring4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - ... finished indexing messages to update the Lucene index. Last indexed message date: 2023-03-03T12:22:54.764Z
2023.03.03 13:22:56 DEBUG [pool-monitoring4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Updating modification date to: 2023-03-03T12:22:54.764Z
2023.03.03 13:22:56 DEBUG [pool-monitoring4]: org.jivesoftware.openfire.archive.ArchiveIndexer[MESSAGE] - Finished updating the Lucene index. Duration: PT0.019S. Last message timestamp was: 2023-03-03T12:21:06.491Z, now is: 2023-03-03T12:22:54.764Z
2023.03.03 13:22:57 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - Updating modification date to: 2023-03-03T12:22:54.764Z
2023.03.03 13:22:57 DEBUG [pool-monitoring5]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - Finished updating the Lucene index. Duration: PT0.041S. Last message timestamp was: 2023-03-03T12:13:03.931Z, now is: 2023-03-03T12:22:54.764Z
2023.03.03 13:22:57 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.reporting.stats.StatsEngine - Stat: sessions. Last sample: 1677846000. New sample: 1677846120
2023.03.03 13:22:57 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.reporting.stats.StatsEngine - Stat: server_bytes. Last sample: 1677846000. New sample: 1677846120
2023.03.03 13:22:57 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.reporting.stats.StatsEngine - Stat: muc_occupants. Last sample: 1639045200. New sample: 1677846120
2023.03.03 13:22:57 ERROR [pool-monitoring3]: org.jivesoftware.openfire.reporting.stats.StatsEngine - Error sampling for statistic muc_occupants
	at org.jivesoftware.openfire.reporting.stats.StatsEngine$SampleTask.run(StatsEngine.java:392) [monitoring-2.4.1.jar!/:?]
2023.03.03 13:22:57 DEBUG [pool-monitoring3]: org.jivesoftware.openfire.reporting.stats.StatsEngine - Stat: proxyTransferRate. Last sample: 1677846000. New sample: 1677846120