Skip to content

[Bug]: Telegraf enters NG state after enabling sflow #557

@chase-chou

Description

@chase-chou

Describe the bug

Telegraf enters NG state after enabling sflow

Version

Version 3.0.0 RC4 - 3cc, 1cc
Version 2.5.0 GA - 1cc
Version 2.4.3 GA - 1ec

To Reproduce

Steps to reproduce the behavior:

  1. CLI > iaas > flowdata > set_flowdata
  2. Set status "on"
  3. Login Web UI > Home/Chart page >footer Extra Monitor "Network" and "Device"
  4. No data display

Expected behavior

Extra Monitor "Network" and "Device" page will displayed data, and won't make telegraf NG

Additional context

Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! Starting Telegraf
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! Loaded inputs: ceph cpu disk diskio exec (11x) ipmi_sensor kernel mem net processes sflow swap system
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! Loaded aggregators:
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! Loaded processors:
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! Loaded outputs: kafka (3x)
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! Tags enabled: host=dell200
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! [agent] Config: Interval:1m0s, Quiet:false, Hostname:"dell200", Flush Interval:10s
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z I! [inputs.sflow] Listening on udp://[::]:6343
Jul 07 15:15:14 dell200 telegraf[943501]: 2025-07-07T07:15:14Z E! [inputs.sflow] Failed to read openstack port info: Error 1698: Access denied for user 'root'@'localhost'
Jul 07 15:15:14 dell200 telegraf[943501]: panic: runtime error: invalid memory address or nil pointer dereference
Jul 07 15:15:14 dell200 telegraf[943501]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x61 pc=0x15a8d2e]
Jul 07 15:15:14 dell200 telegraf[943501]: goroutine 112 [running]:
Jul 07 15:15:14 dell200 telegraf[943501]: database/sql.(*Rows).closemuRUnlockIfHeldByScan(0x1?)
Jul 07 15:15:14 dell200 telegraf[943501]:         /usr/local/go/src/database/sql/sql.go:3412 +0xe
Jul 07 15:15:14 dell200 telegraf[943501]: database/sql.(*Rows).Next(0x0)
Jul 07 15:15:14 dell200 telegraf[943501]:         /usr/local/go/src/database/sql/sql.go:3033 +0x1c
Jul 07 15:15:14 dell200 telegraf[943501]: github.com/influxdata/telegraf/plugins/inputs/sflow.(*SFlow).cacheOpenstackPortInfo(0xc00097d110)
Jul 07 15:15:14 dell200 telegraf[943501]:         /home/jenkins/workspace/centos9_cubecos_prod/build/core/telegraf/telegraf/plugins/inputs/sflow/sflow.go:161 +0x255
Jul 07 15:15:14 dell200 telegraf[943501]: github.com/influxdata/telegraf/plugins/inputs/sflow.(*SFlow).read(0xc00097d110, {0x2d684c0, 0xc00090dce0}, {0x2d65410, 0xc0000d4db8})
Jul 07 15:15:14 dell200 telegraf[943501]:         /home/jenkins/workspace/centos9_cubecos_prod/build/core/telegraf/telegraf/plugins/inputs/sflow/sflow.go:132 +0xa5
Jul 07 15:15:14 dell200 telegraf[943501]: github.com/influxdata/telegraf/plugins/inputs/sflow.(*SFlow).Start.func2()
Jul 07 15:15:14 dell200 telegraf[943501]:         /home/jenkins/workspace/centos9_cubecos_prod/build/core/telegraf/telegraf/plugins/inputs/sflow/sflow.go:100 +0x5c
Jul 07 15:15:14 dell200 telegraf[943501]: created by github.com/influxdata/telegraf/plugins/inputs/sflow.(*SFlow).Start in goroutine 1
Jul 07 15:15:14 dell200 telegraf[943501]:         /home/jenkins/workspace/centos9_cubecos_prod/build/core/telegraf/telegraf/plugins/inputs/sflow/sflow.go:98 +0x2e5
Jul 07 15:15:14 dell200 systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 07 15:15:14 dell200 systemd[1]: telegraf.service: Failed with result 'exit-code'.
Jul 07 15:15:15 dell200 systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 5.
Jul 07 15:15:15 dell200 systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Jul 07 15:15:15 dell200 systemd[1]: telegraf.service: Start request repeated too quickly.
Jul 07 15:15:15 dell200 systemd[1]: telegraf.service: Failed with result 'exit-code'.
Jul 07 15:15:15 dell200 systemd[1]: Failed to start The plugin-driven server agent for reporting metrics into InfluxDB.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions