You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/10/11 21:16:09 UTC

activemq-artemis git commit: ARTEMIS-2106 log failure to start broker

Repository: activemq-artemis
Updated Branches:
  refs/heads/2.6.x d7042f69f -> db818b13e


ARTEMIS-2106 log failure to start broker

(cherry picked from commit 59ad650a13c7fd6fdbc60012e09e713ddd24ca81)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/db818b13
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/db818b13
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/db818b13

Branch: refs/heads/2.6.x
Commit: db818b13e240177dd429e65837e9d9055e7d0a7a
Parents: d7042f6
Author: Justin Bertram <jb...@apache.org>
Authored: Wed Oct 3 11:43:58 2018 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Oct 11 17:16:00 2018 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/server/ActiveMQServerLogger.java       | 4 ++++
 .../activemq/artemis/core/server/impl/ActiveMQServerImpl.java    | 2 ++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/db818b13/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index 21740cf..1e55427 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -1974,4 +1974,8 @@ public interface ActiveMQServerLogger extends BasicLogger {
    @LogMessage(level = Logger.Level.ERROR)
    @Message(id = 224096, value = "Error setting up connection from {0} to {1}; protocol {2} not found in map: {3}", format = Message.Format.MESSAGE_FORMAT)
    void failedToFindProtocolManager(String remoteAddress, String localAddress, String intendedProtocolManager, String protocolMap);
+
+   @LogMessage(level = Logger.Level.ERROR)
+   @Message(id = 224097, value = "Failed to start server", format = Message.Format.MESSAGE_FORMAT)
+   void failedToStartServer(@Cause Throwable t);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/db818b13/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index f8b46e2..059f6bd 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -479,6 +479,8 @@ public class ActiveMQServerImpl implements ActiveMQServer {
       SERVER_STATE originalState = state;
       try {
          internalStart();
+      } catch (Throwable t) {
+         ActiveMQServerLogger.LOGGER.failedToStartServer(t);
       } finally {
          if (originalState == SERVER_STATE.STOPPED) {
             networkHealthCheck.setTimeUnit(TimeUnit.MILLISECONDS).setPeriod(configuration.getNetworkCheckPeriod()).