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

  1. Verify the daemon's backend: curl http://<endpoint>/metadata and confirm "name" is s3, oss, or obs.
  2. Upgrade/downgrade Dragonfly to a version that reports a supported backing store, or reconfigure the dfdaemon to use S3/OSS/OBS-compatible storage.
  3. Ensure the URL points at the actual dfdaemon (default port 8000) and not another service; check for typos in host/port.
  4. 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

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


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