{"record":{"id":"72972eda2fd544ea","repo":"SonarSource/sonarqube","slug":"property-node-store-allow-mmapfs-is-no-longer-su","errorCode":null,"errorMessage":"Property 'node.store.allow_mmapfs' is no longer supported. Use 'node.store.allow_mmap' instead.","messagePattern":"Property 'node\\.store\\.allow_mmapfs' is no longer supported\\. Use 'node\\.store\\.allow_mmap' instead\\.","errorType":"validation","errorClass":"MessageException","httpStatus":null,"severity":"error","filePath":"server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java","lineNumber":251,"sourceCode":"      builder.put(\"cluster.initial_master_nodes\", hosts);\n    }\n\n    builder.put(\"discovery.initial_state_timeout\", initialStateTimeOut);\n    builder.put(\"cluster.name\", clusterName);\n    builder.put(\"cluster.routing.allocation.awareness.attributes\", \"rack_id\");\n    builder.put(\"node.attr.rack_id\", nodeName);\n    builder.put(\"node.name\", nodeName);\n  }\n\n  private void configureOthers(Map<String, String> builder) {\n    builder.put(\"action.auto_create_index\", String.valueOf(false));\n\n    if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, \"\").contains(\"-D\" + SECCOMP_PROPERTY + \"=\" + Boolean.FALSE)) {\n      builder.put(SECCOMP_PROPERTY, Boolean.FALSE.toString());\n    }\n\n    if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, \"\").contains(\"-Dnode.store.allow_mmapfs=\" + Boolean.FALSE)) {\n      throw new MessageException(\"Property 'node.store.allow_mmapfs' is no longer supported. Use 'node.store.allow_mmap' instead.\");\n    }\n\n    if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, \"\").contains(\"-D\" + ALLOW_MMAP + \"=\" + Boolean.FALSE)) {\n      builder.put(ALLOW_MMAP, Boolean.FALSE.toString());\n    }\n\n    if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, \"\").contains(\"-Dcluster.routing.allocation.disk.threshold_enabled=\" + Boolean.FALSE)) {\n      builder.put(\"cluster.routing.allocation.disk.threshold_enabled\", Boolean.FALSE.toString());\n    }\n  }\n}\n","sourceCodeStart":233,"sourceCodeEnd":263,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java#L233-L263","documentation":"SonarQube builds elasticsearch.yml from sonar properties. Elasticsearch renamed the mmapfs control setting from node.store.allow_mmapfs to node.store.allow_mmap; configureOthers deliberately fails fast with this MessageException when it detects the old property passed via sonar.es.javaAdditionalOpts.","triggerScenarios":"sonar.es.javaAdditionalOpts contains -Dnode.store.allow_mmapfs=false (config carried over from older SonarQube/ES versions).","commonSituations":"Upgrading SonarQube (and bundled Elasticsearch) from 6.x-era configs where allow_mmapfs was valid; following outdated runbooks that disable mmap.","solutions":["Replace -Dnode.store.allow_mmapfs=false with -Dnode.store.allow_mmap=false in sonar.es.javaAdditionalOpts","Remove the flag entirely if disabling mmap is no longer required","If mmap must stay disabled due to low vm.max_map_count, also raise vm.max_map_count (sysctl) so mmap can remain enabled"],"exampleFix":"// before\nsonar.es.javaAdditionalOpts=-Dnode.store.allow_mmapfs=false\n// after\nsonar.es.javaAdditionalOpts=-Dnode.store.allow_mmap=false","handlingStrategy":"validation","validationCode":"// Grep config for the retired property before upgrade\nif (props.get(\"sonar.es.javaAdditionalOpts\", \"\").contains(\"node.store.allow_mmapfs\"))\n  throw new IllegalStateException(\"Replace node.store.allow_mmapfs with node.store.allow_mmap\");","typeGuard":null,"tryCatchPattern":"try { esSettings.build(); } catch (MessageException e) { log.error(\"Deprecated ES property: {}\", e.getMessage()); System.exit(2); }","preventionTips":["Audit javaAdditionalOpts after every SonarQube upgrade","Track Elasticsearch setting renames in your ops runbooks","Automate config linting for removed/renamed ES properties","If disabling mmap, prefer the supported -Dnode.store.allow_mmap=false"],"tags":["elasticsearch","configuration","deprecated","upgrade"],"backgroundTag":"deprecated-api-usage","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}