{"record":{"id":"0e7542c72d2bc2d6","repo":"SonarSource/sonarqube","slug":"property-s-is-forbidden","errorCode":null,"errorMessage":"Property [%s] is forbidden","messagePattern":"Property \\[(.+?)\\] is forbidden","errorType":"validation","errorClass":"MessageException","httpStatus":null,"severity":"error","filePath":"server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java","lineNumber":78,"sourceCode":"  private static final Set<Property> FORBIDDEN_SEARCH_NODE_SETTINGS = EnumSet.of(SEARCH_HOST, SEARCH_PORT);\n\n  private final NetworkUtils network;\n\n  public ClusterSettings(NetworkUtils network) {\n    this.network = network;\n  }\n\n  @Override\n  public void accept(Props props) {\n    if (isClusterEnabled(props)) {\n      checkClusterProperties(props);\n    }\n  }\n\n  private void checkClusterProperties(Props props) {\n    // for internal use\n    if (props.value(CLUSTER_WEB_STARTUP_LEADER.getKey()) != null) {\n      throw new MessageException(format(\"Property [%s] is forbidden\", CLUSTER_WEB_STARTUP_LEADER.getKey()));\n    }\n\n    NodeType nodeType = toNodeType(props);\n    switch (nodeType) {\n      case APPLICATION:\n        checkForApplicationNode(props);\n        break;\n      case SEARCH:\n        checkForSearchNode(props);\n        break;\n      default:\n        throw new UnsupportedOperationException(\"Unknown value: \" + nodeType);\n    }\n  }\n\n  private void checkForApplicationNode(Props props) {\n    ensureNotH2(props);\n    requireValue(props, AUTH_JWT_SECRET);","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java#L60-L96","documentation":"SonarQube's cluster configuration loader in ClusterSettings.checkClusterProperties rejects the internal property sonar.cluster.web.startupLeader if it is present in the configuration. This property was previously used to elect the web startup leader but is now reserved for internal use, so any explicit user setting is treated as an invalid, forbidden override. Startup aborts with a MessageException carrying the offending key.","triggerScenarios":"Thrown by checkClusterProperties (invoked from accept during cluster configuration validation) when props.value(CLUSTER_WEB_STARTUP_LEADER.getKey()) is non-null, i.e. the key sonar.cluster.web.startupLeader is defined in sonar.properties, environment variables, or command-line -D overrides.","commonSituations":"Upgrading an older SonarQube cluster where sonar.properties still contains sonar.cluster.web.startupLeader from a previous version; copy-pasting configuration from old docs or internal tooling that once tuned leader election.","solutions":["Remove the line 'sonar.cluster.web.startupLeader=...' from conf/sonar.properties on every cluster node.","Check environment variables (SONAR_CLUSTER_WEB_STARTUPLEADER style) and JVM command-line -D flags for the same key and delete them.","If leader behavior tuning is needed, rely on the current supported cluster properties (e.g. sonar.cluster.enabled) and consult the docs for your version instead of the legacy key."],"exampleFix":"// before (conf/sonar.properties)\nsonar.cluster.enabled=true\nsonar.cluster.web.startupLeader=true\n\n// after\nsonar.cluster.enabled=true","handlingStrategy":"validation","validationCode":"// shell pre-flight before starting SonarQube\ngrep -nE '^\\s*sonar\\.cluster\\.web\\.startupLeader' conf/sonar.properties && echo 'Remove forbidden internal property' && exit 1\nenv | grep -i 'SONAR_CLUSTER_WEB_STARTUP' && echo 'Remove forbidden env override' && exit 1\ntrue","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Audit sonar.properties after every SonarQube upgrade for removed/internal keys","Keep node configs generated from a versioned, up-to-date template","Diff new-version documentation against your existing cluster properties"],"tags":["configuration","cluster","sonarqube","forbidden-property"],"backgroundTag":"unsupported-config-value","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"}