kubernetes/kops · error
unabled to create listener: %v
Error message
unabled to create listener: %v
What it means
This error is returned by the Openstack load balancer listener creation helper when the Gophercloud call listeners.Create fails. It is wrapped in vfs.RetryWithBackoff, so the raw OpenStack/HTTP error is embedded via %v and the operation is retried until backoff is exhausted, after which ErrWaitTimeout or the last error is returned.
Source
Thrown at upup/pkg/fi/cloudup/openstack/loadbalancer.go:555
}
return listenerList, err
}
return listenerList, nil
}
func (c *openstackCloud) CreateListener(opts listeners.CreateOpts) (listener *listeners.Listener, err error) {
return createListener(c, opts)
}
func createListener(c OpenstackCloud, opts listeners.CreateOpts) (listener *listeners.Listener, err error) {
if c.LoadBalancerClient() == nil {
return nil, fmt.Errorf("loadbalancer support not available in this deployment")
}
done, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {
listener, err = listeners.Create(context.TODO(), c.LoadBalancerClient(), opts).Extract()
if err != nil {
return false, fmt.Errorf("unabled to create listener: %v", err)
}
return true, nil
})
if !done {
if err == nil {
err = wait.ErrWaitTimeout
}
return listener, err
}
return listener, nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Verify kops cluster spec loadBalancer listener port/protocol values are valid for Octavia
- Confirm Octavia (or neutron-lbaasv2) is installed and the loadbalancer exists in the target project
- Check openstack credentials/scopes (OS_* env) and that the project has quota for listeners
- Inspect the embedded %v error for HTTP 404/403/409/503 to narrow the root cause
- Retry once the Octavia service is healthy; the helper already backoff-retries transient faults
Example fix
// before listenerPort: 443 protocol: HTTP // after listenerPort: 443 protocol: TERMINATED_HTTPS
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check: loadbalancer exists and listener config is sane lb, err := osClient.LoadBalancer().LoadBalancers.Get(ctx, lbID).Extract() // err == nil and lb.ProvisioningStatus == "ACTIVE" before CreateListener
Try / catch
listener, err := createListener(...)
if err != nil {
if strings.Contains(err.Error(), "not available in this deployment") {
// feature gate disabled in cluster config
}
return fmt.Errorf("listener creation failed: %w", err)
} Prevention
- Validate listener port/protocol against Octavia-supported combinations before apply
- Ensure Octavia is installed in the OpenStack deployment before enabling LB features
- Monitor quotas for listeners in the project
- Use kops cluster spec validation (kops replace/apply --dry-run) to catch config issues early
When it happens
Trigger: Neutron LBaaS octavia listener create returns an HTTP error: invalid protocol/port combination, loadbalancer ID not found, quota exceeded, or network/auth failure.
Common situations: Misconfigured loadBalancer listener config (bad port/protocol), Octavia service unavailable or not installed, neutron LBaaSv2 deprecated/removed in newer OpenStack, expired/insufficient OpenStack credentials, LB quota exhausted.
Related errors
- failed to build load balancer client: %w
- error building lb client: %w
- loadbalancer API versions not found
- GetApiIngressStatus: Failed to list openstack loadbalancers:
- error deleting loadbalancer: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/c4b4bbcafbf8d860.
Report an issue: GitHub.