Netflix/chaosmonkey · error
could not retrieve list of apps from spinnaker url %s: %v
Error message
could not retrieve list of apps from spinnaker url %s: %v
What it means
AppNames() lists all applications by calling the Spinnaker apps endpoint. This error wraps any failure of the underlying HTTP GET (s.client.Get(url)), typically a transport/TLS/connectivity problem, with the Spinnaker apps URL included for diagnosis.
Source
Thrown at spinnaker/spinnaker.go:350
}
data[account].Clusters[clusterName][region][asgName] = make([]D.InstanceID, len(asg.Instances))
for i, instance := range asg.Instances {
data[account].Clusters[clusterName][region][asgName][i] = D.InstanceID(instance.Name)
}
}
}
}
return D.NewApp(appName, data), nil
}
// AppNames returns list of names of all apps
func (s Spinnaker) AppNames() (appnames []string, err error) {
url := s.appsURL()
resp, err := s.client.Get(url)
if err != nil {
return nil, fmt.Errorf("could not retrieve list of apps from spinnaker url %s: %v", url, err)
}
defer func() {
if cerr := resp.Body.Close(); cerr != nil && err == nil {
err = fmt.Errorf("failed to close response body from %s: %v", url, err)
}
}()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("failed to read body when retrieving spinnaker app names from %s: %v", url, err)
}
var apps []spinnakerApp
err = json.Unmarshal(body, &apps)
if err != nil {
return nil, fmt.Errorf("could not parse spinnaker apps list from %s: body: \"%s\": %v", url, string(body), err)
}
View on GitHub (pinned to eaa28fb761)
Solutions
- Check network connectivity to the endpoint: curl --cert/--key <appsURL> from the chaosmonkey host
- Verify spinnaker.endpoint in the chaosmonkey config is correct and reachable
- Confirm the TLS client certificate is valid and accepted (test handshake with openssl s_client)
- Check for proxy/firewall/DNS issues on the host running chaosmonkey
Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight connectivity check:
resp, err := http.Get(endpoint)
if err != nil {
log.Fatalf("spinnaker endpoint %s unreachable: %v", endpoint, err)
}
resp.Body.Close() Try / catch
names, err := spin.AppNames()
if err != nil {
if strings.Contains(err.Error(), "could not retrieve list of apps") {
// transient network problem: retry with backoff
names, err = retryWithBackoff(3, spin.AppNames)
}
if err != nil { return err }
} Prevention
- Verify spinnaker.endpoint reachability from the chaosmonkey host
- Test TLS client cert auth before production runs
- Monitor Spinnaker gate availability
- Set sane HTTP timeouts and allow retries for transient failures
When it happens
Trigger: Calling AppNames() when s.client.Get(appsURL()) returns a non-nil error: DNS failure, connection refused/timeout, TLS handshake failure with the client cert, or an invalid endpoint URL.
Common situations: Spinnaker endpoint unreachable or firewall blocking; wrong spinnaker.endpoint in config; TLS client cert (p12/x509) not accepted by the server; corporate proxy interference; Spinnaker gate down.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- failed to retrieve server groups url (%s): %v
- http get failed at %s
- http get failed at %s
- body read failed at %s
- POST to %s failed, (body '%s')
AI-assisted analysis of Netflix/chaosmonkey@eaa28fb761 (2026-09-03).
Data as JSON: /api/errors/6b929dfb54cac67a.
Report an issue: GitHub.