{"record":{"id":"055defe61858abf7","repo":"kubernetes/kops","slug":"invalid-remote-address-q-v","errorCode":null,"errorMessage":"invalid remote address %q: %v","messagePattern":"invalid remote address %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/verifier.go","lineNumber":151,"sourceCode":"\t}\n\n\tvar addrs []string\n\n\tvar addresses map[string][]Address\n\terr = mapstructure.Decode(instance.Addresses, &addresses)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to decode addresses: %w\", err)\n\t}\n\n\tfor _, addrList := range addresses {\n\t\tfor _, props := range addrList {\n\t\t\taddrs = append(addrs, props.Addr)\n\t\t}\n\t}\n\t// ensure that request is coming from same machine\n\trequestAddr, _, err := net.SplitHostPort(rawRequest.RemoteAddr)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid remote address %q: %v\", rawRequest.RemoteAddr, err)\n\t}\n\tif !stringInSlice(requestAddr, addrs) {\n\t\treturn nil, fmt.Errorf(\"authentication request address %q does not match server addresses %v\", requestAddr, addrs)\n\t}\n\n\t// We will call back onto this address, now that we have verified it is an instance IP\n\tchallengeEndpoint := net.JoinHostPort(requestAddr, strconv.Itoa(wellknownports.NodeupChallenge))\n\n\t// check from kubernetes API does the instance already exist\n\t_, err = o.kubeClient.CoreV1().Nodes().Get(ctx, instance.Name, v1.GetOptions{})\n\tif err == nil {\n\t\treturn nil, bootstrap.ErrAlreadyExists\n\t}\n\tif err != nil && !errors.IsNotFound(err) {\n\t\treturn nil, fmt.Errorf(\"got error while querying kubernetes api: %w\", err)\n\t}\n\n\tresult := &bootstrap.VerifyResult{","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/verifier.go#L133-L169","documentation":"The HTTP RemoteAddr of the bootstrap request could not be split into host and port by net.SplitHostPort, so the source IP of the requester cannot be determined for the same-machine check. Typically a malformed or proxy-mangled peer address.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstack/verifier.go:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the reverse-proxy/load-balancer in front of kops-controller; it must preserve a valid RemoteAddr","Ensure requests reach the verifier directly or via a proxy that sets a proper address","Reject the request: the peer address is unparseable"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}