Closed muffix closed 4 years ago
Please describe the behaviour you are expecting
tsdbrelay starts up successfully
tsdbrelay
What is the current behaviour?
tsdbrelay panics on startup (see logs below)
Please provide detailed steps for reproducing the issue.
tsdbrelay -b localhost:8070 -t localhost:4242 -l 0.0.0.0:5252 -redis localhost:9565
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Standalone binary with dependencies (Bosun, OpenTSDB, Ledis) running in Docker containers on the same host.
HostManager
I'm going to raise a PR for this.
Please include any relevant log snippets or files here.
Startup log:
2020/05/11 09:42:15 info: main.go:97: tsdbrelay version 0.8.0-dev last modified 2020-05-11T09:37:48Z 2020/05/11 09:42:15 info: main.go:98: listen on 0.0.0.0:5252 2020/05/11 09:42:15 info: main.go:99: relay to bosun at localhost:8070 2020/05/11 09:42:15 info: main.go:100: relay to tsdb at localhost:4242 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x6cac04] goroutine 1 [running]: bosun.org/collect.check(0x78dc08, 0xf, 0xc0000e9ca8, 0x4385fe, 0xc0000e9c58) /bosun/collect/collect.go:403 +0x264 bosun.org/collect.Set(0x78dc08, 0xf, 0xc0000871a0, 0x7a4c30, 0x1, 0xc00009c6e0) /bosun/collect/collect.go:316 +0x43 bosun.org/collect.InitChan(0xc0000e9ed0, 0x78c0eb, 0x9, 0xc00007a120, 0xc0000b2370, 0xc0000e2280) /bosun/collect/collect.go:123 +0x21d bosun.org/collect.Init(...) /bosun/collect/collect.go:192 main.main() /bosun/cmd/tsdbrelay/main.go:167 +0xa64 2020-05-11 09:42:15,594 INFO exited: tsdbrelay (exit status 2; not expected)
Expected behaviour
tsdbrelay
starts up successfullyCurrent behaviour
tsdbrelay
panics on startup (see logs below)Steps to reproduce
tsdbrelay -b localhost:8070 -t localhost:4242 -l 0.0.0.0:5252 -redis localhost:9565
Context
Standalone binary with dependencies (Bosun, OpenTSDB, Ledis) running in Docker containers on the same host.
2439 introduced a configurable hostname option which uses a
HostManager
that requires initialisation. Thetsdbrelay
command doesn't do that.I'm going to raise a PR for this.
Logs
Startup log: