{"record":{"id":"ae02893a297ae1ef","repo":"juicedata/juicefs","slug":"dest-get-s","errorCode":null,"errorMessage":"dest get: %s","messagePattern":"dest get: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/sync/sync.go","lineNumber":484,"sourceCode":"\t}\n\tlogger.Debugf(\"Copied permissions (%s:%s:%s) for %s in %s\", fi.Owner(), fi.Group(), fi.Mode(), key, time.Since(start))\n}\n\nfunc calPartChksum(objStor object.ObjectStorage, key string, abort chan struct{}, offset, length int64) (uint32, error) {\n\tif limiter != nil {\n\t\tlimiter.Wait(length)\n\t}\n\tselect {\n\tcase <-abort:\n\t\treturn 0, fmt.Errorf(\"aborted\")\n\tcase concurrent <- 1:\n\t\tdefer func() {\n\t\t\t<-concurrent\n\t\t}()\n\t}\n\tin, err := objStor.Get(ctx, key, offset, length)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"dest get: %s\", err)\n\t}\n\tdefer in.Close()\n\n\tbuf := bufPool.Get().(*[]byte)\n\tdefer bufPool.Put(buf)\n\tvar chksum uint32\n\tfor left := int(length); left > 0; left -= bufferSize {\n\t\tbs := bufferSize\n\t\tif left < bufferSize {\n\t\t\tbs = left\n\t\t}\n\t\t*buf = (*buf)[:bs]\n\t\tif _, err = io.ReadFull(in, *buf); err != nil {\n\t\t\treturn 0, fmt.Errorf(\"dest read: %s\", err)\n\t\t}\n\t\tchksum = crc32.Update(chksum, crcTable, *buf)\n\t}\n\treturn chksum, nil","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/sync/sync.go#L466-L502","documentation":"calPartChksum fetches a byte range of an object from the (destination-side) object storage to compute its CRC32. If objStor.Get fails it wraps the backend error as 'dest get: <err>'. The root cause is in the wrapped object-storage error (auth, missing key, network, permissions).","triggerScenarios":"objStor.Get(ctx, key, offset, length) returns an error: the object/key doesn't exist, credentials are wrong/expired, network timeout to the storage endpoint, or the requested range is invalid.","commonSituations":"Destination object deleted between listing and checksum; wrong credentials or region configured for the destination; endpoint unreachable (VPN/firewall); presigned-token expiry during long syncs.","solutions":["Read the wrapped error after 'dest get:' for the concrete backend cause (403/404/timeout etc.)","Verify destination storage credentials, region, and endpoint in the sync arguments","Check the object still exists in the destination (it may have been deleted concurrently by another process or lifecycle rule)","Test connectivity: curl/GET the same object URL from the sync host; check firewall/proxy settings"],"exampleFix":"// before\njuicefs sync s3://src s3://dst --storage-class WRONG\n// -> dest get: InvalidStorageClass ...\n// after\njuicefs sync s3://src s3://dst  # valid/omitted storage options\n// or fix AWS credentials:\nexport AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=...","handlingStrategy":"retry","validationCode":"// probe the destination object before checksumming\nif _, err := dstStor.Head(ctx, key); err != nil {\n\treturn fmt.Errorf(\"destination object %s unreachable before sync: %w\", key, err)\n}","typeGuard":null,"tryCatchPattern":"chksum, err := calPartChksum(stor, key, abort, off, length)\nif err != nil {\n\tif strings.HasPrefix(err.Error(), \"dest get:\") {\n\t\treturn retryWithBackoff(3, func() error {\n\t\t\t_, err := calPartChksum(stor, key, abort, off, length)\n\t\t\treturn err\n\t\t})\n\t}\n\treturn err\n}","preventionTips":["Validate destination credentials/endpoint with a HEAD/GET before large syncs","Guard against concurrent deletions/lifecycle rules on the destination bucket","Use same-region endpoints to reduce transient network failures"],"tags":["sync","object-storage","checksum","network"],"backgroundTag":"object-get-failed","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}