SonarSource/sonarqube · error · MessageException
Property 'node.store.allow_mmapfs' is no longer supported…
Error message
Property 'node.store.allow_mmapfs' is no longer supported. Use 'node.store.allow_mmap' instead.
What it means
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.
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
Example fix
// before sonar.es.javaAdditionalOpts=-Dnode.store.allow_mmapfs=false // after sonar.es.javaAdditionalOpts=-Dnode.store.allow_mmap=false
Defensive patterns
Strategy: validation
Validate before calling
// Grep config for the retired property before upgrade
if (props.get("sonar.es.javaAdditionalOpts", "").contains("node.store.allow_mmapfs"))
throw new IllegalStateException("Replace node.store.allow_mmapfs with node.store.allow_mmap"); Try / catch
try { esSettings.build(); } catch (MessageException e) { log.error("Deprecated ES property: {}", e.getMessage()); System.exit(2); } Prevention
- 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
When it happens
Trigger: sonar.es.javaAdditionalOpts contains -Dnode.store.allow_mmapfs=false (config carried over from older SonarQube/ES versions).
Common situations: Upgrading SonarQube (and bundled Elasticsearch) from 6.x-era configs where allow_mmapfs was valid; following outdated runbooks that disable mmap.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- At least one Elasticsearch host is required
- Can not resolve host [
- Can not resolve host [. Please check network settings and…
- Entries in property must not mix 'host:port' and 'host'…
- Properties [ ] are not allowed when running SonarQube in…
AI-assisted analysis of SonarSource/sonarqube@184c821202 (2026-09-09).
Data as JSON: /api/errors/72972eda2fd544ea.
Report an issue: GitHub.
Appendix: source
Thrown at server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java:251
builder.put("cluster.initial_master_nodes", hosts);
}
builder.put("discovery.initial_state_timeout", initialStateTimeOut);
builder.put("cluster.name", clusterName);
builder.put("cluster.routing.allocation.awareness.attributes", "rack_id");
builder.put("node.attr.rack_id", nodeName);
builder.put("node.name", nodeName);
}
private void configureOthers(Map<String, String> builder) {
builder.put("action.auto_create_index", String.valueOf(false));
if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, "").contains("-D" + SECCOMP_PROPERTY + "=" + Boolean.FALSE)) {
builder.put(SECCOMP_PROPERTY, Boolean.FALSE.toString());
}
if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, "").contains("-Dnode.store.allow_mmapfs=" + Boolean.FALSE)) {
throw new MessageException("Property 'node.store.allow_mmapfs' is no longer supported. Use 'node.store.allow_mmap' instead.");
}
if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, "").contains("-D" + ALLOW_MMAP + "=" + Boolean.FALSE)) {
builder.put(ALLOW_MMAP, Boolean.FALSE.toString());
}
if (props.value(JAVA_ADDITIONAL_OPS_PROPERTY, "").contains("-Dcluster.routing.allocation.disk.threshold_enabled=" + Boolean.FALSE)) {
builder.put("cluster.routing.allocation.disk.threshold_enabled", Boolean.FALSE.toString());
}
}
}
View on GitHub (pinned to 184c821202)