flowable/flowable-engine · warning
Could not create and start JMX connector.
Error message
Could not create and start JMX connector.
What it means
DefaultManagementAgent logs this WARN when createJmxConnector throws an IOException during createMBeanServer, i.e. the JMX connector server could not be created or bound. The MBean server itself still starts and MBeans are registered, but remote JMX clients cannot connect. Commonly a port conflict or network bind failure.
Source
Thrown at modules/flowable-jmx/src/main/java/org/flowable/management/jmx/DefaultManagementAgent.java:156
public void setMBeanServer(MBeanServer mbeanServer) {
this.server = mbeanServer;
}
@Override
public void doStart() {
createMBeanServer();
}
protected void createMBeanServer() {
server = findOrCreateMBeanServer();
try {
// Create the connector if we need
if (jmxConfigurator.getCreateConnector()) {
createJmxConnector(Utils.getHostName());
}
} catch (IOException ioe) {
LOGGER.warn("Could not create and start JMX connector.", ioe);
}
}
protected MBeanServer findOrCreateMBeanServer() {
// look for the first mbean server that has match default domain name
if (jmxConfigurator.getMbeanDomain().equals(JMXConfigurator.DEFAUL_JMX_DOMAIN))
return ManagementFactory.getPlatformMBeanServer();
List<MBeanServer> servers = MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers) {
LOGGER.debug("Found MBeanServer with default domain {}", server.getDefaultDomain());
if (jmxConfigurator.getMbeanDomain().equals(server.getDefaultDomain())) {
return server;
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Check with netstat/lsof whether the configured JMX port is taken and free it or change jmxConfigurator's connector port
- Set a bindable host/port in the JMX configurator settings (e.g. localhost or 0.0.0.0)
- Disable connector creation (createConnector=false) if remote JMX access is not needed
- In containers/k8s, bind to an explicit interface instead of the machine hostname
Example fix
// before (implicit hostname binding fails in container) createJmxConnector(Utils.getHostName()); // after (configure explicit host/port, or disable connector) // application flowable jmx createConnector=false
Defensive patterns
Strategy: try-catch
Validate before calling
// check the JMX port is free before starting the agent
try (ServerSocket ss = new ServerSocket()) {
ss.bind(new InetSocketAddress(host, jmxPort));
} catch (IOException e) {
// port in use: disable connector or pick another port before start
} Try / catch
try {
managementAgent.start();
} catch (Exception e) {
LOGGER.warn("Management agent failed to fully start (JMX connector may be unavailable): {}", e.getMessage());
} Prevention
- Reserve fixed, unique JMX ports per process/environment
- Disable connector creation when only local MBean access is needed
- In containers, bind JMX to an explicit address rather than hostname
- Monitor for this WARN in startup logs and alert on it
When it happens
Trigger: doStart -> createMBeanServer -> createJmxConnector(hostname) throws IOException when opening the JMXConnectorServer: the configured JMX port is already in use, the address cannot be bound, or the connector URL is invalid for the environment.
Common situations: Another process (or a previous unterminated instance) already holds the JMX port; firewall/hostname resolution issues binding to the host name; containerized environments where the host name is not bindable; conflicting JMX configuration with the JVM's own JMX remote agent.
Related errors
- Could not start JMXConnector thread at: {}. JMX Connector no
- ${e.getMessage()}
- @ManagedAttribute can only be used on Java bean methods, was
- Error sending notification
- Service url path is null. JMX connector creation skipped
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/70bb47e2cec16254.
Report an issue: GitHub.