diff --git a/changelog.html b/changelog.html
index b86d7c61d..23f1bd66d 100644
--- a/changelog.html
+++ b/changelog.html
@@ -48,6 +48,7 @@
- Requires Openfire 4.7.0
- [Issue #125] - Combining keyword and date range makes search fail
+ - [Issue #162] - Admin console pages should not break when not all cluster nodes have (the same) version of the plugin loaded
- [Issue #163] - Migrate Jive Globals to System Properties
- [Issue #190] - Allow code-update to force a reindexation
- [Issue #192] - Combining keyword and participant(s) makes search fail
diff --git a/plugin.xml b/plugin.xml
index ca34f8f86..8243aa57f 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -6,7 +6,7 @@
Monitors conversations and statistics of the server.
Ignite Realtime
${project.version}
- 12/08/2021
+ 12/23/2021
4.7.0
1.8
monitoring
diff --git a/src/java/org/jivesoftware/openfire/archive/ConversationManager.java b/src/java/org/jivesoftware/openfire/archive/ConversationManager.java
index f89d9af85..44bb260b8 100644
--- a/src/java/org/jivesoftware/openfire/archive/ConversationManager.java
+++ b/src/java/org/jivesoftware/openfire/archive/ConversationManager.java
@@ -567,7 +567,13 @@ public int getConversationCount() {
if (ClusterManager.isSeniorClusterMember()) {
return conversations.size();
}
- return CacheFactory.doSynchronousClusterTask(new GetConversationCountTask(), ClusterManager.getSeniorClusterMember().toByteArray());
+ final Integer count = CacheFactory.doSynchronousClusterTask(new GetConversationCountTask(), ClusterManager.getSeniorClusterMember().toByteArray());
+ if (count == null) {
+ Log.warn("Unable to obtain conversation count from senior cluster member. Is (the same version of) the Monitoring Plugin running there?");
+ return -1;
+ } else {
+ return count;
+ }
}
/**
@@ -621,14 +627,18 @@ public Collection getConversations() {
Collection conversationXmls = CacheFactory.doSynchronousClusterTask(new GetConversationsTask(), ClusterManager
.getSeniorClusterMember().toByteArray());
Collection result = new ArrayList<>();
- for (String conversationXml : conversationXmls) {
- try {
- Log.debug("Interpreting conversation from: {}", conversationXml);
- final Conversation conversation = Conversation.fromXml(conversationXml);
- Log.debug("Interpreted conversation: {}", conversation);
- result.add(conversation);
- } catch (IOException e) {
- Log.warn("Conversation could not be reconstructed from '{}' because of '{}'. This conversation is not included in the result set.", conversationXml, e.getMessage());
+ if (conversationXmls == null) {
+ Log.warn("Unable to obtain conversations from senior cluster member. Is (the same version of) the Monitoring Plugin running there?");
+ } else {
+ for (String conversationXml : conversationXmls) {
+ try {
+ Log.debug("Interpreting conversation from: {}", conversationXml);
+ final Conversation conversation = Conversation.fromXml(conversationXml);
+ Log.debug("Interpreted conversation: {}", conversation);
+ result.add(conversation);
+ } catch (IOException e) {
+ Log.warn("Conversation could not be reconstructed from '{}' because of '{}'. This conversation is not included in the result set.", conversationXml, e.getMessage());
+ }
}
}
return result;