{"record":{"id":"c4b4bbcafbf8d860","repo":"kubernetes/kops","slug":"unabled-to-create-listener-v","errorCode":null,"errorMessage":"unabled to create listener: %v","messagePattern":"unabled to create listener: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/loadbalancer.go","lineNumber":555,"sourceCode":"\t\t}\n\t\treturn listenerList, err\n\t}\n\treturn listenerList, nil\n}\n\nfunc (c *openstackCloud) CreateListener(opts listeners.CreateOpts) (listener *listeners.Listener, err error) {\n\treturn createListener(c, opts)\n}\n\nfunc createListener(c OpenstackCloud, opts listeners.CreateOpts) (listener *listeners.Listener, err error) {\n\tif c.LoadBalancerClient() == nil {\n\t\treturn nil, fmt.Errorf(\"loadbalancer support not available in this deployment\")\n\t}\n\n\tdone, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {\n\t\tlistener, err = listeners.Create(context.TODO(), c.LoadBalancerClient(), opts).Extract()\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"unabled to create listener: %v\", err)\n\t\t}\n\t\treturn true, nil\n\t})\n\tif !done {\n\t\tif err == nil {\n\t\t\terr = wait.ErrWaitTimeout\n\t\t}\n\t\treturn listener, err\n\t}\n\treturn listener, nil\n}\n","sourceCodeStart":537,"sourceCodeEnd":567,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/loadbalancer.go#L537-L567","documentation":"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.","triggerScenarios":"Neutron LBaaS octavia listener create returns an HTTP error: invalid protocol/port combination, loadbalancer ID not found, quota exceeded, or network/auth failure.","commonSituations":"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.","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"],"exampleFix":"// before\nlistenerPort: 443\nprotocol: HTTP\n// after\nlistenerPort: 443\nprotocol: TERMINATED_HTTPS","handlingStrategy":"try-catch","validationCode":"// pre-check: loadbalancer exists and listener config is sane\nlb, err := osClient.LoadBalancer().LoadBalancers.Get(ctx, lbID).Extract()\n// err == nil and lb.ProvisioningStatus == \"ACTIVE\" before CreateListener","typeGuard":null,"tryCatchPattern":"listener, err := createListener(...)\nif err != nil {\n    if strings.Contains(err.Error(), \"not available in this deployment\") {\n        // feature gate disabled in cluster config\n    }\n    return fmt.Errorf(\"listener creation failed: %w\", err)\n}","preventionTips":["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"],"tags":["openstack","loadbalancer","octavia","neutron"],"backgroundTag":"openstack-api-error","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}