Skip to content
Latchkey

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.

sonar-scanner
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 server

Common 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

  1. Confirm the reachable base URL of your SonarQube or SonarCloud instance.
  2. Set SONAR_HOST_URL in the scanner step env.
  3. For SonarCloud, use https://sonarcloud.io.
.github/workflows/ci.yml
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.

Terminal
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.

Frequently asked questions

What causes ""Fail to get bootstrap index from server""?
The URL points at the wrong host or port, or defaults to something unreachable from the runner, so the bootstrap request never lands.
How do I fix "Fail to get bootstrap index from server"?
Set the correct SONAR_HOST_URL

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card