SonarSource/sonarqube · error · MessageException
Property [%s] is forbidden
Error message
Property [%s] is forbidden
What it means
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.
Source
Thrown at server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java:78
private static final Set<Property> FORBIDDEN_SEARCH_NODE_SETTINGS = EnumSet.of(SEARCH_HOST, SEARCH_PORT);
private final NetworkUtils network;
public ClusterSettings(NetworkUtils network) {
this.network = network;
}
@Override
public void accept(Props props) {
if (isClusterEnabled(props)) {
checkClusterProperties(props);
}
}
private void checkClusterProperties(Props props) {
// for internal use
if (props.value(CLUSTER_WEB_STARTUP_LEADER.getKey()) != null) {
throw new MessageException(format("Property [%s] is forbidden", CLUSTER_WEB_STARTUP_LEADER.getKey()));
}
NodeType nodeType = toNodeType(props);
switch (nodeType) {
case APPLICATION:
checkForApplicationNode(props);
break;
case SEARCH:
checkForSearchNode(props);
break;
default:
throw new UnsupportedOperationException("Unknown value: " + nodeType);
}
}
private void checkForApplicationNode(Props props) {
ensureNotH2(props);
requireValue(props, AUTH_JWT_SECRET);View on GitHub (pinned to 184c821202)
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.
Example fix
// before (conf/sonar.properties) sonar.cluster.enabled=true sonar.cluster.web.startupLeader=true // after sonar.cluster.enabled=true
Defensive patterns
Strategy: validation
Validate before calling
// shell pre-flight before starting SonarQube grep -nE '^\s*sonar\.cluster\.web\.startupLeader' conf/sonar.properties && echo 'Remove forbidden internal property' && exit 1 env | grep -i 'SONAR_CLUSTER_WEB_STARTUP' && echo 'Remove forbidden env override' && exit 1 true
Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- Invalid value for property %s: [%s], only [%s] are allowed
- Property %s is mandatory
- Github configuration is not complete. Please check your conf
- Configuration is not complete : %s
- Unsupported frequency:
AI-assisted analysis of SonarSource/sonarqube@184c821202 (2026-09-09).
Data as JSON: /api/errors/0e7542c72d2bc2d6.
Report an issue: GitHub.