{"record":{"id":"bf0be29a1d1164b7","repo":"juicedata/juicefs","slug":"juicefs-mount-command-exit-with-error-please-chec","errorCode":null,"errorMessage":"juicefs mount command exit with error, please check the log for details","messagePattern":"juicefs mount command exit with error, please check the log for details","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/winfsp/winfs.go","lineNumber":1193,"sourceCode":"\tif !mountPointIsDrive {\n\t\tif _, err := os.Stat(conf.Mountpoint); err == nil {\n\t\t\treturn fmt.Errorf(\"Mount point %s cannot be an existing folder\", conf.Mountpoint)\n\t\t}\n\n\t\t// the parent directory of the mount point must exist\n\t\tparentDir := filepath.Dir(conf.Mountpoint)\n\t\tif _, err := os.Stat(parentDir); os.IsNotExist(err) {\n\t\t\treturn fmt.Errorf(\"Parent directory %s of mount point %s does not exist\", parentDir, conf.Mountpoint)\n\t\t}\n\t}\n\n\tlogger.Debugf(\"mount point: %s, mountPointIsDrive: %v, options: %s\", conf.Mountpoint, mountPointIsDrive, options)\n\texitOk := host.Mount(conf.Mountpoint, []string{\"-o\", options})\n\tif exitOk {\n\t\treturn nil\n\t}\n\n\treturn fmt.Errorf(\"juicefs mount command exit with error, please check the log for details\")\n}\n\nconst winfspSecurityDescriptor = \"D:P(A;;RPWPLC;;;WD)\"\n\nfunc updateWinFspRegService(winfspServiceName string, cmdLine string, alias string, logPath string, asNetworkDrive bool) error {\n\tregKeyPath := \"SOFTWARE\\\\WOW6432Node\\\\WinFsp\\\\Services\\\\\" + winfspServiceName\n\tk, err := registry.OpenKey(registry.LOCAL_MACHINE, regKeyPath, registry.ALL_ACCESS)\n\tif err != nil {\n\t\tif err == syscall.ERROR_FILE_NOT_FOUND || err == syscall.ERROR_PATH_NOT_FOUND {\n\t\t\tlogger.Info(\"WinFsp service registry key not found, creating it.\")\n\t\t\tk, _, err = registry.CreateKey(registry.LOCAL_MACHINE, regKeyPath, registry.ALL_ACCESS)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"Failed to create registry key: %s\", err)\n\t\t\t}\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"Failed to open registry key: %s\", err)\n\t\t}\n\t}","sourceCodeStart":1175,"sourceCodeEnd":1211,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/winfsp/winfs.go#L1175-L1211","documentation":"After validating the mountpoint, the code calls host.Mount, which returns a boolean success flag rather than an error. If it returns false, the WinFsp host failed to mount (or the service exited with failure), and this generic message is returned directing the user to the logs, since the detailed reason is only recorded there.","triggerScenarios":"Any failure inside host.Mount(conf.Mountpoint, [\"-o\", options]) — bad mount options string, WinFsp driver not installed/running, port/permission problems, or the mounted file system failing during startup — causes exitOk == false.","commonSituations":"WinFsp not installed or wrong version; invalid -o options passed by the caller; metadata engine unreachable at mount time; another service already holds the drive letter.","solutions":["Check the JuiceFS log file (and Windows Event Viewer) for the detailed failure reason logged by the WinFsp host.","Verify WinFsp is installed and its version is compatible; reinstall if the FSD driver is missing.","Review the -o options string passed in conf for syntax or unsupported-option errors.","Confirm the metadata engine is reachable and credentials valid before mounting.","Try mounting to a different drive letter/path to rule out conflicts."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// PowerShell: verify WinFsp is installed before mounting\nif (-not (Get-Service -Name WinFsp.Launcher -ErrorAction SilentlyContinue)) {\n    throw 'WinFsp is not installed'\n}","typeGuard":null,"tryCatchPattern":"if err := mount(); err != nil {\n    if strings.Contains(err.Error(), \"exit with error\") {\n        // inspect log file referenced by --log, plus Windows Event Viewer\n        log.Fatalf(\"mount failed; see %s and Event Viewer for the real cause\", logPath)\n    }\n}","preventionTips":["Install/keep WinFsp up to date before deploying.","Validate the -o options string against supported WinFsp options.","Confirm the metadata engine is reachable before mounting.","Always enable logging so the real cause is captured."],"tags":["windows","winfsp","mount"],"backgroundTag":"mount-command-failed","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"}