{"record":{"id":"0ae4960bbd83e861","repo":"kubernetes/kops","slug":"error-doing-head-on-q-v","errorCode":null,"errorMessage":"error doing HEAD on %q: %v","messagePattern":"error doing HEAD on %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/assetstore.go","lineNumber":184,"sourceCode":"\t\tklog.Infof(\"    %s %s\", match.Key, match.AssetPath)\n\t}\n\treturn nil, fmt.Errorf(\"found multiple matching assets for key: %q\", key)\n}\n\n// Add an asset into the store, in one of the recognized formats (see Assets in types package)\nfunc (a *AssetStore) AddForTest(id string, path string, content string) {\n\ta.assets = append(a.assets, &asset{\n\t\tKey:       id,\n\t\tAssetPath: path,\n\t\tresource:  NewStringResource(content),\n\t})\n}\n\nfunc hashFromHTTPHeader(url string) (*hashing.Hash, error) {\n\tklog.Infof(\"Doing HTTP HEAD on %q\", url)\n\tresponse, err := http.Head(url)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error doing HEAD on %q: %v\", url, err)\n\t}\n\tdefer response.Body.Close()\n\n\tetag := response.Header.Get(\"ETag\")\n\tetag = strings.TrimSpace(etag)\n\tetag = strings.Trim(etag, \"'\\\"\")\n\n\tif etag != \"\" {\n\t\tif len(etag) == 32 {\n\t\t\t// Likely md5\n\t\t\treturn hashing.HashAlgorithmMD5.FromString(etag)\n\t\t}\n\t}\n\n\treturn nil, fmt.Errorf(\"unable to determine hash from HTTP HEAD: %q\", url)\n}\n\n// Add an asset into the store, in one of the recognized formats (see Assets in types package)","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/assetstore.go#L166-L202","documentation":"hashFromHTTPHeader performs an HTTP HEAD against an asset URL to discover its checksum; the request itself failed (DNS, connection refused, 404, proxy failure), so no hash can be obtained.","triggerScenarios":"Thrown at upup/pkg/fi/assetstore.go:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the URL is reachable from the machine running kOps (curl -I)","Fix proxy/TLS settings if the environment blocks the request","Retry — transient network failures are a common cause"],"exampleFix":null,"handlingStrategy":"retry","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"}