From 3c3c81720a93e7617fca757dd9df49cd3b590d96 Mon Sep 17 00:00:00 2001 From: JiriOndrusek Date: Fri, 24 Aug 2018 09:14:02 +0200 Subject: [PATCH] [ARTEMIS-2050] It is possible to get AMQ224000: Failure in initialisation: java.lang.NullPointerException during shutdown of backup server with shared store --- .../artemis/core/server/impl/SharedStoreBackupActivation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java index 383f93fbdd..c978ff6e0f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java @@ -114,7 +114,7 @@ public final class SharedStoreBackupActivation extends Activation { activeMQServer.getNodeManager().releaseBackup(); } - if (sharedStoreSlavePolicy.isAllowAutoFailBack()) { + if (sharedStoreSlavePolicy.isAllowAutoFailBack() && ActiveMQServerImpl.SERVER_STATE.STOPPING != activeMQServer.getState() && ActiveMQServerImpl.SERVER_STATE.STOPPED != activeMQServer.getState()) { startFailbackChecker(); } } catch (ClosedChannelException | InterruptedException e) {