juicedata/juicefs · error

invalid redisVersion: %v

Error message

invalid redisVersion: %v

What it means

parseRedisVersion cannot parse the reported Redis server version string: it must contain at least two dot-separated components (major.minor). JuiceFS parses the version to enforce minimum supported Redis versions; an unparseable string triggers this error.

Source

Thrown at pkg/meta/info.go:35

package meta

import (
	"fmt"
	"strconv"
	"strings"
)

type redisVersion struct {
	ver          string
	major, minor int
}

var oldestSupportedVer = redisVersion{"4.0.x", 4, 0}

func parseRedisVersion(v string) (ver redisVersion, err error) {
	parts := strings.Split(v, ".")
	if len(parts) < 2 {
		err = fmt.Errorf("invalid redisVersion: %v", v)
		return
	}
	ver.ver = v
	ver.major, err = strconv.Atoi(parts[0])
	if err != nil {
		return
	}
	ver.minor, err = strconv.Atoi(parts[1])
	return
}

func (ver redisVersion) olderThan(v2 redisVersion) bool {
	if ver.major < v2.major {
		return true
	}
	if ver.major > v2.major {
		return false
	}

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Connect directly to a real Redis instance that reports a standard x.y.z version instead of through a proxy.
  2. Check `redis-cli INFO server | grep redis_version` and confirm it returns something like `7.2.4`; fix server/proxy config if not.
  3. Upgrade the Redis server if it is genuinely old (below 4.0) or misreporting its version.
Defensive patterns

Strategy: validation

Validate before calling

redis-cli -u "$META_URL" INFO server | grep redis_version  # must be like 7.2.4

Prevention

When it happens

Trigger: checkRedisInfo (via the INFO command) receives a version string like "7" or "devel-xyz" or an empty/garbage value that has fewer than 2 dot-separated parts.

Common situations: Pointing JuiceFS at a Redis-compatible server (e.g. a proxy, KeyDB fork, or mock) that reports a non-standard version; a proxy that hides or rewrites the `redis_version` INFO field; an unsupported/patched Redis build.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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