This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 5f5c47e ARTEMIS-2693 Improve log of starting acceptor errors
new a4f0e76 This closes #3052
5f5c47e is described below
commit 5f5c47e8a53b3d7785206e96c937f5e3eae3e0fc
Author: brusdev <[email protected]>
AuthorDate: Sun Apr 5 18:57:16 2020 +0200
ARTEMIS-2693 Improve log of starting acceptor errors
Add the log of starting acceptor errors to simplify the detection of the
failing acceptor in case of multiple acceptors.
---
.../artemis/core/remoting/server/impl/RemotingServiceImpl.java | 7 ++++++-
.../apache/activemq/artemis/core/server/ActiveMQServerLogger.java | 4 ++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
index 96c0851..ca50934 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
@@ -308,7 +308,12 @@ public class RemotingServiceImpl implements
RemotingService, ServerConnectionLif
public synchronized void startAcceptors() throws Exception {
if (isStarted()) {
for (Acceptor a : acceptors.values()) {
- a.start();
+ try {
+ a.start();
+ } catch (Throwable t) {
+ ActiveMQServerLogger.LOGGER.errorStartingAcceptor(a.getName(),
a.getConfiguration());
+ throw t;
+ }
}
}
}
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 a40230c..99ab6ad 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
@@ -2069,4 +2069,8 @@ public interface ActiveMQServerLogger extends BasicLogger
{
@LogMessage(level = Logger.Level.INFO)
@Message(id = 224103, value = "unable to undeploy queue {0} : reason {1}",
format = Message.Format.MESSAGE_FORMAT)
void unableToUndeployQueue(SimpleString queueName, String reason);
+
+ @LogMessage(level = Logger.Level.ERROR)
+ @Message(id = 224104, value = "Error starting the Acceptor {0} {1}", format
= Message.Format.MESSAGE_FORMAT)
+ void errorStartingAcceptor(String name, Object configuration);
}