{"record":{"id":"4517bb033070eb3c","repo":"SonarSource/sonarqube","slug":"properties-s-are-not-allowed-when-running-sonar","errorCode":null,"errorMessage":"Properties [%s] are not allowed when running SonarQube in cluster mode.","messagePattern":"Properties \\[(.+?)\\] are not allowed when running SonarQube in cluster mode\\.","errorType":"validation","errorClass":"MessageException","httpStatus":null,"severity":"error","filePath":"server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java","lineNumber":191,"sourceCode":"\n  private static String requireValue(Props props, Property property) {\n    String key = property.getKey();\n    String value = props.value(key);\n    String trimmedValue = value == null ? null : value.trim();\n    if (trimmedValue == null || trimmedValue.isEmpty()) {\n      throw new MessageException(format(\"Property %s is mandatory\", key));\n    }\n    return trimmedValue;\n  }\n\n  private static void ensureNoSearchNodeForbiddenSettings(Props props) {\n    List<String> violations = FORBIDDEN_SEARCH_NODE_SETTINGS.stream()\n      .filter(setting -> props.value(setting.getKey()) != null)\n      .map(Property::getKey)\n      .toList();\n\n    if (!violations.isEmpty()) {\n      throw new MessageException(format(\"Properties [%s] are not allowed when running SonarQube in cluster mode.\", String.join(\", \", violations)));\n    }\n  }\n\n  private static void ensureNotH2(Props props) {\n    String jdbcUrl = props.value(JDBC_URL.getKey());\n    String trimmedJdbcUrl = jdbcUrl == null ? null : jdbcUrl.trim();\n    if (trimmedJdbcUrl == null || trimmedJdbcUrl.isEmpty() || trimmedJdbcUrl.startsWith(\"jdbc:h2:\")) {\n      throw new MessageException(\"Embedded database is not supported in cluster mode\");\n    }\n  }\n\n  private void ensureNotLoopbackAddresses(Property property, Set<AddressAndPort> hostAndPorts) {\n    Set<AddressAndPort> loopbackAddresses = hostAndPorts.stream()\n      .filter(t -> network.isLoopback(t.getHost()))\n      .collect(toSet());\n    if (!loopbackAddresses.isEmpty()) {\n      throw new MessageException(format(\"Property %s must not contain a loopback address: %s\", property.getKey(),\n        loopbackAddresses.stream().map(AddressAndPort::getHost).sorted().collect(Collectors.joining(\", \"))));","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java#L173-L209","documentation":"When SonarQube runs in cluster mode, standalone/Elasticsearch-node settings listed in FORBIDDEN_SEARCH_NODE_SETTINGS are no longer allowed. checkForSearchNode -> ensureNoSearchNodeForbiddenSettings collects every forbidden key that is still set and reports them all in one MessageException, preventing conflicting legacy configuration from silently changing behavior.","triggerScenarios":"checkForSearchNode (for node type 'search') is executed during accept(); it throws when any property in FORBIDDEN_SEARCH_NODE_SETTINGS (legacy local-ES/standalone search settings such as sonar.search.* overrides relevant to clustered search) has a non-null value in props.","commonSituations":"Migrating a standalone SonarQube installation to a cluster while keeping old sonar.search.* settings in sonar.properties; copying a standalone sonar.properties to a search node; automation templates that still inject removed search-node settings.","solutions":["Delete every key listed in the error message from conf/sonar.properties on the search node.","Replace legacy search settings with their cluster equivalents (sonar.cluster.search.* properties) where applicable.","Review old provisioning/Ansible/Helm templates that write sonar.search.* keys and strip them for cluster deployments."],"exampleFix":"// before (search node sonar.properties)\nsonar.cluster.enabled=true\nsonar.search.initialHeapSize=2g\n\n// after (use cluster-appropriate settings only)\nsonar.cluster.enabled=true","handlingStrategy":"validation","validationCode":"// shell: strip legacy search settings before cluster startup\nfor key in sonar.search.bootstrapChecks sonar.search.javaOpts sonar.search.port sonar.search.host; do\n  grep -q \"^${key}=\" conf/sonar.properties && echo \"Remove $key for cluster mode\"\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not copy a standalone sonar.properties onto cluster nodes","Migrate sonar.search.* settings to sonar.cluster.* equivalents during migration","Review provisioning templates for keys removed in cluster mode"],"tags":["configuration","cluster","elasticsearch","migration"],"backgroundTag":"conflicting-config-options","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}