jaegertracing/jaeger · error

unsupported version %d: set 0 to auto-detect, or use 7/8/9 (

Error message

unsupported version %d: set 0 to auto-detect, or use 7/8/9 (Elasticsearch) or 101/102/103 (OpenSearch 1/2/3)

What it means

Configuration.Validate rejects a non-zero Version that is not one of the supported Elasticsearch (7/8/9) or OpenSearch (101/102/103) backend versions. Version 0 means auto-detect and is always allowed; any other integer would silently become Unknown, so it is rejected early at config-validation time.

Source

Thrown at internal/storage/elasticsearch/config/config.go:425

	// from params
	if c.Tags.Include != "" {
		tags = append(tags, strings.Split(c.Tags.Include, ",")...)
	}

	return tags, nil
}

func (c *Configuration) Validate() error {
	_, err := govalidator.ValidateStruct(c)
	if err != nil {
		return err
	}

	// A non-zero Version is an explicit backend override; reject unsupported
	// values so they don't silently become an Unknown version. 0 means auto-detect.
	if c.Version != 0 && !es.IsSupportedVersion(c.Version) {
		return fmt.Errorf("unsupported version %d: set 0 to auto-detect, or use 7/8/9 (Elasticsearch) or 101/102/103 (OpenSearch 1/2/3)", c.Version)
	}

	// Ensure at most one auth method is configured (they all set the Authorization header).
	var authCount int
	if c.Authentication.BasicAuthentication.HasValue() {
		authCount++
	}
	if c.Authentication.BearerTokenAuth.HasValue() {
		authCount++
	}
	if c.Authentication.APIKeyAuth.HasValue() {
		authCount++
	}
	if authCount > 1 {
		return errors.New("at most one authentication method (basic, bearer_token, api_key) may be configured; all three use the Authorization header")
	}

	// Reject options orphaned when the olivere client stack was retired (#8982):

View on GitHub (pinned to 806f444784)

Solutions

  1. Set Version to 0 (auto-detect) or one of 7, 8, 9 (Elasticsearch) / 101, 102, 103 (OpenSearch 1/2/3).
  2. For OpenSearch, use the special codes (101/102/103), not the plain major number (2, not 2.11).
  3. If running an unsupported ES major (6 or 10+), upgrade the cluster or downgrade Jaeger to a compatible release.
  4. Check the env var/flag feeding Version for stale or wrong values (e.g. left over from a previous deployment).

Example fix

// before
cfg := esconfig.Configuration{Version: 6}
// after
cfg := esconfig.Configuration{Version: 7} // or 0 for auto-detect; OpenSearch 2.x -> 102
Defensive patterns

Strategy: validation

Validate before calling

func validExplicitVersion(v int) bool {
    switch v {
    case 0, 7, 8, 9, 101, 102, 103:
        return true
    }
    return false
}
// run before constructing/validating esconfig.Configuration

Try / catch

if err := cfg.Validate(); err != nil {
    if strings.Contains(err.Error(), "unsupported version") {
        log.Printf("fix Version setting: use 0 (auto), 7/8/9 for Elasticsearch, or 101/102/103 for OpenSearch")
    }
    return err
}

Prevention

When it happens

Trigger: Setting SPAN_STORAGE_TYPE=elasticsearch with an explicit version flag/env like ES_VERSION=6, 10, 200, or a non-numeric-ish value coerced to an unexpected integer; programmatically constructing config.Configuration{Version: N} with an unsupported N.

Common situations: Migrating from an older Jaeger that supported ES 6.x; users setting Version equal to their full OpenSearch version (e.g. 2.11 -> 2) instead of the OpenSearch code 102; fat-fingering 8 as 80.

Related errors


AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01). Data as JSON: /api/errors/108fc07d66186fb6. Report an issue: GitHub.