powered by Jive Software

Monitoring Plugin - Openfire 4.6.2

Hello,
Having a bit of an issue with monitoring plugin… It was working fine until I decided to create a cluster and I did not name the node the same as the main openfire server. Point being that once I turned on the node and enabled clustering, it changed the xmpp server name on the main openfire server. This caused many issues. I believe I was able to resolve all of them except for the Monitoring Plugin. It does not show up on the Admin Console anymore. I’ve tried uninstalling the plugin, and reinstalling. I’ve tried naming the Monitoring folder on C:\Program Files\Openfire\plugins to “monitoring.old” so when I reinstalled, it created a new folder. Still no luck. Any pointing in the right direction would be greatly appreciated. Thank you much!

Openfire 4.6.2 Server is running on a Windows 10
Java Version: 1.8.0_202 Oracle Corporation – Java HotSpot™ 64-Bit Server VM

This is what I am seeing on the logs:

2021.05.21 10:52:59 ERROR [pool-2396-thread-1]: org.jivesoftware.openfire.container.PluginManager - An exception occurred while loading plugin 'monitoring':
java.lang.IllegalStateException: A task with ID MonitoringPlugin Conversations has already been added.
at org.jivesoftware.openfire.archive.ArchiveManager.add(ArchiveManager.java:89) ~[xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.archive.ConversationManager.start(ConversationManager.java:168) ~[monitoring-2.2.1.jar!/:4.6.2]
at org.jivesoftware.openfire.plugin.MonitoringPlugin.initializePlugin(MonitoringPlugin.java:198) ~[monitoring-2.2.1.jar!/:?]
at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:683) [xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:375) [xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:363) [xmppserver-4.6.2.jar:4.6.2]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_202]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]
2021.05.21 10:55:25 ERROR [pool-6-thread-1]: org.jivesoftware.openfire.container.PluginManager - An exception occurred while unloading plugin 'monitoring':
java.lang.NullPointerException: null
at org.jivesoftware.openfire.index.LuceneIndexer.stop(LuceneIndexer.java:169) ~[?:?]
at org.jivesoftware.openfire.plugin.MonitoringPlugin.destroyPlugin(MonitoringPlugin.java:215) ~[?:?]
at org.jivesoftware.openfire.container.PluginManager.unloadPlugin(PluginManager.java:959) [xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:269) [xmppserver-4.6.2.jar:4.6.2]

The error that you show seems to indicate that there is an issue that occurs when you try to stop the (old) plugin. Try

I attempted what you mentioned above, but looks like it still not working. This is what the Logs are showing.

