Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload fails because of "duplicate metrics collector registration attempted" #35

Closed
tobiasdenzler opened this issue Jan 8, 2020 · 0 comments · Fixed by #36
Closed
Labels
bug Something isn't working

Comments

@tobiasdenzler
Copy link
Owner

Try to relaod the checks using the reload endpoint

curl -k -X POST -u admin:admin https://localhost:4444/reload

will fail with the following error:

2020/01/08 11:02:13 http2: panic serving 127.0.0.1:63024: duplicate metrics collector registration attempted goroutine 37 [running]: net/http.(*http2serverConn).runHandler.func1(0xc00024c008, 0xc000271faf, 0xc00023e000) c:/go/src/net/http/h2_bundle.go:5651 +0x172 panic(0x88b760, 0xc000296aa0) c:/go/src/runtime/panic.go:522 +0x1c3 github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0xc0000b4280, 0xc000286910, 0x1, 0x1) C:/Users/ch00det/go/pkg/mod/github.com/prometheus/client_golang@v1.1.0/prometheus/registry.go:399 +0xb4 github.com/prometheus/client_golang/prometheus.MustRegister(...) C:/Users/ch00det/go/pkg/mod/github.com/prometheus/client_golang@v1.1.0/prometheus/registry.go:176 main.(*application).registerLastrunMetric(0xc0001061b0) D:/dev/openshift/checkbot/cmd/server/runner.go:332 +0x141 main.(*application).startChecks(0xc0001061b0) D:/dev/openshift/checkbot/cmd/server/runner.go:23 +0x47 main.(*application).reload(0xc0001061b0, 0x97f980, 0xc00024c008, 0xc00013c300) D:/dev/openshift/checkbot/cmd/server/handlers.go:61 +0xf7 net/http.HandlerFunc.ServeHTTP(0xc0001e4080, 0x97f980, 0xc00024c008, 0xc00013c300) c:/go/src/net/http/server.go:1995 +0x4b github.com/goji/httpauth.basicAuth.ServeHTTP(0x978900, 0xc0001e4080, 0x8e179a, 0xa, 0x8ddb2a, 0x5, 0x8ddb2a, 0x5, 0x0, 0x0, ...) C:/Users/ch00det/go/pkg/mod/github.com/goji/httpauth@v0.0.0-20160601135302-2da839ab0f4d/basic_auth.go:44 +0xd8 net/http.(*ServeMux).ServeHTTP(0xc000077a00, 0x97f980, 0xc00024c008, 0xc00013c300) c:/go/src/net/http/server.go:2375 +0x1dd main.secureHeaders.func1(0x97f980, 0xc00024c008, 0xc00013c300) D:/dev/openshift/checkbot/cmd/server/middleware.go:14 +0x227 net/http.HandlerFunc.ServeHTTP(0xc0001e21e0, 0x97f980, 0xc00024c008, 0xc00013c300) c:/go/src/net/http/server.go:1995 +0x4b main.(*application).logRequest.func1(0x97f980, 0xc00024c008, 0xc00013c300) D:/dev/openshift/checkbot/cmd/server/middleware.go:22 +0x1f2 net/http.HandlerFunc.ServeHTTP(0xc0001e2200, 0x97f980, 0xc00024c008, 0xc00013c300) c:/go/src/net/http/server.go:1995 +0x4b net/http.serverHandler.ServeHTTP(0xc0000736c0, 0x97f980, 0xc00024c008, 0xc00013c300) c:/go/src/net/http/server.go:2774 +0xaf net/http.initNPNRequest.ServeHTTP(0xc00005f180, 0xc0000736c0, 0x97f980, 0xc00024c008, 0xc00013c300) c:/go/src/net/http/server.go:3323 +0x94 net/http.(*http2serverConn).runHandler(0xc00023e000, 0xc00024c008, 0xc00013c300, 0xc00013a7c0) c:/go/src/net/http/h2_bundle.go:5658 +0x90 created by net/http.(*http2serverConn).processHeaders c:/go/src/net/http/h2_bundle.go:5392 +0x4fb

@tobiasdenzler tobiasdenzler added the bug Something isn't working label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant