juicedata/juicefs · warning
The bucket "%s" doesn't look like a file path.
Error message
The bucket "%s" doesn't look like a file path.
What it means
objbench validates that when --storage=file is selected, the bucket argument is actually a filesystem path. If the endpoint contains '://', it is almost certainly an object-storage URL (e.g. s3://bucket), meaning the user forgot to pass --storage <type> and the default 'file' was used. objbench prints this warning and asks for confirmation before proceeding or aborting.
Source
Thrown at cmd/objbench.go:161
smallBSize := int(utils.ParseBytes(ctx, "small-object-size", 'K'))
if bSize == 0 || fsize == 0 || smallBSize == 0 {
logger.Fatalf("block-size, big-object-size and small-object-size should not be zero")
}
ak, sk, token := ctx.String("access-key"), ctx.String("secret-key"), ctx.String("session-token")
if ak == "" {
ak = os.Getenv("ACCESS_KEY")
}
if sk == "" {
sk = os.Getenv("SECRET_KEY")
}
if token == "" {
token = os.Getenv("SESSION_TOKEN")
}
endpoint := ctx.Args().First()
storageType := strings.ToLower(ctx.String("storage"))
if storageType == "file" {
if strings.Contains(endpoint, "://") {
warn("The bucket \"%s\" doesn't look like a file path.", endpoint)
warn("Did you forget to specify the `--storage <type>`?")
if !userConfirmed() {
return errors.New("Aborted")
}
}
var err error
if endpoint, err = filepath.Abs(endpoint); err != nil {
logger.Fatalf("invalid path %q: %s", endpoint, err)
}
}
var blobOrigin object.ObjectStorage
var err error
shards := ctx.Int("shards")
if shards > 1 {
blobOrigin, err = object.NewSharded(storageType, endpoint, ak, sk, token, shards)
} else {
blobOrigin, err = object.CreateStorage(storageType, endpoint, ak, sk, token)
}View on GitHub (pinned to c9a67b23e8)
Solutions
- Add the correct `--storage <type>` flag (e.g. --storage s3) matching the endpoint scheme
- If you really intend to bench a local path, pass the filesystem path without a scheme (e.g. /mnt/data or ./dir)
- Answer the interactive confirmation with 'n'/abort and re-run with corrected arguments
Example fix
// before juicefs objbench s3://mybucket/prefix // after juicefs objbench --storage s3 s3://mybucket/prefix
Defensive patterns
Strategy: validation
Validate before calling
if [[ "$BUCKET" == *"://"* && -z "$STORAGE_FLAG" ]]; then echo "Add --storage <type> for URL buckets"; exit 1; fi
Prevention
- Always pass --storage explicitly when bucketing to object stores
- Lint scripts for objbench calls whose bucket contains '://' without --storage
When it happens
Trigger: Running `juicefs objbench s3://mybucket ...` (or any URL with a scheme) without `--storage <type>`, so storageType defaults to "file" while the endpoint is clearly an object-store URL.
Common situations: Copy-pasting a command meant for an S3/OSS backend but omitting the --storage flag; scripting objbench with a variable holding a URL while assuming the storage type is auto-detected.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- object key cannot be empty
- tier should be between 0 and 3
- Invalid trash days: %d
- negative duration for %s: %s
- negative value for %s: %d
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/90f36c161b30570d.
Report an issue: GitHub.