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

panic: runtime error: index out of range [0] with length 0 #16350

Open
KammutierSpule opened this issue Dec 28, 2024 · 1 comment
Open

panic: runtime error: index out of range [0] with length 0 #16350

KammutierSpule opened this issue Dec 28, 2024 · 1 comment
Labels
bug unexpected problem or unintended behavior

Comments

@KammutierSpule
Copy link

KammutierSpule commented Dec 28, 2024

Relevant telegraf.conf

[global_tags]

[agent]
  # debug = true
  # quiet = false
  # logtarget = "stderr"

  interval = "5m"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "5m"
  flush_jitter = "0s"
  precision = "0s"
  hostname = ""
  omit_hostname = false

Logs from Telegraf

2024-12-28T00:45:35.919455+00:00 orangepizeroplus telegraf[2083]: panic: runtime error: index out of range [0] with length 0
2024-12-28T00:45:35.926049+00:00 orangepizeroplus telegraf[2083]: goroutine 705 [running]:
2024-12-28T00:45:35.940842+00:00 orangepizeroplus telegraf[2083]: github.com/influxdata/telegraf/plugins/outputs/influxdb_v2.(*httpClient).Write(0x4002581180, {0x937c360, 0xf687960}, {0x40001e0c88, 0x25, 0x25})
2024-12-28T00:45:35.941386+00:00 orangepizeroplus telegraf[2083]: #011/go/src/github.com/influxdata/telegraf/plugins/outputs/influxdb_v2/http.go:213 +0x844
2024-12-28T00:45:35.941633+00:00 orangepizeroplus telegraf[2083]: github.com/influxdata/telegraf/plugins/outputs/influxdb_v2.(*InfluxDB).Write(0x40029e5688, {0x40001e0c88, 0x25, 0x25})
2024-12-28T00:45:35.941794+00:00 orangepizeroplus telegraf[2083]: #011/go/src/github.com/influxdata/telegraf/plugins/outputs/influxdb_v2/influxdb_v2.go:201 +0x10c
2024-12-28T00:45:35.965380+00:00 orangepizeroplus telegraf[2083]: github.com/influxdata/telegraf/models.(*RunningOutput).writeMetrics(0x40029d24d0, {0x40001e0c88, 0x25, 0x25})
2024-12-28T00:45:35.965849+00:00 orangepizeroplus telegraf[2083]: #011/go/src/github.com/influxdata/telegraf/models/running_output.go:355 +0xf8
2024-12-28T00:45:35.966121+00:00 orangepizeroplus telegraf[2083]: github.com/influxdata/telegraf/models.(*RunningOutput).Write(0x40029d24d0)
2024-12-28T00:45:35.966301+00:00 orangepizeroplus telegraf[2083]: #011/go/src/github.com/influxdata/telegraf/models/running_output.go:313 +0x38c
2024-12-28T00:45:35.966519+00:00 orangepizeroplus telegraf[2083]: github.com/influxdata/telegraf/agent.(*Agent).flushOnce.func1()
2024-12-28T00:45:35.966720+00:00 orangepizeroplus telegraf[2083]: #011/go/src/github.com/influxdata/telegraf/agent/agent.go:938 +0x30
2024-12-28T00:45:35.966897+00:00 orangepizeroplus telegraf[2083]: created by github.com/influxdata/telegraf/agent.(*Agent).flushOnce in goroutine 74
2024-12-28T00:45:35.967292+00:00 orangepizeroplus telegraf[2083]: #011/go/src/github.com/influxdata/telegraf/agent/agent.go:937 +0x94
2024-12-28T00:45:36.049336+00:00 orangepizeroplus systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
2024-12-28T00:45:36.055622+00:00 orangepizeroplus systemd[1]: telegraf.service: Failed with result 'exit-code'.
2024-12-28T00:45:36.114815+00:00 orangepizeroplus systemd[1]: telegraf.service: Consumed 5.217s CPU time.
2024-12-28T00:45:36.436469+00:00 orangepizeroplus systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 1.
2024-12-28T00:45:36.438362+00:00 orangepizeroplus systemd[1]: Stopped telegraf.service - Telegraf.
2024-12-28T00:45:36.439013+00:00 orangepizeroplus systemd[1]: telegraf.service: Consumed 5.217s CPU time.
2024-12-28T00:45:36.478791+00:00 orangepizeroplus systemd[1]: Starting telegraf.service - Telegraf...

System info

Telegraf 1.33.0
Armbian

Docker

No response

Steps to reproduce

I don't know

Expected behavior

don't panic

Actual behavior

is panicking

Additional info

/etc/grafana/grafana.ini is all? on default settings

@KammutierSpule KammutierSpule added the bug unexpected problem or unintended behavior label Dec 28, 2024
@gone-for-coding
Copy link

Same here beginning with 1.33.

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
Projects
None yet
Development

No branches or pull requests

2 participants