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

[Bug] Telegraf crashes when upgrading mongodb #3013

Closed
wei-hai opened this issue Jul 12, 2017 · 0 comments
Closed

[Bug] Telegraf crashes when upgrading mongodb #3013

wei-hai opened this issue Jul 12, 2017 · 0 comments
Assignees
Labels
bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf
Milestone

Comments

@wei-hai
Copy link

wei-hai commented Jul 12, 2017

Relevant telegraf.conf:

# Read metrics from one or many MongoDB servers
[[inputs.mongodb]]
  servers = ["mongodb://127.0.0.1:27017"]
  gather_perdb_stats = true

System info:

ubuntu 12.04
telegraf 1.3.3
mongodb 2.0.4

Steps to reproduce:

  1. start telegraf and mongodb
  2. run apt-get update to upgrade mongodb to latest version

Expected behavior:

telegraf should not crash and reconnect after mongodb upgrade

Actual behavior:

telegraf crashes

Additional info:

telegraf.log

2017-07-11T23:22:05Z E! Error in plugin [inputs.mongodb]: no reachable servers
2017-07-11T23:23:05Z E! Error in plugin [inputs.mongodb]: no reachable servers
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc5b950]

goroutine 5765 [running]:
github.com/influxdata/telegraf/plugins/inputs/mongodb.NewStatLine(0xed0f7545c, 0x2d9af9c, 0x1bec540, 0xc4202a02d0, 0xc42087dae0, 0xc4208d3cf8, 0xc4201207a0, 0xed0f75510, 0x3208e81, 0x1bec540, ...)
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/mongodb/mongostat.go:517 +0x340
github.com/influxdata/telegraf/plugins/inputs/mongodb.(*Server).gatherData(0xc420382940, 0x1b03540, 0xc4203828e0, 0x406001, 0x0, 0x0)
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/mongodb/mongodb_server.go:107 +0xd0f
github.com/influxdata/telegraf/plugins/inputs/mongodb.(*MongoDB).gatherServer(0xc4202a6080, 0xc420382940, 0x1b03540, 0xc4203828e0, 0x1145a00, 0xc4207ac540)
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/mongodb/mongodb.go:171 +0x89
github.com/influxdata/telegraf/plugins/inputs/mongodb.(*MongoDB).Gather.func1(0xc4207d9380, 0x1b03540, 0xc4203828e0, 0xc4202a6080, 0xc420382940)
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/mongodb/mongodb.go:99 +0x73
created by github.com/influxdata/telegraf/plugins/inputs/mongodb.(*MongoDB).Gather
	/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/mongodb/mongodb.go:100 +0x3ec
@danielnelson danielnelson added bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf labels Jul 12, 2017
@danielnelson danielnelson added this to the 1.4.3 milestone Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf
Projects
None yet
Development

No branches or pull requests

3 participants