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

Docker input plugin causes Telegraf to crash #1132

Closed
StephanZaat opened this issue May 1, 2016 · 5 comments
Closed

Docker input plugin causes Telegraf to crash #1132

StephanZaat opened this issue May 1, 2016 · 5 comments

Comments

@StephanZaat
Copy link

I just switched from collectd to enable easier Docker metrics and I have this issue happening on several identical Docker servers at random intervals:

Everything runs great for several days and then the metrics are gone due to the following error:

...

2016/04/29 09:35:51 Gathered metrics, (10s interval), from 10 inputs in 1.570824848s
2016/04/29 09:36:00 Wrote 130 metrics to output influxdb in 11.021094ms
2016/04/29 09:36:04 Error decoding: EOF
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x583e6c]

goroutine 815998 [running]:
panic(0x10241a0, 0xc820010080)
    /usr/local/go/src/runtime/panic.go:464 +0x3e6
github.com/influxdata/telegraf/plugins/inputs/docker.gatherContainerStats(0x0, 0x7f2114cc0520, 0xc8205f2b00, 0xc8207e64e0)
    /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/docker/docker.go:238 +0x352c
github.com/influxdata/telegraf/plugins/inputs/docker.(*Docker).gatherContainer(0xc820160840, 0xc820404480, 0x40, 0xc820404500, 0x1, 0x4, 0xc820404540, 0x35, 0xc820212320, 0x47, ...)
    /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/docker/docker.go:228 +0x963
github.com/influxdata/telegraf/plugins/inputs/docker.(*Docker).Gather.func1(0xc820558c60, 0xc820160840, 0x7f2114cc0520, 0xc8205f2b00, 0xc820404480, 0x40, 0xc820404500, 0x1, 0x4, 0xc820404540, ...)
    /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/docker/docker.go:112 +0x9e
created by github.com/influxdata/telegraf/plugins/inputs/docker.(*Docker).Gather
    /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/docker/docker.go:116 +0x58d

The servers that run Telegraf without the Docker plugin run very solid and I'm very happy!

@zstyblik
Copy link
Contributor

zstyblik commented May 1, 2016

@StephanZaat which version of Telegraf do you use?

@StephanZaat
Copy link
Author

Sorry. This is the latest Telegraf - Version 0.12.1

@zstyblik
Copy link
Contributor

zstyblik commented May 1, 2016

@StephanZaat looking at the code, I believe this is/will be fixed in 0.13.x. It has been fixed by #1052.

@StephanZaat
Copy link
Author

OK, that's great. I guess I should have searched a bit harder.

@sparrc
Copy link
Contributor

sparrc commented May 1, 2016

this is #1052, it's been fixed in master and will be in release 0.13.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants