{"record":{"id":"07a55085d77ca506","repo":"flowable/flowable-engine","slug":"registry-port-is-null-jmx-connector-creation-skip","errorCode":null,"errorMessage":"Registry port is null. JMX connector creation skipped.","messagePattern":"Registry port is null\\. JMX connector creation skipped\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-jmx/src/main/java/org/flowable/management/jmx/DefaultManagementAgent.java","lineNumber":197,"sourceCode":"    }\r\n\r\n    @Override\r\n    public void findAndRegisterMbeans() throws Exception {\r\n        register(new ProcessDefinitionsMBean(jmxConfigurator.getProcessEngineConfig()), new ObjectName(jmxConfigurator.getDomain(), \"type\", \"Deployments\"));\r\n        register(new JobExecutorMBean(jmxConfigurator.getProcessEngineConfig()), new ObjectName(jmxConfigurator.getDomain(), \"type\", \"JobExecutor\"));\r\n    }\r\n\r\n    public void createJmxConnector(String host) throws IOException {\r\n\r\n        String serviceUrlPath = jmxConfigurator.getServiceUrlPath();\r\n        Integer registryPort = jmxConfigurator.getRegistryPort();\r\n        Integer connectorPort = jmxConfigurator.getConnectorPort();\r\n        if (serviceUrlPath == null) {\r\n            LOGGER.warn(\"Service url path is null. JMX connector creation skipped\");\r\n            return;\r\n        }\r\n        if (registryPort == null) {\r\n            LOGGER.warn(\"Registry port is null. JMX connector creation skipped.\");\r\n            return;\r\n        }\r\n\r\n        try {\r\n            registry = LocateRegistry.createRegistry(registryPort);\r\n            LOGGER.debug(\"Created JMXConnector RMI registry on port {}\", registryPort);\r\n        } catch (RemoteException ex) {\r\n            // The registry may had been created, we could get the registry instead\r\n        }\r\n\r\n        // must start with leading slash\r\n        String path = serviceUrlPath.startsWith(\"/\") ? serviceUrlPath : \"/\" + serviceUrlPath;\r\n        // Create an RMI connector and start it\r\n        final JMXServiceURL url;\r\n        if (connectorPort > 0) {\r\n            url = new JMXServiceURL(\"service:jmx:rmi://\" + host + \":\" + connectorPort + \"/jndi/rmi://\" + host + \":\" + registryPort + path);\r\n        } else {\r\n            url = new JMXServiceURL(\"service:jmx:rmi:///jndi/rmi://\" + host + \":\" + registryPort + path);\r","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-jmx/src/main/java/org/flowable/management/jmx/DefaultManagementAgent.java#L179-L215","documentation":"DefaultManagementAgent logs this warning when the JMX registryPort is null and skips RMI registry and connector creation. Like the serviceUrlPath check, it is an intentional skip so the engine starts without remote JMX rather than crashing. It signals an incomplete JMX configuration.","triggerScenarios":"createJmxConnector (via createMBeanServer) is invoked with jmxConfigurator.getRegistryPort() returning null, i.e. the registry port was never configured while the JMX agent is enabled and serviceUrlPath is set.","commonSituations":"Setting connectorPort but forgetting registryPort in flowable config; port left unset because an external RMI registry was assumed; config migration where the registryPort key was renamed or dropped.","solutions":["Set the JMX registry port (e.g. flowable.jmx.registryPort=1099) so the agent can create the RMI registry.","If you rely on an already-running external RMI registry, configure the agent accordingly or disable the built-in registry creation.","Disable JMX explicitly when remote monitoring is not needed to avoid the skipped-connector warning.","Ensure the port value is a valid free port (1-65535) and not already bound."],"exampleFix":"// before\nflowable.jmx.enabled=true\nflowable.jmx.serviceUrlPath=/jmxrmi\n// after\nflowable.jmx.enabled=true\nflowable.jmx.serviceUrlPath=/jmxrmi\nflowable.jmx.registryPort=1099\nflowable.jmx.connectorPort=6789","handlingStrategy":"validation","validationCode":"if (jmxConfigurator.getRegistryPort() == null) {\n    throw new IllegalStateException(\"flowable.jmx.registryPort must be set when JMX is enabled\");\n}\nint port = jmxConfigurator.getRegistryPort();\nif (port < 1 || port > 65535) {\n    throw new IllegalArgumentException(\"registryPort out of range: \" + port);\n}","typeGuard":"boolean hasRegistryPort(JmxConfigurator c) {\n    return c.getRegistryPort() != null && c.getRegistryPort() > 0 && c.getRegistryPort() <= 65535;\n}","tryCatchPattern":null,"preventionTips":["Always configure registryPort and connectorPort together with serviceUrlPath","Check port availability with netstat/lsof before startup","Use a config validation step on boot that fails fast on missing JMX settings"],"tags":["jmx","configuration","null-check","rmi"],"backgroundTag":"missing-required-config-field","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}