flowable/flowable-engine · warning
JMX connection:{} already exists.
Error message
JMX connection:{} already exists. What it means
When the JMX connector server thread starts the connector (cs.start()), an IOException whose cause is javax.naming.NameAlreadyBoundException means another JMX connector is already bound at the same JNDI/RMI URL. DefaultManagementAgent logs this as a warning and does not retry, treating the existing binding as usable. It usually indicates the previous connector was not unbound (e.g. after an unclean shutdown or double agent initialization).
Source
Thrown at modules/flowable-jmx/src/main/java/org/flowable/management/jmx/DefaultManagementAgent.java:233
url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + host + ":" + registryPort + path);
}
cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, server);
// use async thread for starting the JMX Connector
// (no need to use a thread pool or enlist in JMX as this thread is
// terminated when the JMX connector has been started)
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
LOGGER.debug("Staring JMX Connector thread to listen at: {}", url);
cs.start();
LOGGER.info("JMX Connector thread started and listening at: {}", url);
} catch (IOException ioe) {
if (ioe.getCause() instanceof javax.naming.NameAlreadyBoundException) {
LOGGER.warn("JMX connection:{} already exists.", url);
} else {
LOGGER.warn("Could not start JMXConnector thread at: {}. JMX Connector not in use.", url, ioe);
}
}
}
}, "jmxConnectorStarterThread");
thread.start();
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Ensure DefaultManagementAgent is initialized only once per JVM (guard agent startup, e.g. check existing MBean server/connector before creating).
- Use a unique registry/connector port and serviceUrlPath per engine instance when running multiple engines in one JVM.
- Stop and unbind the previous connector (cs.stop()) on shutdown so the binding is released; the warning is usually benign and the existing connector can be used as-is.
- If a stale external RMI registry holds the binding, restart or clear the registry.
Example fix
// before // two engines, same config flowable.jmx.registryPort=1099 flowable.jmx.serviceUrlPath=/jmxrmi // after // engine A flowable.jmx.registryPort=1099 flowable.jmx.serviceUrlPath=/jmxrmi-engineA // engine B flowable.jmx.registryPort=1100 flowable.jmx.serviceUrlPath=/jmxrmi-engineB
Defensive patterns
Strategy: fallback
Validate before calling
// Before starting a second engine in the same JVM, ensure unique JMX endpoints assert engineAJmxPort != engineBJmxPort : "each engine needs its own JMX registry/connector port";
Try / catch
try {
connectorServer.start();
} catch (IOException ioe) {
if (ioe.getCause() instanceof javax.naming.NameAlreadyBoundException) {
// existing binding: treat as already-managed, do not fail startup
log.warn("JMX connector already bound at {}", url);
} else {
throw ioe;
}
} Prevention
- Initialize DefaultManagementAgent only once per JVM
- Register a shutdown hook that calls connectorServer.stop() to unbind cleanly
- Give each engine instance unique ports and serviceUrlPath values
When it happens
Trigger: The jmxConnectorStarterThread calls JMXConnectorServer.start() and the underlying bind to the RMI registry/JNDI name fails because a binding with the same service URL already exists — e.g. the agent's createJmxConnector being run twice, or a previous JVM/connector crashed without cleanup.
Common situations: Hot redeploy of the engine in the same JVM without stopping the old connector; two engine instances in one JVM both enabling JMX on the same port/path; container restart where the RMI registry lives outside the JVM and retains stale bindings.
Related errors
- Registry port is null. JMX connector creation skipped.
- Could not start JMXConnector thread at: {}. JMX Connector no
- Failed to create property source
- Could not find an implementation of the org.flowable.cdi.spi
- Exception while initializing Database connection
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c1007ba123dcac62.
Report an issue: GitHub.