{"record":{"id":"11ac08429b0e7dfe","repo":"juicedata/juicefs","slug":"create-s-s-s","errorCode":null,"errorMessage":"create %s %s: %s","messagePattern":"create (.+?) (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/sync.go","lineNumber":451,"sourceCode":"\tisS3PathTypeUrl := isS3PathType(u.Host)\n\tif name == \"minio\" || name == \"s3\" && isS3PathTypeUrl {\n\t\t// bucket name is part of path\n\t\tendpoint += u.Path\n\t}\n\n\tstore, err := object.CreateStorage(name, endpoint, accessKey, secretKey, token)\n\tif name == \"nfs\" && err != nil {\n\t\tp := u.Path\n\t\tfor err != nil && strings.Contains(err.Error(), \"MNT3ERR_NOENT\") {\n\t\t\tp = filepath.Dir(p)\n\t\t\tstore, err = object.CreateStorage(name, u.Host+p, accessKey, secretKey, token)\n\t\t}\n\t\tif err == nil {\n\t\t\tstore = object.WithPrefix(store, u.Path[len(p):])\n\t\t}\n\t}\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"create %s %s: %s\", name, endpoint, err)\n\t}\n\n\tif conf.Links {\n\t\tif _, ok := store.(object.SupportSymlink); !ok {\n\t\t\tlogger.Warnf(\"storage %q does not support symlink, ignore it\", utils.RemovePassword(uri))\n\t\t\tconf.Links = false\n\t\t}\n\t}\n\n\tif conf.Perms {\n\t\tif _, ok := store.(object.FileSystem); !ok {\n\t\t\tlogger.Warnf(\"%q is not a file system, can not preserve permissions\", store)\n\t\t\tconf.Perms = false\n\t\t}\n\t}\n\tswitch name {\n\tcase \"file\", \"nfs\":\n\tcase \"minio\":","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/sync.go#L433-L469","documentation":"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.","triggerScenarios":"`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).","commonSituations":"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.","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>)"],"exampleFix":"// before\njuicefs sync s31://bucket/data /mnt/jfs/data\n// create s31 : unsupported scheme\n// after\njuicefs sync s3://bucket/data /mnt/jfs/data","handlingStrategy":"try-catch","validationCode":"u, err := url.Parse(uri)\nif err != nil || u.Scheme == \"\" {\n\treturn fmt.Errorf(\"invalid storage URI: %q\", uri)\n}\nsupported := map[string]bool{\"s3\": true, \"oss\": true, \"cos\": true, \"minio\": true, \"file\": true, \"sftp\": true, \"jfs\": true, \"nfs\": true}\nif !supported[strings.ToLower(u.Scheme)] {\n\treturn fmt.Errorf(\"unsupported storage scheme: %s\", u.Scheme)\n}","typeGuard":"null","tryCatchPattern":"store, err := createSyncStorage(uri, conf)\nif err != nil {\n\tvar detail string\n\tif parts := strings.SplitN(err.Error(), \": \", 3); len(parts) == 3 {\n\t\tdetail = parts[2] // backend-specific cause\n\t}\n\treturn fmt.Errorf(\"storage init failed (%s): %s\", detail, utils.RemovePassword(uri))\n}","preventionTips":["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"],"tags":["object-storage","sync","juicefs","backend-init"],"backgroundTag":"api-request-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"}