{"record":{"id":"76dc666059db4876","repo":"dgraph-io/dgraph","slug":"readmanifest-failed-to-read-the-file","errorCode":null,"errorMessage":"readManifest failed to read the file: ","messagePattern":"readManifest failed to read the file: ","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"worker/backup_manifest.go","lineNumber":216,"sourceCode":"\t\t\t\tns_attr, err := x.AttrFrom2103(op.DropValue)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn errors.Errorf(\"while parsing the drop operation %+v got: %q\",\n\t\t\t\t\t\top, err)\n\t\t\t\t}\n\t\t\t\top.DropValue = ns_attr\n\t\t\t}\n\t\t}\n\tcase 2105:\n\t\t// pass\n\t}\n\treturn nil\n}\n\nfunc readManifest(h UriHandler, path string) (*Manifest, error) {\n\tvar m Manifest\n\tb, err := h.Read(path)\n\tif err != nil {\n\t\treturn &m, errors.Wrap(err, \"readManifest failed to read the file: \")\n\t}\n\tif err := json.Unmarshal(b, &m); err != nil {\n\t\treturn &m, errors.Wrap(err, \"readManifest failed to unmarshal: \")\n\t}\n\treturn &m, nil\n}\n\nfunc GetLatestManifest(h UriHandler, uri *url.URL) (*Manifest, error) {\n\tmanifest, err := GetManifest(h, uri)\n\tif err != nil {\n\t\treturn &Manifest{}, errors.Wrap(err, \"failed to get the manifest: \")\n\t}\n\tif len(manifest.Manifests) == 0 {\n\t\treturn &Manifest{}, nil\n\t}\n\treturn manifest.Manifests[len(manifest.Manifests)-1], nil\n}\n","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/worker/backup_manifest.go#L198-L234","documentation":"readManifest reads the raw bytes of a per-backup manifest file via the URI handler. This error wraps any transport-level read failure (file not found, permission denied, network/object-store error), distinct from JSON parsing failures.","triggerScenarios":"getConsolidatedManifest calls readManifest for a path and h.Read(path) returns an error — missing file, wrong credentials, network failure, malformed URI handler configuration (bad minio/S3 endpoint).","commonSituations":"Wrong access keys or endpoint in minio config; deleted backup directory listed then read fails; DNS/proxy issues to S3; local filesystem path typos.","solutions":["Confirm the manifest file exists at the given path in the backup URI.","Verify storage credentials and endpoint configuration (minio/S3 access keys).","Re-list the backup location and retry to clear stale paths.","Check network connectivity/proxy settings to the storage backend."],"exampleFix":"// before\ndgraph backup --dst s3://s3.us-east-1.amazonaws.com/bucket --access_key=wrong\n// after: use valid credentials\nAWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... dgraph backup --dst s3://s3.us-east-1.amazonaws.com/bucket","handlingStrategy":"try-catch","validationCode":"if !h.FileExists(path) {\n    return fmt.Errorf(\"manifest missing before read: %s\", path)\n}","typeGuard":null,"tryCatchPattern":"m, err := readManifest(h, path)\nif err != nil && strings.Contains(err.Error(), \"failed to read the file\") {\n    // check credentials/endpoint, refresh listing, then retry once\n    if err2 := checkStorageAccess(h); err2 == nil {\n        m, err = readManifest(h, path)\n    }\n}","preventionTips":["Validate access keys and endpoints before running backup/restore","Verify network reachability to the object store","Re-list backup paths after external deletions"],"tags":["backup","manifest","io","storage","network"],"backgroundTag":"manifest-read-failed","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}