{"record":{"id":"cf8350bd51e7f37c","repo":"juicedata/juicefs","slug":"load-setting-s","errorCode":null,"errorMessage":"load setting: %s","messagePattern":"load setting: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"cmd/object.go","lineNumber":518,"sourceCode":"}\n\nfunc newJFS(endpoint, accessKey, secretKey, token string) (object.ObjectStorage, error) {\n\tpid, uid, gid = uint32(os.Getpid()), uint32(utils.GetCurrentUID()), uint32(utils.GetCurrentGID())\n\tif runtime.GOOS == \"windows\" && utils.IsWinAdminOrElevatedPrivilege() {\n\t\tuid = 0\n\t\tgid = 0\n\t}\n\tmetaUrl := os.Getenv(endpoint)\n\tif metaUrl == \"\" {\n\t\tmetaUrl = endpoint\n\t}\n\tmetaConf := meta.DefaultConf()\n\tmetaConf.MaxDeletes = 10\n\tmetaConf.NoBGJob = true\n\tmetaCli := meta.NewClient(metaUrl, metaConf)\n\tformat, err := metaCli.Load(true)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"load setting: %s\", err)\n\t}\n\tblob, err := NewReloadableStorage(format, metaCli, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"object storage: %s\", err)\n\t}\n\tchunkConf := getDefaultChunkConf(format)\n\tstore := chunk.NewCachedStore(blob, *chunkConf, nil)\n\tregisterMetaMsg(metaCli, store, chunkConf)\n\terr = metaCli.NewSession(false)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"new session: %s\", err)\n\t}\n\tmetaCli.OnReload(func(fmt *meta.Format) {\n\t\tstore.UpdateLimit(fmt.UploadLimit, fmt.DownloadLimit)\n\t})\n\n\tvfsConf := &vfs.Config{\n\t\tMeta:            metaConf,","sourceCodeStart":500,"sourceCodeEnd":536,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/object.go#L500-L536","documentation":"newJFS (jfs object-storage backend bootstrap) calls metaCli.Load(true) to fetch the volume's format/setting from the metadata engine; any error is wrapped as 'load setting: %s'. It means the client could not read the volume configuration from the metadata URL, so the storage cannot be set up.","triggerScenarios":"`juicefs gateway`/`sync` with a jfs:// target where metaCli.Load fails: unreachable metadata engine (Redis/SQL/KV down), wrong metadata URL, volume not formatted (no setting record), auth failure to Redis/DB.","commonSituations":"Redis metadata server restarted/password changed; SQLite file path missing; metadata URL typo (redis:// vs rediss://); volume deleted but URL still referenced; network firewall blocking the metadata port.","solutions":["Verify the metadata URL and credentials, and that the engine is reachable (redis-cli/psql connect test).","Confirm the volume exists: run `juicefs status <meta-url>` — if not formatted, run `juicefs format` first.","Check firewall/network to the metadata server port.","Inspect the wrapped error string for the engine-specific cause (NOAUTH, connection refused, no such table, etc.)."],"exampleFix":"// before\nmetaUrl := \"redis://wrong-host:6379/1\"\n// after: verify first\n$ juicefs status redis://correct-host:6379/1\nmetaUrl := \"redis://correct-host:6379/1\"","handlingStrategy":"try-catch","validationCode":"// verify metadata engine reachability and volume existence first\n$ juicefs status redis://host:6379/1","typeGuard":null,"tryCatchPattern":"cli := meta.NewClient(metaUrl, metaConf)\nif _, err := cli.Load(true); err != nil {\n    return fmt.Errorf(\"load setting: %s\", err)\n}","preventionTips":["Validate the metadata URL format and credentials before launching.","Run `juicefs status <meta-url>` to confirm the volume exists.","Monitor metadata engine (Redis/DB) availability.","Check firewall rules for the metadata port."],"tags":["metadata","config-load","redis","startup"],"backgroundTag":"resource-not-found","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}