juicedata/juicefs · error

list failed: %s

Error message

list failed: %s

What it means

This is the wrapper the objbench "list objects" case returns when `listAll(ctx, blob, "", "", 2)` itself returns a non-nil error for a filesystem-type backend. The real cause is the wrapped error from the object storage LIST call, not the message text.

Source

Thrown at cmd/objbench.go:912

				}
				if objs[0].Key() != "" {
					return fmt.Errorf("first key should be empty string, but got %s", objs[0].Key())
				}
				if objs[0].Size() != 0 {
					return fmt.Errorf("first object size should be 0, but got %d", objs[0].Size())
				}
				if objs[1].Key() != key {
					return fmt.Errorf("first key should be test, but got %s", objs[1].Key())
				}
				if objs[1].Size() != 5 {
					return fmt.Errorf("size of first key shold be 5, but got %v", objs[1].Size())
				}
				now := time.Now()
				if objs[1].Mtime().Before(now.Add(-30*time.Second)) || objs[1].Mtime().After(now.Add(time.Second*30)) {
					return fmt.Errorf("mtime of key should be within 30 seconds, but got %s", objs[1].Mtime().Sub(now))
				}
			} else {
				return fmt.Errorf("list failed: %s", err)
			}

			objs, err = listAll(ctx, blob, "", "test2", 1)
			if err != nil {
				return fmt.Errorf("list failed: %s", err)
			} else if len(objs) != 0 {
				return fmt.Errorf("list should not return anything, but got %d", len(objs))
			}
		} else {
			objs, err2 := listAll(ctx, blob, "", "", 1)
			if err2 == nil {
				if len(objs) != 1 {
					return fmt.Errorf("list should return 1 keys, but got %d", len(objs))
				}
				if objs[0].Key() != key {
					return fmt.Errorf("first key should be test, but got %s", objs[0].Key())
				}
				if objs[0].Size() != 5 {

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Read the wrapped `%s` text; it names the underlying LIST failure (auth, DNS, 404, timeout) and fix that first.
  2. Verify the object storage URL and credentials with `juicefs rnd` or a direct CLI of the storage (e.g. aws s3 ls).
  3. Check network connectivity and endpoint reachability from the machine running objbench.
  4. Confirm the backend implementation's List is not returning an unconditional error in pkg/object.
Defensive patterns

Strategy: try-catch

Validate before calling

// preflight: list the bucket before benchmarking
if _, err := listAll(ctx, blob, "", "", 1); err != nil {
    return fmt.Errorf("storage not usable: %w", err)
}

Try / catch

objs, err := listAll(ctx, blob, "", "", 2)
if err != nil {
    return fmt.Errorf("list failed: %s", err) // inspect wrapped cause
}

Prevention

When it happens

Trigger: `juicefs objbench` on a filesystem/blob URL where the LIST operation on prefix "" fails: network error, auth failure, missing bucket, or a misconfigured object storage URL.

Common situations: Wrong credentials or endpoint in the object storage URL; bucket deleted or not accessible; network partition; backend does not support List with maxKeys=2.

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/a0c06adc3560cbaa. Report an issue: GitHub.