juicedata/juicefs · error
unexpected dragonfly object storage name: %s
Error message
unexpected dragonfly object storage name: %s
What it means
During construction, newDragonfly fetches /metadata from the Dragonfly daemon to learn which object storage backs it. The metadata Name must be one of "s3", "oss", or "obs"; anything else (including an empty name if the daemon returns an unexpected payload) fails construction with this error. The name determines which filter is applied when talking to the backing store.
Source
Thrown at pkg/object/dragonfly.go:573
return nil, fmt.Errorf("unexpected dragonfly max replicas: %s", value)
}
}
metadata, err := getObjectStorageMetadata(endpoint)
if err != nil {
return nil, err
}
var filter string
switch metadata.Name {
case "s3":
filter = FilterS3
case "oss":
filter = FilterOSS
case "obs":
filter = FilterOBS
default:
return nil, fmt.Errorf("unexpected dragonfly object storage name: %s", metadata.Name)
}
return &dragonfly{
endpoint: endpoint,
filter: filter,
mode: mode,
maxReplicas: maxReplicas,
bucket: bucket,
client: httpClient,
}, nil
}
// getObjectStorageMetadata returns the object storage metadata.
func getObjectStorageMetadata(endpoint string) (*ObjectStorageMetadata, error) {
u, err := url.Parse(endpoint)
if err != nil {
return nil, nil
}View on GitHub (pinned to c9a67b23e8)
Solutions
- Verify the daemon's backend: curl http://<endpoint>/metadata and confirm "name" is s3, oss, or obs.
- Upgrade/downgrade Dragonfly to a version that reports a supported backing store, or reconfigure the dfdaemon to use S3/OSS/OBS-compatible storage.
- Ensure the URL points at the actual dfdaemon (default port 8000) and not another service; check for typos in host/port.
- If you need a different backend, use the corresponding JuiceFS object storage scheme directly (s3://, oss://, etc.) instead of dragonfly://.
Example fix
// before: pointing at an unsupported backend
endpoint := "dragonfly://proxy.example.com:8000/mybucket"
// metadata returns {"name":"azureblob"} -> error
// after: use the backend's native scheme
endpoint := "azureblob://container@example.blob.core.windows.net" Defensive patterns
Strategy: validation
Validate before calling
resp, err := http.Get(endpoint + "/metadata")
if err != nil {
return err
}
var md struct{ Name string `json:"name"` }
json.NewDecoder(resp.Body).Decode(&md)
if md.Name != "s3" && md.Name != "oss" && md.Name != "obs" {
return fmt.Errorf("unsupported backing store %q; use s3/oss/obs", md.Name)
} Prevention
- Probe GET /metadata during deployment and assert the reported name is s3/oss/obs.
- Pin the Dragonfly version so the metadata endpoint stays compatible.
- Point the URL at the real dfdaemon port (8000), not another Dragonfly component.
- For non-S3/OSS/OBS backends, use the backend's native object storage scheme instead of dragonfly://.
When it happens
Trigger: Pointing the dragonfly:// URL at a daemon whose GET /metadata returns a Name outside {s3, oss, obs} — e.g. a different or newer Dragonfly build reporting another backend, a non-Dragonfly HTTP service that happens to answer on that port, or a daemon misconfigured to emulate an unsupported storage.
Common situations: Using an incompatible Dragonfly version whose metadata endpoint reports a different storage name; proxying to a backend like Azure Blob/GCS that this client doesn't recognize; hitting the wrong port where another service responds with different JSON; older dfdaemon returning an empty name field.
Related errors
- mtime of key should be within 30 seconds, but got %s
- incompatible metadata version: %d; please upgrade the client
- statistic: %v
- incompatible hadoop version
- invalid dumped meta: missing 'Counters'
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/5647851a99bed488.
Report an issue: GitHub.