"Panic" when ignoring SSL Errors with Heartbeat

We wish to monitor a HTTPS endpoint with Heartbeat but without having a valid signed SSL certificate. Thus we have set ssl.verification_mode: none but the system is marked as "down".

Configuration:

heartbeat.monitors:
- type: http
  # List or urls to query
  urls: ["https://server00-test.mydomain.com/healthCheck", "https://server01-test.mydomain.com/healthCheck"]
  # Configure task schedule
  schedule: '@every 60s'
  ssl.verification_mode: none

Error/Stacktrace:

runtime/debug.Stack(0x1106579, 0x3a, 0xc0423288d8)
        /usr/local/go/src/runtime/debug/stack.go:24 +0xae
github.com/elastic/beats/heartbeat/scheduler.(*Scheduler).runTask.func1.1(0xc0422d45f0, 0xc04243cf00)
        /go/src/github.com/elastic/beats/heartbeat/scheduler/scheduler.go:357 +0xfe
panic(0xf53200, 0x1824bd0)
        /usr/local/go/src/runtime/panic.go:502 +0x237
github.com/elastic/beats/heartbeat/monitors/active/dialchain.TLSLayer.func1.1(0x11a8c40, 0xc0423c4000, 0x3, 0xc0421d6090, 0x23, 0x11a8c40)
        /go/src/github.com/elastic/beats/heartbeat/monitors/active/dialchain/tls.go:83 +0x462
github.com/elastic/beats/heartbeat/monitors/active/dialchain.afterDial.func1(0x10c8d06, 0x3, 0xc0421d6090, 0x23, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/elastic/beats/heartbeat/monitors/active/dialchain/util.go:89 +0xc1
github.com/elastic/beats/libbeat/outputs/transport.DialerFunc.Dial(0xc0421251c0, 0x10c8d06, 0x3, 0xc0421d6090, 0x23, 0x410c63, 0xc04209ac30, 0x50, 0x48)
        /go/src/github.com/elastic/beats/libbeat/outputs/transport/transport.go:40 +0x55
github.com/elastic/beats/heartbeat/monitors/active/http.(*SimpleTransport).RoundTrip(0xc0421fd5f0, 0xc04215ea00, 0x0, 0x0, 0x0)
        /go/src/github.com/elastic/beats/heartbeat/monitors/active/http/simple_transp.go:84 +0x105
net/http.send(0xc04215e900, 0x11934e0, 0xc0421fd5f0, 0xbf0a7d879f47b8f4, 0x3c68b434b9, 0x183ae00, 0xc042004260, 0xbf0a7d879f47b8f4, 0xc042507068, 0x1)
        /usr/local/go/src/net/http/client.go:252 +0x18c
net/http.(*Client).send(0xc0421fd620, 0xc04215e900, 0xbf0a7d879f47b8f4, 0x3c68b434b9, 0x183ae00, 0xc042004260, 0x0, 0x1, 0x3)
        /usr/local/go/src/net/http/client.go:176 +0x101
net/http.(*Client).Do(0xc0421fd620, 0xc04215e900, 0x183ae00, 0xc04215e900, 0x57ffb2)
        /usr/local/go/src/net/http/client.go:615 +0x294
github.com/elastic/beats/heartbeat/monitors/active/http.execRequest(0xc0421fd620, 0xc04215e900, 0x1118fe0, 0xbf0a7d839f47b8f4, 0x38af0794b9, 0x183ae00, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/elastic/beats/heartbeat/monitors/active/http/task.go:252 +0xad
github.com/elastic/beats/heartbeat/monitors/active/http.execPing(0xc0421fd620, 0xc0423a2500, 0x0, 0x0, 0x0, 0x3b9aca000, 0x1118fe0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/elastic/beats/heartbeat/monitors/active/http/task.go:226 +0x143
github.com/elastic/beats/heartbeat/monitors/active/http.createPingFactory.func1(0xc0421fd4a0, 0x3, 0xc0425076f0, 0xc042507758)
        /go/src/github.com/elastic/beats/heartbeat/monitors/active/http/task.go:171 +0x449
github.com/elastic/beats/heartbeat/monitors.MakePingIPFactory.func1.1(0x120, 0xc042507778, 0x410c63)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:194 +0x38
github.com/elastic/beats/heartbeat/monitors.MakeSimpleCont.func1(0x10, 0xf88ec0, 0xc0425077a8, 0x410c63, 0xc042124d40, 0x20)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:184 +0x2d
github.com/elastic/beats/heartbeat/monitors.funcTask.Run(0xc042496690, 0x18, 0x20, 0x20, 0xc042124d40, 0x0, 0xc042200800)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:440 +0x2e
github.com/elastic/beats/heartbeat/monitors.WithFields.func1(0xc042507701, 0xc042124d40, 0xc0425077f8, 0x7d0168, 0xfbc940, 0xc042124d40)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:398 +0x51
github.com/elastic/beats/heartbeat/monitors.funcTask.Run(0xc042124d40, 0x1195be0, 0xc042496690, 0x1195be0, 0xc042124d40, 0x183ae00, 0x365d29c)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:440 +0x2e
github.com/elastic/beats/heartbeat/monitors.makeByHostAnyIPJob.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:323 +0x940
github.com/elastic/beats/heartbeat/monitors.annotated.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc042494200, 0x0, 0x0, ...)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:140 +0xce
github.com/elastic/beats/heartbeat/monitors.MakeJob.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:127 +0xef
github.com/elastic/beats/heartbeat/monitors.(*funcJob).Run(0xc0420e8860, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/elastic/beats/heartbeat/monitors/util.go:438 +0x89
github.com/elastic/beats/heartbeat/monitors.(Job).Run-fm(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/elastic/beats/heartbeat/monitors/task.go:120 +0x8d
github.com/elastic/beats/heartbeat/monitors.(*task).prepareSchedulerJob.func1(0x10, 0x1119030, 0xc0422d45f0)
        /go/src/github.com/elastic/beats/heartbeat/monitors/task.go:85 +0x84
github.com/elastic/beats/heartbeat/scheduler.(*Scheduler).runTask.func1(0xc0422d45f0, 0xc04243cf00, 0xc0422d45f0, 0xc0420e8ec0)
        /go/src/github.com/elastic/beats/heartbeat/scheduler/scheduler.go:362 +0x62
created by github.com/elastic/beats/heartbeat/scheduler.(*Scheduler).runTask
        /go/src/github.com/elastic/beats/heartbeat/scheduler/scheduler.go:352 +0x63

2019-01-24T09:59:58.566+0100    ERROR   scheduler/scheduler.go:355      Panic in job 'http@https://server00-test.mydomain.com/healthCheck'. Recovering, but please report this: runtime error: invalid memory address or nil pointer dereference.
2019-01-24T09:59:58.566+0100    ERROR   scheduler/scheduler.go:357      Stacktrace: goroutine 186 [running]:

Apologies, this is a known bug and should be fixed in our upcoming 6.6 release.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.