This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/main by this push:
     new 49e8ca22e4 fix(broker): improve error message for RMI registry 
creation failure (#1762)
49e8ca22e4 is described below

commit 49e8ca22e4e633ff6fe89c2f984af7a3040cf646
Author: JB Onofré <[email protected]>
AuthorDate: Fri Mar 13 16:08:27 2026 +0100

    fix(broker): improve error message for RMI registry creation failure (#1762)
    
    * 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.
    
    * fix(broker): elevate RMI registry error logging from debug to warn
---
 .../main/java/org/apache/activemq/broker/jmx/ManagementContext.java | 6 ++++--
 1 file changed, 4 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 28c6f8c3d0..1e2c1bc97d 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,11 @@ public class ManagementContext implements Service {
             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 registry. This exception will be 
ignored.", e);
+            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);
         }
 
         // Create the JMXConnectorServer


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to