kubernetes/kops · error
failed to get server %s: %w
Error message
failed to get server %s: %w
What it means
VerifyToken calls instance.GetServer with the server ID embedded in the bootstrap token. If the API call errors, or the response contains no Server object, kOps wraps everything in this error and rejects the node bootstrap request.
Source
Thrown at upup/pkg/fi/cloudup/scaleway/verifier.go:98
profile, err := scalewaymetadata.CreateValidScalewayProfile()
if err != nil {
return nil, err
}
scwClient, err := scw.NewClient(
scw.WithProfile(profile),
scw.WithUserAgent(KopsUserAgentPrefix+kopsv.Version),
)
if err != nil {
return nil, fmt.Errorf("creating client for Scaleway Verifier: %w", err)
}
serverResponse, err := instance.NewAPI(scwClient).GetServer(&instance.GetServerRequest{
ServerID: serverID,
Zone: zone,
}, scw.WithContext(ctx))
if err != nil || serverResponse == nil || serverResponse.Server == nil {
return nil, fmt.Errorf("failed to get server %s: %w", serverID, err)
}
server := serverResponse.Server
ips, err := ipam.NewAPI(scwClient).ListIPs(&ipam.ListIPsRequest{
Region: region,
ResourceID: new(server.ID),
IsIPv6: new(false),
Zonal: new(zone.String()),
}, scw.WithContext(ctx), scw.WithAllPages())
if err != nil {
return nil, fmt.Errorf("failed to get IP for server %q: %w", server.Name, err)
}
if ips.TotalCount == 0 {
return nil, fmt.Errorf("no IP found for server %q: %w", server.Name, err)
}
addresses := []string(nil)
challengeEndPoints := []string(nil)View on GitHub (pinned to 4c8573c808)
Solutions
- Confirm the server ID in the node's bootstrap token still exists: scw instance server get <server-id> zone=<zone>
- Check control-plane Scaleway IAM credentials include instance read on the node's project
- Check network connectivity/proxy between control plane and api.scaleway.com and retry (transient errors)
- Ensure node and control plane belong to the same Scaleway project/Organization
Defensive patterns
Strategy: try-catch
Validate before calling
var scwRespErr *scw.ResponseError
if errors.As(err, &scwRespErr) && scwRespErr.StatusCode == http.StatusNotFound {
log.Printf("server %s does not exist in zone %s; token stale", serverID, zone)
} Type guard
func isNotFound(err error) bool {
var rerr *scw.ResponseError
return errors.As(err, &rerr) && rerr.StatusCode == 404
} Try / catch
if err != nil {
var rerr *scw.ResponseError
if errors.As(err, &rerr) {
switch rerr.StatusCode {
case 404:
// stale token / deleted server
case 403:
// IAM permission missing
}
}
return fmt.Errorf("failed to get server %s: %w", serverID, err)
} Prevention
- Keep node and control plane in the same Scaleway project
- Ensure control-plane IAM includes InstanceReadOnly
- Re-request bootstrap if a node's token is stale; reissue tokens after server recreation
When it happens
Trigger: The instance.GetServer API call fails (network error, 403/404 from Scaleway) or returns a nil Server — e.g. the serverID trimmed from the token does not exist in the zone, or the control-plane credentials lack instance read permission on the project.
Common situations: Stale/replayed bootstrap token referencing a deleted server, node launched in a different project than the control plane's credentials, IAM policy missing InstanceReadOnly, or a transient Scaleway API outage.
Related errors
- error finding instances: %w
- failed to get server %s: %w
- failed to get info for server %q: %w
- could not find IP for server %s
- failed to get IP for server %q: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/9fd0c611aa90317f.
Report an issue: GitHub.