Panic in job: runtime error: invalid memory address or nil pointer deference

I'm running into an interesting panic error when I'm trying to set up a http heartbeat to see if a URL is running. The URL is a bamboo front end and all I'm trying to do is make sure the web interface is up.

OS: CentOS 7.5
Heartbeat version: 6.5.4
Elasticsearch version: 6.4.2

Config snippet:

heartbeat.monitors:
- type: http
  schedule: '@every15s'
  urls: ["https://<URL>:8443"]
  check.request.method: HEAD
  check.response.status: 200
  ssl.verification_mode: none

Error:

019-01-08T15:09:17.867-0500	WARN	tlscommon/tls_config.go:79	SSL/TLS verifications disabled.
2019-01-08T15:09:17.901-0500	ERROR	scheduler/scheduler.go:355	Panic in job 'http@https://<URL_being_monitored>:8443'. Recovering, but please report this: runtime error: invalid memory address or nil pointer dereference.
2019-01-08T15:09:17.902-0500	ERROR	scheduler/scheduler.go:357	Stacktrace: goroutine 169 [running]:
runtime/debug.Stack(0x16adc5d, 0x3a, 0xc42024a8b8)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
github.com/elastic/beats/heartbeat/scheduler.(*Scheduler).runTask.func1.1(0xc4200b0140, 0xc4202f6880)
	/go/src/github.com/elastic/beats/heartbeat/scheduler/scheduler.go:357 +0xf7
panic(0x14fa000, 0x1f68a00)
	/usr/local/go/src/runtime/panic.go:502 +0x229
github.com/elastic/beats/heartbeat/monitors/active/dialchain.TLSLayer.func1.1(0x1757d80, 0xc4204e4000, 0x3, 0xc420488008, 0x20, 0x1757d80)
	/go/src/github.com/elastic/beats/heartbeat/monitors/active/dialchain/tls.go:83 +0x45b
github.com/elastic/beats/heartbeat/monitors/active/dialchain.afterDial.func1(0x1671782, 0x3, 0xc420488008, 0x20, 0x8, 0xc42017ca80, 0xc4205e2d70, 0xc4205e2cf8)
	/go/src/github.com/elastic/beats/heartbeat/monitors/active/dialchain/util.go:89 +0xba
github.com/elastic/beats/libbeat/outputs/transport.DialerFunc.Dial(0xc42053d4c0, 0x1671782, 0x3, 0xc420488008, 0x20, 0x9c0119, 0xc4203f8d20, 0x50, 0x48)
	/go/src/github.com/elastic/beats/libbeat/outputs/transport/transport.go:40 +0x4e
github.com/elastic/beats/heartbeat/monitors/active/http.(*SimpleTransport).RoundTrip(0xc4203a3740, 0xc4202d8300, 0x0, 0x0, 0x0)
	/go/src/github.com/elastic/beats/heartbeat/monitors/active/http/simple_transp.go:84 +0xfe
net/http.send(0xc4202d8200, 0x173c260, 0xc4203a3740, 0xbf055ebf73bbe47e, 0x2b24fbb65d, 0x1fc6920, 0xc42000e248, 0xbf055ebf73bbe47e, 0xc4205e3068, 0x1)
	/usr/local/go/src/net/http/client.go:252 +0x185
net/http.(*Client).send(0xc4203a3770, 0xc4202d8200, 0xbf055ebf73bbe47e, 0x2b24fbb65d, 0x1fc6920, 0xc42000e248, 0x0, 0x1, 0x3)
	/usr/local/go/src/net/http/client.go:176 +0xfa
net/http.(*Client).Do(0xc4203a3770, 0xc4202d8200, 0x1fc6920, 0xc4202d8200, 0xb15bfb)
	/usr/local/go/src/net/http/client.go:615 +0x28d
github.com/elastic/beats/heartbeat/monitors/active/http.execRequest(0xc4203a3770, 0xc4202d8200, 0xc42018e5d0, 0xbf055ebb73bbe19e, 0x276b4f1383, 0x1fc6920, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/elastic/beats/heartbeat/monitors/active/http/task.go:252 +0xa6
github.com/elastic/beats/heartbeat/monitors/active/http.execPing(0xc4203a3770, 0xc420176100, 0x0, 0x0, 0x0, 0x3b9aca000, 0xc42018e5d0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/elastic/beats/heartbeat/monitors/active/http/task.go:226 +0x13c
github.com/elastic/beats/heartbeat/monitors/active/http.createPingFactory.func1(0xc4203a35f0, 0x2, 0xc4205e36f0, 0xc4205e3758)
	/go/src/github.com/elastic/beats/heartbeat/monitors/active/http/task.go:171 +0x442
github.com/elastic/beats/heartbeat/monitors.MakePingIPFactory.func1.1(0x120, 0xc4205e3778, 0x9c0119)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:194 +0x31
github.com/elastic/beats/heartbeat/monitors.MakeSimpleCont.func1(0x10, 0x1534ae0, 0xc4205e37a8, 0x9c0119, 0xc42053d380, 0x20)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:184 +0x26
github.com/elastic/beats/heartbeat/monitors.funcTask.Run(0xc420151690, 0x18, 0x20, 0x20, 0xc42053d380, 0x0, 0xc4200d4000)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:440 +0x27
github.com/elastic/beats/heartbeat/monitors.WithFields.func1(0xc4205e3701, 0xc42053d380, 0xc4205e37f8, 0xd62d81, 0x1566ee0, 0xc42053d380)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:398 +0x4a
github.com/elastic/beats/heartbeat/monitors.funcTask.Run(0xc42053d380, 0x173e920, 0xc420151690, 0x173e920, 0xc42053d380, 0x1fc6920, 0x15102f)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:440 +0x27
github.com/elastic/beats/heartbeat/monitors.makeByHostAnyIPJob.func1(0xc42008c800, 0xc4202f5680, 0x7fda3fcfa458, 0x0, 0xc4202f5680, 0xc420075a28)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:323 +0x939
github.com/elastic/beats/heartbeat/monitors.annotated.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4201529c0, 0x0, 0x0, ...)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:140 +0xc7
github.com/elastic/beats/heartbeat/monitors.MakeJob.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xc420051f98, 0x3, ...)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:127 +0xe8
github.com/elastic/beats/heartbeat/monitors.(*funcJob).Run(0xc42043ffe0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4202f5888, 0xc4202f5938, ...)
	/go/src/github.com/elastic/beats/heartbeat/monitors/util.go:438 +0x82
github.com/elastic/beats/heartbeat/monitors.(Job).Run-fm(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x173c260, ...)
	/go/src/github.com/elastic/beats/heartbeat/monitors/task.go:120 +0x86
github.com/elastic/beats/heartbeat/monitors.(*task).prepareSchedulerJob.func1(0x10, 0x16c0a58, 0xc4200b0140)
	/go/src/github.com/elastic/beats/heartbeat/monitors/task.go:85 +0x7d
github.com/elastic/beats/heartbeat/scheduler.(*Scheduler).runTask.func1(0xc4200b0140, 0xc4202f6880, 0xc4200b0140, 0xc42015a7e0)
	/go/src/github.com/elastic/beats/heartbeat/scheduler/scheduler.go:362 +0x5b
created by github.com/elastic/beats/heartbeat/scheduler.(*Scheduler).runTask
	/go/src/github.com/elastic/beats/heartbeat/scheduler/scheduler.go:352 +0x5c

So I guess my question is this simply a case of user / config errors?

Sorry for the delay. This should be fixed in 6.6. See https://github.com/elastic/beats/pull/9759

1 Like

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