kubernetes/kops · error
failed to get server %s: %w
Error message
failed to get server %s: %w
What it means
After parsing the id, getServer calls the Scaleway instance API GetServer. If the API call errors or returns nil server, the error is wrapped as 'failed to get server <id>'. This indicates the server could not be retrieved from the Scaleway API.
Source
Thrown at pkg/nodeidentity/scaleway/identify.go:150
// stringKeyFunc is a string as cache key function
func stringKeyFunc(obj interface{}) (string, error) {
key := obj.(*nodeidentity.Info).InstanceID
return key, nil
}
// getServer queries Scaleway for the server with the specified ID, returning an error if not found
func (i *nodeIdentifier) getServer(ctx context.Context, id string) (*instance.Server, error) {
api := instance.NewAPI(i.client)
uuid := strings.Split(id, "/")
if len(uuid) != 3 {
return nil, fmt.Errorf("unexpected format for server id %s", id)
}
server, err := api.GetServer(&instance.GetServerRequest{
ServerID: uuid[2],
Zone: scw.Zone(uuid[1]),
}, scw.WithContext(ctx))
if err != nil || server == nil {
return nil, fmt.Errorf("failed to get server %s: %w", id, err)
}
return server.Server, nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the wrapped cause (%w) for the underlying Scaleway API error and fix per its message
- Verify Scaleway credentials (access key, secret key, organization/project) in the environment/config
- Confirm the zone and server UUID in the provider id are correct and the server still exists
- Retry after checking Scaleway status page if it's a transient API/network failure
Defensive patterns
Strategy: try-catch
Try / catch
server, err := getServer(ctx, id)
if err != nil {
var apiErr *scw.Error
if errors.As(err, &apiErr) && apiErr.StatusCode == http.StatusNotFound {
// server deleted; stop retrying
return ErrServerGone
}
// transient: credentials, network, throttling
return fmt.Errorf("retrying server lookup: %w", err)
} Prevention
- Verify Scaleway credentials (SCW_ACCESS_KEY/SCW_SECRET_KEY) before cluster operations
- Handle scw.Error status codes distinctly (404 vs 429 vs 5xx)
- Add retries with backoff for transient API failures
- Confirm server existence before scheduled node identification
When it happens
Trigger: Scaleway API returns an error (invalid credentials, wrong zone, server not found/deleted, rate limiting, network failure) or GetServer returns a nil server for the given ServerID/Zone.
Common situations: Server terminated between event and lookup; wrong zone segment in the provider id; expired/missing Scaleway credentials (access key/secret key); Scaleway API outage or throttling.
Related errors
- failed to get server %s: %w
- failed to get IP for server %q: %w
- listing DNS records named %q in zone %q: %w
- updating DNS record %q (%s): %w
- creating DNS record %q in zone %q: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/5b57ce8cc1948233.
Report an issue: GitHub.