xsteadfastx/jitsiexporter

exporter crashes when jitsi-videobridge is not running

abeluck opened this issue · 3 comments

The readme states "A failed scrape metric is exported as jitsi_fetch_errors", I tried to test this by stopping the JVB service, this however caused the exporter process to crash:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x7c5e3b]

goroutine 7 [running]:
github.com/xsteadfastx/jitsiexporter.colibri.Now(0x7ffeee2118af, 0x23, 0x0, 0x0, 0x0)
        /drone/src/jitsiexporter.go:138 +0x22b
github.com/xsteadfastx/jitsiexporter.(*Metrics).Update(0xc00007e370, 0x0, 0x0)
        /drone/src/jitsiexporter.go:36 +0xb0
github.com/xsteadfastx/jitsiexporter.collect(0xc00007e370)
        /drone/src/jitsiexporter.go:156 +0x43
created by github.com/xsteadfastx/jitsiexporter.Serve
        /drone/src/jitsiexporter.go:184 +0x276

It crashes with the same error whenever I try to start the exporter process and JVB isn't running.

Reproduce

  1. ensure jitsi-videobridge2 is running
  2. ensure the exporter is running and working
  3. systemctl stop jitsi-videobridge2 (or docker stop I guess if you use that)

Results: the exporter process crashes

i wonder where its coming from. i can start the exporter with any url (no videobridge at all running behind that url) and the exporter doesnt crash. it runs into a parsing error or into a timeout. i try to get my head around it.

ok i can reproduce... its really only when videobridge was running on start and stops.

version v0.2.6 should fix it :)

❤️