{"record":{"id":"8645175da6d72b59","repo":"juicedata/juicefs","slug":"open-s-864517","errorCode":null,"errorMessage":"open %s","messagePattern":"open %s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/object/nfs.go","lineNumber":129,"sourceCode":"\t\t\treturn nil, err\n\t\t}\n\t\tif f2, ok := ff.(*file); ok {\n\t\t\tf2.isSymlink = true\n\t\t}\n\t\treturn ff, nil\n\t}\n\treturn n.fileInfo(key, fi), nil\n}\n\nfunc (n *nfsStore) Get(ctx context.Context, key string, off, limit int64, getters ...AttrGetter) (io.ReadCloser, error) {\n\tp := n.path(key)\n\tif strings.HasSuffix(p, \"/\") {\n\t\treturn io.NopCloser(bytes.NewBuffer([]byte{})), nil\n\t}\n\n\tff, err := n.target.Open(p)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"open %s\", p)\n\t}\n\n\tif limit > 0 {\n\t\treturn &SectionReaderCloser{\n\t\t\tSectionReader: io.NewSectionReader(ff, off, limit),\n\t\t\tCloser:        ff,\n\t\t}, nil\n\t}\n\treturn ff, err\n}\n\nfunc (n *nfsStore) mkdirAll(p string) error {\n\tp = strings.TrimSuffix(p, \"/\")\n\tfi, _, err := n.target.Lookup(p)\n\tif err == nil {\n\t\tif fi.IsDir() {\n\t\t\tlogger.Tracef(\"nfs mkdir: path %s already exists\", p)\n\t\t\treturn nil","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/object/nfs.go#L111-L147","documentation":"nfs.go's Get wraps a failure from n.target.Open(p) with the `open %s` message. It means the NFS-backed object storage could not open the requested file path for reading. Paths ending in `/` are special-cased and return an empty reader, so this error always concerns an actual file open failure.","triggerScenarios":"Calling Get on the NFS object storage with a key whose file does not exist on the NFS export, lacks read permission, or when the NFS mount is unavailable/stale at open time.","commonSituations":"Deleted or renamed files still referenced by metadata, wrong NFS export or subdirectory configured so relative keys don't resolve, permission changes on the export, or stale NFS handles after a server restart.","solutions":["Verify the file exists on the NFS target at path p (ls the export)","Check read permissions for the user/group the client runs as on the exported file","Confirm the NFS mount is healthy (mount, showmount, try reading the file directly)","Fix the configured NFS target/address so keys resolve to the intended export"],"exampleFix":"// before\nff, err := n.target.Open(p)\nif err != nil { return nil, errors.Wrapf(err, \"open %s\", p) }\n// after (caller-side guard)\nif _, err := os.Stat(localPathFor(key)); err != nil { return nil, err } // handle ENOENT before Get","handlingStrategy":"try-catch","validationCode":"if _, err := os.Stat(p); err != nil { return nil, os.ErrNotExist } // caller with direct export access","typeGuard":null,"tryCatchPattern":"r, err := store.Get(ctx, key, off, limit)\nif err != nil {\n    var perr *os.PathError\n    if errors.As(err, &perr) && errors.Is(perr.Err, syscall.ENOENT) { return errNotFound }\n    return err\n}","preventionTips":["Check file existence before Get when keys may be pruned","Keep NFS mounts healthy (monitor with showmount/stat)","Run the client as a user with read access to the export","Match keys to the configured export root"],"tags":["nfs","file-open","object-storage","io"],"backgroundTag":"file-open-failed","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"}