juicedata/juicefs · error

apply object action failed in inode:%d key:%v: err:%s

Error message

apply object action failed in inode:%d key:%v: err:%s

What it means

visitEntry applies the per-object action (objectFunc — e.g. tier transition or restore request) to each object key backing an inode. If the object storage operation fails for a specific key, the error is wrapped with the inode and key so the user can locate the offending object. The inner error is the object-storage-level failure (throttling, missing object, storage class mismatch, etc.).

Source

Thrown at cmd/tier.go:326

				}
			}
		} else {
			logger.Errorf("read chunk %d of ino %d failed: %s", index, ino, eno)
		}
	}
	return objs
}
func visitEntry(m meta.Meta, format *meta.Format, ino meta.Ino, attr meta.Attr, objectFunc func(key string) error, metaFunc func(ino meta.Ino) error, checkFunc func(ino meta.Ino, oriTier uint8) bool) error {
	if checkFunc != nil && checkFunc(ino, attr.Tier) {
		return nil
	}
	objs := getObjKeys(m, format, ino, attr.Length)
	if objectFunc != nil {
		for _, key := range objs {
			if key != "" {
				err := objectFunc(key)
				if err != nil {
					return fmt.Errorf("apply object action failed in inode:%d key:%v: err:%s", ino, key, err)
				}
			}
		}
	}
	if metaFunc != nil {
		if err := metaFunc(ino); err != nil {
			return fmt.Errorf("set tier for inode %d failed: %w", ino, err)
		}
	}
	return nil
}

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Locate the failing object via the inode and key in the message, then check the object directly in the bucket.
  2. Read the inner err:%s text for the cloud API error code (e.g. NoSuchKey, SlowDown).
  3. Re-run the command — for throttling errors, reduce concurrency or retry later.
  4. If the object is gone, repair with `juicefs fsck` or remove the stale chunk from metadata.
Defensive patterns

Strategy: retry

Try / catch

if err := objectFunc(key); err != nil {
    if isThrottleErr(err) { // SlowDown / 503
        time.Sleep(backoff)
        return objectFunc(key)
    }
    return fmt.Errorf("key %s: %w", key, err)
}

Prevention

When it happens

Trigger: `juicefs tier` or `juicefs restore` iterating objects of a file where the objectFunc call on one key fails — e.g. the object was deleted in object storage, or the storage class transition is not allowed.

Common situations: Objects removed externally (bucket lifecycle rules) while JuiceFS still references them; cloud API throttling (SlowDown/503) during bulk tiering; wrong storage-class name in the volume config; expired or insufficient cloud credentials.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/daf3ce77f5f169e6. Report an issue: GitHub.