[[inputs.dpdk]] have error plugin (it say no no active sockets connections present, but it's not true)

Hello2*. I have a problem with inputs.dpdk.
Telegraf 1.31.3.
config:

[[inputs.dpdk]]
  socket_path =  "/var/run/dpdk/rte/dpdk_telemetry.v2"
  device_types = ["ethdev"]
  interval = "10s"
  socket_access_timeout = "10s"

but after run telegraf I have error:
no active sockets connections present
but

root@trex:~# netstat | grep dpdk
unix  2      [ ]         DGRAM                    3412513  /var/run/dpdk/rte/mp_socket
unix  3      [ ]         SEQPACKET  CONNECTED     3755265  /var/run/dpdk/rte/dpdk_telemetry.v2

and dpdk-telemetry.py show data from socket.

root@trex:/opt/usertool# python3 dpdk-telemetry.py
Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
{"version": "DPDK 23.03.0", "pid": 193053, "max_output_len": 16384}
--> /ethdev/xstats,0
{"/ethdev/xstats": {"rx_good_packets": 5070724545, "tx_good_packets": 92473, "rx_good_bytes": 211937769753, "tx_good_bytes": 100717374, "rx_missed_errors": 0, "rx_errors": 11, "tx_errors": 0, "rx_mbuf_allocation_errors": 0, "rx_q0_packets": 5070724545, "rx_q0_bytes": 211937769753,

Are you running Telegraf as root? See this comment in the readme:

Since DPDK will most likely run with root privileges, the socket
telemetry interface exposed by DPDK will also require root access […]

Unfortunately, I can’t verify it.
It was necessary to solve it urgently. I put the version telegraf_1.26.0-1_amd64 with it, he saw the socket and said /var/run/dpdk/rte/dpdk_telemetry.v2: permission denied Then, i did:

sed -i ‘s/User=telegraf/User=root/g’ /usr/lib/systemd/system/telegraf.service
systemctl daemon-reload
systemctl restart telegraf

And everything worked. Thank You!

1 Like