Skip to content

Failure to add metrics of multi KV store on startup with release-1.2 #2807

@kwSeo

Description

@kwSeo

I have tried to run Cortex with release-1.2 branch.
But I found the error when starting Cortex with configurations below.

Configs

...
"ingester":
  "lifecycler":
    "ring":
      "kvstore":
        "store": "multi"
        "consul":
          "host": "consul.host:8500"
        "multi":
          "primary": "consul"
          "secondary": "memberlist"
...

Error logs

panic: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "cortex_kv_request_duration_seconds", help: "Time spent on kv store requests.", constLabels: {kv_name="ingester-ring",type="multi"}, variableLabels: [operation status_code]} has different label names or a different help string

goroutine 1 [running]:
github.com/prometheus/client_golang/prometheus.(*wrappingRegisterer).MustRegister(0xc000817b30, 0xc0003fa980, 0x1, 0x1)
	/my/path/cortex/vendor/github.com/prometheus/client_golang/prometheus/wrap.go:102 +0x194
github.com/prometheus/client_golang/prometheus/promauto.Factory.NewHistogramVec(0x5a04e80, 0xc000817b30, 0x509ffbf, 0x6, 0x0, 0x0, 0x50df2ab, 0x1b, 0x50f141d, 0x20, ...)
	/my/path/cortex/vendor/github.com/prometheus/client_golang/prometheus/promauto/auto.go:362 +0x158
github.com/cortexproject/cortex/pkg/ring/kv.newMetricsClient(0xc000453e30, 0x5, 0x5a487c0, 0xc000b6c5c0, 0x5a04e80, 0xc000817b30, 0x0, 0x0)
	/my/path/cortex/pkg/ring/kv/metrics.go:43 +0x251
github.com/cortexproject/cortex/pkg/ring/kv.createClient(0xc000453e30, 0x5, 0x50ab0f0, 0xb, 0xc0007f6520, 0x1a, 0x0, 0x0, 0x4a817c800, 0x0, ...)
	/my/path/cortex/pkg/ring/kv/client.go:159 +0x2c4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions