SonarScanner "Fail to get bootstrap index from server" in CI
On startup the scanner downloads a bootstrap index from the server at SONAR_HOST_URL. This error means it could not reach that URL: the host is wrong, the server is down, or a proxy blocks it.
What this error means
The scanner fails with "ERROR: Error during SonarScanner execution" and "Caused by: Fail to get bootstrap index from server: <url>". No analysis is uploaded.
ERROR: Error during SonarScanner execution
ERROR: Fail to get bootstrap index from server: https://sonarqube.internal:9000/batch/index
ERROR: Caused by: Fail to download bootstrap from serverCommon causes
SONAR_HOST_URL is wrong or unset
The URL points at the wrong host or port, or defaults to something unreachable from the runner, so the bootstrap request never lands.
The server is down or blocked by network policy
A self-hosted SonarQube that is offline, or a firewall/proxy between the runner and the server, prevents the download.
How to fix it
Set the correct SONAR_HOST_URL
- Confirm the reachable base URL of your SonarQube or SonarCloud instance.
- Set SONAR_HOST_URL in the scanner step env.
- For SonarCloud, use https://sonarcloud.io.
env:
SONAR_HOST_URL: https://sonarqube.internal:9000
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}Verify reachability from the runner
Curl the host from a job step to distinguish a wrong URL from a server outage or a blocked route.
curl -sS -o /dev/null -w "%{http_code}\n" "$SONAR_HOST_URL/api/system/status"How to prevent it
- Set SONAR_HOST_URL from a secret or variable, not a hardcoded guess.
- Health-check the server before relying on it in critical pipelines.
- Allowlist the runner egress to the SonarQube host.