{"record":{"id":"0b0c14971341c71f","repo":"juicedata/juicefs","slug":"error-reading-response-v","errorCode":null,"errorMessage":"error reading response: %v","messagePattern":"error reading response: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/debug.go","lineNumber":244,"sourceCode":"\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating GET request: %v\", err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error GET request: %v\", err)\n\t}\n\tif resp.StatusCode != 200 {\n\t\treturn nil, fmt.Errorf(\"error GET request, status code %d\", resp.StatusCode)\n\t}\n\n\tdefer func(body io.ReadCloser) {\n\t\tif err := body.Close(); err != nil {\n\t\t\tlogger.Errorf(\"error closing body: %v\", err)\n\t\t}\n\t}(resp.Body)\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error reading response: %v\", err)\n\t}\n\n\treturn body, nil\n}\n\n// check pprof service status\nfunc checkPort(port int, amp string) error {\n\turl := fmt.Sprintf(\"http://localhost:%d/debug/pprof/cmdline?debug=1\", port)\n\tresp, err := getRequest(url, 3*time.Second)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error checking pprof alive: %v\", err)\n\t}\n\tresp = bytes.ReplaceAll(resp, []byte{0}, []byte{' '})\n\tfields := strings.Fields(string(resp))\n\tflag := false\n\tfor _, field := range fields {\n\t\tif amp == field {\n\t\t\tflag = true","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/debug.go#L226-L262","documentation":"Returned by getRequest in `juicefs debug` when the HTTP response body from the pprof/metrics endpoint could not be read after a successful request. It wraps the underlying I/O error (connection reset, premature close) from talking to the mount process's debug interface.","triggerScenarios":"Thrown at cmd/debug.go:244 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the mount process is alive and the debug/https-port is reachable","Retry `juicefs debug`; transient connection resets while the process is under load are common"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}