-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Started Loki (SHA or version)
- Started Promtail (SHA or version) to tail '...'
- Query:
{} term
···
panic: duplicate metrics collector registration attempted
goroutine 321 [running]:
github.com/prometheus/client_golang/prometheus.(*wrappingRegisterer).MustRegister(0xc001723e00, {0xc0002c0950?, 0x0?, 0x0?})
/src/loki/vendor/github.com/prometheus/client_golang/prometheus/wrap.go:104 +0x12b
github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGaugeFunc({{0x308edb0?, 0xc001723e00?}}, {{0x0, 0x0}, {0x0, 0x0}, {0x2801f1a, 0x1b}, {0x284e841, 0x2f}, ...}, ...)
/src/loki/vendor/github.com/prometheus/client_golang/prometheus/promauto/auto.go:319 +0x116
github.com/gocql/gocql.newPolicyConnPool({0x3078c40, 0xc000591e00}, {0x308edb0, 0xc001723e00}, 0xc0007ba008)
/src/loki/vendor/github.com/gocql/gocql/connectionpool.go:132 +0x226
github.com/gocql/gocql.PoolConfig.buildPool(...)
/src/loki/vendor/github.com/gocql/gocql/cluster.go:28
github.com/gocql/gocql.NewSession({{0xc000d0fbb0, 0x1, 0x1}, {0x27bf6fc, 0x5}, 0x0, 0x77359400, 0x12a05f200, 0x2352, {0xc00097e8e0, ...}, ...})
/src/loki/vendor/github.com/gocql/gocql/session.go:136 +0x625
github.com/gocql/gocql.(*ClusterConfig).CreateSession(...)
/src/loki/vendor/github.com/gocql/gocql/cluster.go:207
github.com/grafana/loki/pkg/storage/chunk/client/cassandra.(*tableClient).reconnectTableSession(0xc0002f9ce0)
/src/loki/pkg/storage/chunk/client/cassandra/table_client.go:39 +0x125
github.com/grafana/loki/pkg/storage/chunk/client/cassandra.(*tableClient).CreateTable(0xc0002f9ce0, {0x309a598, 0xc000d821b0}, {{0xc000c109b0, 0x10}, 0x0, 0x12c, 0x1, 0x0, {0x0, ...}, ...})
/src/loki/pkg/storage/chunk/client/cassandra/table_client.go:78 +0xb7
github.com/grafana/loki/pkg/storage/stores/series/index.(*TableManager).createTables(0xc00095e708, {0x309a598, 0xc000d821b0}, {0xc002128000?, 0xc000d821b0?, 0xc001b00000?})
/src/loki/pkg/storage/stores/series/index/table_manager.go:480 +0x288
github.com/grafana/loki/pkg/storage/stores/series/index.(*TableManager).SyncTables(0xc00095e708, {0x309a598, 0xc000d821b0})
/src/loki/pkg/storage/stores/series/index/table_manager.go:339 +0x245
github.com/grafana/loki/pkg/storage/stores/series/index.(*TableManager).loop.func1({0x309a598?, 0xc000d821b0?})
/src/loki/pkg/storage/stores/series/index/table_manager.go:221 +0x2a
github.com/grafana/dskit/instrument.CollectedRequest({0x309a528, 0x464f0a0}, {0x27f1db7, 0x17}, {0x308f680, 0xc000abc008}, 0x10?, 0xc000cabec0)
/src/loki/vendor/github.com/grafana/dskit/instrument/instrument.go:172 +0x25d
github.com/grafana/loki/pkg/storage/stores/series/index.(*TableManager).loop(0xc00095e708, {0x309a5d0, 0xc000068c80})
/src/loki/pkg/storage/stores/series/index/table_manager.go:220 +0x145
github.com/grafana/dskit/services.(*BasicService).main(0xc0004f9360)
/src/loki/vendor/github.com/grafana/dskit/services/basic_service.go:190 +0x1cf
created by github.com/grafana/dskit/services.(*BasicService).StartAsync.func1 in goroutine 280
/src/loki/vendor/github.com/grafana/dskit/services/basic_service.go:119 +0x105
···
Expected behavior
A clear and concise description of what you expected to happen.
Environment:
- Infrastructure: [e.g., Kubernetes, bare-metal, laptop] kubernetes
- Deployment tool: [e.g., helm, jsonnet] helm
Screenshots, Promtail config, or terminal output
If applicable, add any output to help explain your problem.
distributed deployment,table-manger log error