Flow-accounting is not active

Hi,

My VyOS in last version not send sflow

vyos@RtrExt:~$ sh version

Version: VyOS 1.4-rolling-202206090217
Release train: sagitta

Built by: autobuild@vyos.net
Built on: Thu 09 Jun 2022 02:17 UTC
Build UUID: a72a3b3d-8195-43e0-aa52-a9e06cd5691f
Build commit ID: 06a1dc8ccc7a39

Architecture: x86_64
Boot via: installed image
System type: VMware guest

Hardware vendor: VMware, Inc.
Hardware model: VMware Virtual Platform
Hardware S/N: VMware-42 3d a4 56 66 84 00 59-8d 61 c3 f1 89 54 23 b3
Hardware UUID: 56a43d42-8466-5900-8d61-c3f1895423b3

Copyright: VyOS maintainers and contributors

system {
config-management {
commit-revisions 100
}
conntrack {
modules {
ftp
h323
nfs
pptp
sip
sqlnet
tftp
}
}
console {
device ttyS0 {
speed 115200
}
}
flow-accounting {
interface eth1
sflow {
agent-address 192.168.60.21
sampling-rate 10
server 192.168.60.23 {
port 6343
}
}

vyos@RtrExt:~$ show flow-accounting interface eth1
flow-accounting is not active
vyos@RtrExt:~$

Can you help me ?

Regards

I find uacctd failed…

vyos@RtrExt:~$ sudo service uacctd status
● uacctd.service - ulog accounting daemon
Loaded: loaded (/lib/systemd/system/uacctd.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/uacctd.service.d
└─override.conf
Active: activating (auto-restart) (Result: signal) since Fri 2022-06-10 10:02:45 UTC; 6s ago
Process: 2764 ExecStart=/usr/sbin/uacctd -f /run/pmacct/uacctd.conf (code=exited, status=0/SUCCESS)
Main PID: 2765 (code=killed, signal=SEGV)
CPU: 46ms

Requires more logs, it is not clear

what do you want ?

The issue is sflow not working and it seems due to uacctd crashes

Jun 10 15:25:36 uacctd[21483]: INFO ( default/core ): Linux NetFilter NFLOG Accounting Daemon, uacctd (RELEASE)
Jun 10 15:25:36 uacctd[21483]: INFO ( default/core ): ‘–build=x86_64-linux-gnu’ ‘–prefix=/usr’ ‘–includedir=${prefix}/include’ ‘–mandir=${prefix}/share/man’ ‘–infodir=${prefix}/share/info’ ‘–sysconfdir=/etc’ ‘–localstatedir=/var’ ‘–disable-option-checking’ ‘–disable-silent-rules’ ‘–libdir=${prefix}/lib/x86_64-linux-gnu’ ‘–libexecdir=${prefix}/lib/x86_64-linux-gnu’ ‘–disable-maintainer-mode’ ‘–disable-dependency-tracking’ '–with
Jun 10 15:25:36 uacctd[21483]: INFO ( default/core ): Reading configuration file ‘/run/pmacct/uacctd.conf’.
Jun 10 15:25:36 systemd[1]: uacctd.service: Can’t open PID file /run/pmacct/uacctd.pid (yet?) after start: Operation not permitted
Jun 10 15:25:36 uacctd[21484]: INFO ( sf_192.168.60.23/sfprobe ): Exporting flows to [192.168.60.23]:6343
Jun 10 15:25:36 uacctd[21484]: INFO ( sf_192.168.60.23/sfprobe ): Sampling at: 1/10
Jun 10 15:25:36 uacctd[21483]: INFO ( default/core ): Successfully connected Netlink NFLOG socket
Jun 10 15:25:36 systemd[1]: Started ulog accounting daemon.
Jun 10 15:25:36 uacctd[21485]: OK ( default_memory/memory ): waiting for data on: ‘/tmp/uacctd.pipe’
Jun 10 15:25:37 systemd[1]: serial-getty@ttyS0.service: Succeeded.
Jun 10 15:25:37 systemd[1]: serial-getty@ttyS0.service: Scheduled restart job, restart counter is at 1787.
Jun 10 15:25:37 systemd[1]: Stopped Serial Getty on ttyS0.
Jun 10 15:25:37 systemd[1]: Started Serial Getty on ttyS0.
Jun 10 15:25:37 agetty[21488]: /dev/ttyS0: not a tty
Jun 10 15:25:37 kernel: uacctd[21483]: segfault at 6 ip 00007f36de23677e sp 00007ffeee0b7048 error 4 in libc-2.31.so[7f36de1b4000+14b000]
Jun 10 15:25:37 kernel: Code: 4c 8d 0c 16 4c 39 cf 0f 82 63 01 00 00 48 89 d1 f3 a4 c3 80 fa 08 73 12 80 fa 04 73 1e 80 fa 01 77 26 72 05 0f b6 0e 88 0f c3 <48> 8b 4c 16 f8 48 8b 36 48 89 4c 17 f8 48 89 37 c3 8b 4c 16 fc 8b
Jun 10 15:25:37 systemd[1]: uacctd.service: Main process exited, code=killed, status=11/SEGV
Jun 10 15:25:37 systemd[1]: uacctd.service: Failed with result ‘signal’.
Jun 10 15:25:47 systemd[1]: serial-getty@ttyS0.service: Succeeded.
Jun 10 15:25:47 systemd[1]: serial-getty@ttyS0.service: Scheduled restart job, restart counter is at 1788.
Jun 10 15:25:47 systemd[1]: Stopped Serial Getty on ttyS0.
Jun 10 15:25:47 systemd[1]: Started Serial Getty on ttyS0.
Jun 10 15:25:47 agetty[21492]: /dev/ttyS0: not a tty
Jun 10 15:25:48 systemd[1]: uacctd.service: Scheduled restart job, restart counter is at 1578.
Jun 10 15:25:48 systemd[1]: Stopped ulog accounting daemon.
Jun 10 15:25:48 systemd[1]: Starting ulog accounting daemon…
Jun 10 15:25:48 uacctd[21493]: INFO ( default/core ): Start logging …
Jun 10 15:25:48 uacctd[21494]: INFO ( default/core ): Linux NetFilter NFLOG Accounting Daemon, uacctd (RELEASE)
Jun 10 15:25:48 uacctd[21494]: INFO ( default/core ): ‘–build=x86_64-linux-gnu’ ‘–prefix=/usr’ ‘–includedir=${prefix}/include’ ‘–mandir=${prefix}/share/man’ ‘–infodir=${prefix}/share/info’ ‘–sysconfdir=/etc’ ‘–localstatedir=/var’ ‘–disable-option-checking’ ‘–disable-silent-rules’ ‘–libdir=${prefix}/lib/x86_64-linux-gnu’ ‘–libexecdir=${prefix}/lib/x86_64-linux-gnu’ ‘–disable-maintainer-mode’ ‘–disable-dependency-tracking’ '–with
Jun 10 15:25:48 uacctd[21494]: INFO ( default/core ): Reading configuration file ‘/run/pmacct/uacctd.conf’.
Jun 10 15:25:48 systemd[1]: uacctd.service: Can’t open PID file /run/pmacct/uacctd.pid (yet?) after start: Operation not permitted
Jun 10 15:25:48 uacctd[21495]: INFO ( sf_192.168.60.23/sfprobe ): Exporting flows to [192.168.60.23]:6343
Jun 10 15:25:48 uacctd[21495]: INFO ( sf_192.168.60.23/sfprobe ): Sampling at: 1/10
Jun 10 15:25:48 uacctd[21494]: INFO ( default/core ): Successfully connected Netlink NFLOG socket
Jun 10 15:25:48 systemd[1]: Started ulog accounting daemon.
Jun 10 15:25:48 uacctd[21496]: OK ( default_memory/memory ): waiting for data on: ‘/tmp/uacctd.pipe’

I reproduced the issue on 1.4-rolling-202207111030.

It can be fixed by manually removing “PIDFile=/run/pmacct/uacctd.pid” from /etc/systemd/system/uacctd.service.d/override.conf.
The PID file does not exists, so systemd keep restarting uacctd.

Actually, it did not fixed the issue.
The service started one time, but now it’s broken even without PIDFile.

/var/log/messages shows this:
Jul 15 14:28:11 rt3 systemd[1]: Starting ulog accounting daemon…
Jul 15 14:28:11 rt3 systemd[1]: Started ulog accounting daemon.
Jul 15 14:28:12 rt3 kernel: [ 154.563737] uacctd[3448]: segfault at 6 ip 00007fb14a7e177e sp 00007ffc165f8fa8 error 4 in libc-2.31.so[7fb14a75f000+14b000]
Jul 15 14:28:12 rt3 kernel: [ 154.563753] Code: 4c 8d 0c 16 4c 39 cf 0f 82 63 01 00 00 48 89 d1 f3 a4 c3 80 fa 08 73 12 80 fa 04 73 1e 80 fa 01 77 26 72 05 0f b6 0e 88 0f c3 <48> 8b 4c 16 f8 48 8b 36 48 89 4c 17 f8 48 89 37 c3 8b 4c 16 fc 8b

Setting system flow-accounting disable-imt seems to fix the issue.
The issue was reported here: Flows aggregate field causes segmentation fault · Issue #561 · pmacct/pmacct · GitHub