dgraph-io/dgraph · error
readManifest failed to read the file:
Error message
readManifest failed to read the file:
What it means
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.
Source
Thrown at worker/backup_manifest.go:216
ns_attr, err := x.AttrFrom2103(op.DropValue)
if err != nil {
return errors.Errorf("while parsing the drop operation %+v got: %q",
op, err)
}
op.DropValue = ns_attr
}
}
case 2105:
// pass
}
return nil
}
func readManifest(h UriHandler, path string) (*Manifest, error) {
var m Manifest
b, err := h.Read(path)
if err != nil {
return &m, errors.Wrap(err, "readManifest failed to read the file: ")
}
if err := json.Unmarshal(b, &m); err != nil {
return &m, errors.Wrap(err, "readManifest failed to unmarshal: ")
}
return &m, nil
}
func GetLatestManifest(h UriHandler, uri *url.URL) (*Manifest, error) {
manifest, err := GetManifest(h, uri)
if err != nil {
return &Manifest{}, errors.Wrap(err, "failed to get the manifest: ")
}
if len(manifest.Manifests) == 0 {
return &Manifest{}, nil
}
return manifest.Manifests[len(manifest.Manifests)-1], nil
}
View on GitHub (pinned to 759e242be6)
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.
Example fix
// before dgraph backup --dst s3://s3.us-east-1.amazonaws.com/bucket --access_key=wrong // after: use valid credentials AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... dgraph backup --dst s3://s3.us-east-1.amazonaws.com/bucket
Defensive patterns
Strategy: try-catch
Validate before calling
if !h.FileExists(path) {
return fmt.Errorf("manifest missing before read: %s", path)
} Try / catch
m, err := readManifest(h, path)
if err != nil && strings.Contains(err.Error(), "failed to read the file") {
// check credentials/endpoint, refresh listing, then retry once
if err2 := checkStorageAccess(h); err2 == nil {
m, err = readManifest(h, path)
}
} Prevention
- Validate access keys and endpoints before running backup/restore
- Verify network reachability to the object store
- Re-list backup paths after external deletions
When it happens
Trigger: 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).
Common situations: Wrong access keys or endpoint in minio config; deleted backup directory listed then read fails; DNS/proxy issues to S3; local filesystem path typos.
Related errors
- failed to read master manifest:
- while Getting latest manifest:
- cannot read manifests at location %s
- complete backup failed
- failed to lazy-load GraphQL schema
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/76dc666059db4876.
Report an issue: GitHub.