2021.06.12 06:24:57 ERROR [pool-7-thread-4]: org.jivesoftware.openfire.archive.ArchiveIndexer[CONVERSATION] - An exception occurred while initializing the Lucene index that is expected to exist in: C:\Program Files\Openfire\monitoring\search
java.io.IOException: Error on line 1 of document : Content is not allowed in prolog.
at org.jivesoftware.util.XMLProperties.buildDoc(XMLProperties.java:744) ~[xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.util.XMLProperties.<init>(XMLProperties.java:163) ~[xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.util.XMLProperties.<init>(XMLProperties.java:123) ~[xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.index.LuceneIndexer.loadPropertiesFile(LuceneIndexer.java:413) ~[monitoring-2.2.1.jar!/:?]
at org.jivesoftware.openfire.index.LuceneIndexer.start(LuceneIndexer.java:68) [monitoring-2.2.1.jar!/:?]
at org.jivesoftware.openfire.plugin.MonitoringPlugin.initializePlugin(MonitoringPlugin.java:201) [monitoring-2.2.1.jar!/:?]
at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:683) [xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:375) [xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:363) [xmppserver-4.6.2.jar:4.6.2]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_202]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]
2021.06.12 06:24:57 ERROR [pool-7-thread-4]: org.jivesoftware.openfire.container.PluginManager - An exception occurred while loading plugin 'monitoring':
java.lang.NullPointerException: null
at org.jivesoftware.openfire.index.LuceneIndexer.getLastModified(LuceneIndexer.java:143) ~[monitoring-2.2.1.jar!/:?]
at org.jivesoftware.openfire.index.LuceneIndexer.start(LuceneIndexer.java:124) ~[monitoring-2.2.1.jar!/:?]
at org.jivesoftware.openfire.plugin.MonitoringPlugin.initializePlugin(MonitoringPlugin.java:201) ~[monitoring-2.2.1.jar!/:?]
at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:683) [xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:375) [xmppserver-4.6.2.jar:4.6.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:363) [xmppserver-4.6.2.jar:4.6.2]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_202]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]
2021.06.12 06:24:57 INFO [pool-7-thread-4]: org.jivesoftware.openfire.container.PluginManager - Successfully loaded plugin 'motd'.
2021.06.12 06:24:57 INFO [pool-7-thread-3]: org.jivesoftware.openfire.container.PluginManager - Successfully loaded plugin 'broadcast'.
2021.06.12 06:24:57 INFO [pool-7-thread-2]: org.jivesoftware.openfire.container.PluginManager - Successfully loaded plugin 'bookmarks'.
2021.06.12 06:24:58 INFO [pool-7-thread-4]: org.jivesoftware.openfire.container.PluginManager - Successfully loaded plugin 'search'.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.container.PluginMonitor - Finished processing all plugins.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s] - Started.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[socket_c2s-legacyMode] - Started.
2021.06.12 06:24:58 WARN [pool-6-thread-1]: org.jivesoftware.openfire.spi.LegacyConnectionAcceptor - Configuration allows for up to 16 threads, although implementation is limited to exactly one.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[socket_s2s] - Started.
2021.06.12 06:24:58 WARN [pool-6-thread-1]: org.jivesoftware.openfire.spi.LegacyConnectionAcceptor - Configuration allows for up to 16 threads, although implementation is limited to exactly one.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[socket_s2s-legacyMode] - Started.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[component] - Started.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[component-legacyMode] - Started.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager] - Started.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.ConnectionListener[connection_manager-legacyMode] - Started.
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.spi.EncryptionArtifactFactory - Creating new SslContextFactory instance
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.http.HttpSessionManager - Starting instance
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.http.HttpBindManager - HTTP bind service started
2021.06.12 06:24:58 INFO [pool-6-thread-1]: org.jivesoftware.openfire.plugin.HazelcastPlugin - All plugins have initialized; initializing clustering
2021.06.12 06:25:09 INFO [socket_c2s-thread-3]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Locked Out Accounts
2021.06.12 06:25:12 INFO [Jetty-QTP-AdminConsole-67]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Sequences
2021.06.12 06:25:20 INFO [Jetty-QTP-AdminConsole-72]: org.directwebremoting.log.startup - Starting: DwrServlet v3.0.3-dev on jetty/9.4.35.v20201120 / JDK 1.8.0_202 from Oracle Corporation at
2021.06.12 06:25:20 INFO [Jetty-QTP-AdminConsole-72]: org.directwebremoting.log.startup - Starting: Using container abstraction org.directwebremoting.server.servlet3.Servlet30ContainerAbstraction

There are subfolders of the Openfire directory called msgsearch and mucsearch (they are probably nested in another folder, I’m unsure). Each should have a file called indexprops.xml. At least one of those files is corrupted.

After you created a backup, delete the msgsearch and mucsearch folder, and restart the plugin (or Openfire). That will regenerate those indexes.

I found those two folders. They were inside C:\Program Files\Openfire\Monitoring. I Back them up. Deleted them. I restarted the plugin, and It did not create the 3 folders inside the monitoring folder (msgsearch, mucsearch, search) and I’m still experiencing the same issue.
While dealing with this, I also found out that I am able to access the Archive by url only, once I am logged into the Openfire Server. (http://SERVER-IP:9090/plugins/monitoring/archive-search.jsp). It works, I am able to search conversations. It just does not give me any Archive Settings. Archive link for me to access it, still does not appear on my OpenFire Server. Nothing different in the logs from what I had already posted above.

I’m not sure what to make of all that. Maybe your installation got corrupted further, somehow? Are you still getting the same error in the log?