-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Telegraf crashes with the followinfg error: panic: runtime error: invalid memory address or nil pointer dereference #2061
Comments
please provide your config file |
Here you go:
|
I have the same issue. It appears to be caused when telegraf can't access the file in question due to permissions. That is, let's say you're running telegraf as an ordinary user and the file exists but is inaccessible to you, then telegraf crashes on startup (with a very cryptic message - no mention of 'permission denied' :-() I note that a non-existent file is fine, just one that does exist that you can't access. The problem can be 'resolved' by either running telegraf as root, or else keeping the list of files to ones that the telegraf process user can access, or by adding the telegraf user to some Unix groups so it can access the files via group permissions (although you're flat out of luck if the file's permissions mode is 0600 or similar). |
I am having this issue when receiving Metrics from Flink. I am using telegraf version Telegraf v1.2.0
|
I was running telegraf version 1.0.0 on CentOS release 6.5 when it crashed. Here are the last few lines from /var/log/telegraf/telegraf.log:
2016/11/18 10:18:30 Output [influxdb] wrote batch of 1000 metrics in 23.381351ms
2016/11/18 10:18:30 Output [influxdb] wrote batch of 1000 metrics in 23.187129ms
2016/11/18 10:18:30 Output [influxdb] wrote batch of 1000 metrics in 22.511862ms
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x590035]
goroutine 5344346 [running]:
panic(0x12cefe0, 0xc82000e0c0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/influxdata/telegraf/plugins/inputs/filestat.(*FileStat).Gather(0xc820134f30, 0x7fb15bb3b710, 0xc823395770, 0x0, 0x0)
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/inputs/filestat/filestat.go:82 +0x675
github.com/influxdata/telegraf/agent.gatherWithTimeout.func1(0xc8202ace40, 0xc820134f90, 0xc823395770)
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:163 +0x73
created by github.com/influxdata/telegraf/agent.gatherWithTimeout
/home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:164 +0xe0
Is this fixed in version 1.1.1 ? Or are there any workarounds?
Let me know if you require any other info.
The text was updated successfully, but these errors were encountered: