From 7525d349dac66c8383bac5f3bc355f4300c93143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JB=20Onofr=C3=A9?= Date: Fri, 13 Mar 2026 06:38:05 +0100 Subject: [PATCH 1/2] fix(broker): improve error message for RMI registry creation failure Include the port number and actionable guidance in the debug log when creating the local RMI registry fails, so operators can quickly diagnose and resolve the issue. --- .../org/apache/activemq/broker/jmx/ManagementContext.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java index 28c6f8c3d09..b15bb5f36a7 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java @@ -569,7 +569,9 @@ private void createConnector(MBeanServer mbeanServer) throws IOException { } catch(ClassNotFoundException e) { LOG.debug("Probably not using JRE 1.4: {}", e.getLocalizedMessage()); } catch (Throwable e) { - LOG.debug("Failed to create local registry. This exception will be ignored.", e); + LOG.debug("Failed to create local RMI registry on port {}. This may happen when another process or broker instance " + + "is already using the port. To resolve, either change the connectorPort in your managementContext configuration " + + "or set createConnector=\"false\" if remote JMX access is not required. This exception will be ignored.", connectorPort, e); } // Create the JMXConnectorServer From 8272dded0527bb7f8cc047f4f01b15cdf658ea41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JB=20Onofr=C3=A9?= Date: Fri, 13 Mar 2026 15:47:10 +0100 Subject: [PATCH 2/2] fix(broker): elevate RMI registry error logging from debug to warn --- .../org/apache/activemq/broker/jmx/ManagementContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java index b15bb5f36a7..1e2c1bc97dc 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java @@ -567,9 +567,9 @@ private void createConnector(MBeanServer mbeanServer) throws IOException { Attribute attr = new Attribute("Port", connectorPort); mbeanServer.setAttribute(namingServiceObjectName, attr); } catch(ClassNotFoundException e) { - LOG.debug("Probably not using JRE 1.4: {}", e.getLocalizedMessage()); + LOG.warn("Probably not using JRE 1.4: {}", e.getLocalizedMessage()); } catch (Throwable e) { - LOG.debug("Failed to create local RMI registry on port {}. This may happen when another process or broker instance " + LOG.warn("Failed to create local RMI registry on port {}. This may happen when another process or broker instance " + "is already using the port. To resolve, either change the connectorPort in your managementContext configuration " + "or set createConnector=\"false\" if remote JMX access is not required. This exception will be ignored.", connectorPort, e); }