juicedata/juicefs · error
create %s %s: %s
Error message
create %s %s: %s
What it means
After parsing the sync URI, createSyncStorage delegates backend construction to object.CreateStorage(name, endpoint, accessKey, secretKey, token). This error wraps any failure from that backend factory — unknown scheme, bad endpoint, failed connection/handshake, missing credentials — with the storage name and endpoint for context.
Source
Thrown at cmd/sync.go:451
isS3PathTypeUrl := isS3PathType(u.Host)
if name == "minio" || name == "s3" && isS3PathTypeUrl {
// bucket name is part of path
endpoint += u.Path
}
store, err := object.CreateStorage(name, endpoint, accessKey, secretKey, token)
if name == "nfs" && err != nil {
p := u.Path
for err != nil && strings.Contains(err.Error(), "MNT3ERR_NOENT") {
p = filepath.Dir(p)
store, err = object.CreateStorage(name, u.Host+p, accessKey, secretKey, token)
}
if err == nil {
store = object.WithPrefix(store, u.Path[len(p):])
}
}
if err != nil {
return nil, fmt.Errorf("create %s %s: %s", name, endpoint, err)
}
if conf.Links {
if _, ok := store.(object.SupportSymlink); !ok {
logger.Warnf("storage %q does not support symlink, ignore it", utils.RemovePassword(uri))
conf.Links = false
}
}
if conf.Perms {
if _, ok := store.(object.FileSystem); !ok {
logger.Warnf("%q is not a file system, can not preserve permissions", store)
conf.Perms = false
}
}
switch name {
case "file", "nfs":
case "minio":View on GitHub (pinned to c9a67b23e8)
Solutions
- Check the scheme is a supported object store name (s3, oss, cos, sftp, file, jfs, nfs, minio, ...) and spelled correctly
- Verify the endpoint is reachable: `curl https://<host>` or `nc -vz <host> <port>`
- Confirm credentials (accessKey/secretKey from the URI userinfo or environment) are valid
- Look at the wrapped inner error after the second colon — it names the actual backend failure
- For NFS, confirm the export path exists on the server (showmount -e <host>)
Example fix
// before juicefs sync s31://bucket/data /mnt/jfs/data // create s31 : unsupported scheme // after juicefs sync s3://bucket/data /mnt/jfs/data
Defensive patterns
Strategy: try-catch
Validate before calling
u, err := url.Parse(uri)
if err != nil || u.Scheme == "" {
return fmt.Errorf("invalid storage URI: %q", uri)
}
supported := map[string]bool{"s3": true, "oss": true, "cos": true, "minio": true, "file": true, "sftp": true, "jfs": true, "nfs": true}
if !supported[strings.ToLower(u.Scheme)] {
return fmt.Errorf("unsupported storage scheme: %s", u.Scheme)
} Type guard
null
Try / catch
store, err := createSyncStorage(uri, conf)
if err != nil {
var detail string
if parts := strings.SplitN(err.Error(), ": ", 3); len(parts) == 3 {
detail = parts[2] // backend-specific cause
}
return fmt.Errorf("storage init failed (%s): %s", detail, utils.RemovePassword(uri))
} Prevention
- Validate schemes and endpoints against a whitelist before syncing
- Test endpoint reachability and credentials with a cheap HEAD/list call first
- Never embed passwords directly in URIs in scripts; use env/config
- Keep client versions consistent across sync cluster nodes
When it happens
Trigger: `juicefs sync` with a URI whose scheme has no registered object store (e.g. a typo like `s31://`), an unreachable endpoint, wrong bucket/export path (NFS MNT3ERR_NOENT fallback also failed), rejected credentials, or a backend driver returning an init error (e.g. missing binary or unsupported configuration).
Common situations: Typo in the storage scheme; S3/MinIO endpoint down or wrong port; access key/secret wrong or missing in env; NFS export path not exported; volume name for jfs:// not mounted/available on the sync worker.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/11ac08429b0e7dfe.
Report an issue: GitHub.