{"record":{"id":"b0494551e56e9b1f","repo":"apache/cassandra","slug":"jmx-connection-server-is-not-enabled-for-either-lo","errorCode":null,"errorMessage":"JMX connection server is not enabled for either local or remote connections. Please see jmx_server_options in cassandra.yaml for more info","messagePattern":"JMX connection server is not enabled for either local or remote connections\\. Please see jmx_server_options in cassandra\\.yaml for more info","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/StartupChecks.java","lineNumber":548,"sourceCode":"\n    public static final StartupCheck checkJMXPorts = new StartupCheck()\n    {\n        @Override\n        public String name()\n        {\n            return \"jmx_ports\";\n        }\n\n        @Override\n        public void execute(StartupChecksConfiguration configuration)\n        {\n            if (configuration.isDisabled(name()))\n                return;\n\n            JMXServerOptions jmxServerOptions = DatabaseDescriptor.getJmxServerOptions();\n            if (!jmxServerOptions.enabled)\n            {\n                logger.warn(\"JMX connection server is not enabled for either local or remote connections. \" +\n                            \"Please see jmx_server_options in cassandra.yaml for more info\");\n            }\n            if (!jmxServerOptions.remote)\n            {\n                logger.warn(\"JMX is not enabled to receive remote connections. \" +\n                            \"Please see jmx_server_options in cassandra.yaml for more info.\");\n            }\n            else\n            {\n                logger.info(\"JMX is enabled to receive remote connections on port: {}\", jmxServerOptions.jmx_port);\n            }\n        }\n    };\n\n    public static final StartupCheck checkJMXProperties = new StartupCheck()\n    {\n        @Override\n        public String name()","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StartupChecks.java#L530-L566","documentation":"A WARN log (not an exception) from the checkJmxPorts startup check's execute(). When jmx_server_options.enabled is false in cassandra.yaml, both the local and remote JMX connection servers are disabled, so tools like nodetool cannot connect at all. Cassandra logs this warning so the operator notices JMX is fully off, and startup continues.","triggerScenarios":"checkJmxPorts (JMX accessibility check) executes at startup while DatabaseDescriptor.getJmxServerOptions().enabled is false — i.e. jmx_server_options.enabled: false was set (or defaulted) in cassandra.yaml.","commonSituations":"Operators disabling remote JMX for security but unaware this also disables local JMX; hardened configs copied from lockdown guides; then nodetool fails with 'Connection refused' and this warning explains why.","solutions":["If JMX is needed, set jmx_server_options.enabled: true in cassandra.yaml and restart","If only local JMX is wanted, enable it and keep jmx_server_options.remote: false so JMX binds only to localhost","If fully disabling JMX is intentional, keep the config but update runbooks/monitoring that depend on nodetool to use alternative interfaces"],"exampleFix":"// before (cassandra.yaml)\njmx_server_options:\n  enabled: false\n\n// after\njmx_server_options:\n  enabled: true\n  remote: false","handlingStrategy":"validation","validationCode":"// Pre-flight: fail fast if JMX is fully disabled but nodetool is required\nimport org.apache.cassandra.config.DatabaseDescriptor;\nif (!DatabaseDescriptor.getJmxServerOptions().enabled)\n    System.out.println(\"WARNING: JMX fully disabled (jmx_server_options.enabled=false); nodetool will not connect\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never copy jmx_server_options.enabled: false from lockdown guides without checking operational impact","Keep local JMX enabled (remote: false) even in hardened deployments so nodetool works locally","Validate cassandra.yaml with a startup pre-flight before production rollout","Document in runbooks that nodetool requires jmx_server_options.enabled: true"],"tags":["jmx","configuration","cassandra-yaml","monitoring"],"backgroundTag":"feature-not-enabled","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}