Bug #4731
closedsoftflowd process gets started twice during bootup
0%
Description
When rebooting the firewall, the softflowd process(s) can get started twice. I did some investigation and believe what is happening is the pfSense package manager is telling the softflowd package to sync, and then starts the service. The problem is, the softflowd sync also starts the service. If timing is just right (almost always in my case), two softflowd process per enabled interface getstarted.
In the custom_php_global_functions for the package, the function sync_package_softflowd is invoking restart_service near the end. I changed this to restart_service_if_running which appears to have solved the problem.
Updated by Kill Bill over 9 years ago
Updated by Kill Bill over 9 years ago
Scratch that, a proper one here: https://github.com/pfsense/pfsense-packages/pull/917
Updated by Kill Bill over 9 years ago
Not an issue any more with 1.2 -> Resolved.
Updated by Aaron Shaffer about 8 years ago
I just wanted to chime in that the issue still exists with: pfSense 2.3.2 / softflow 1.2.1_2
I was having the same problem: my netflow receiver was consistently receiving double data. I tried editing /usr/local/pkg/softflowd.xml to change the call to restart_service("softflowd") to restart_service_if_running("softflowd"). After restarting the service, this change immediately fixed the bug. My traffic graph no longer shows doubled values.
It may worth noting that I have softflow monitoring two interfaces: the physical WAN and the VPN. The VPN was always reporting correct values, never doubled. Only the physical WAN was showing doubled numbers. But the issue was affecting all three of my pfSense routers in the same way, all pfSense 2.3.2 and softflow 1.2.1_2. This change on all three fixed all three of them.
Updated by Jim Pingle about 8 years ago
The problem with that "fix" is that with that sort of change, it no longer starts the daemon when it's stopped and the settings are saved (e.g. when a new user tries to save the settings fresh). Given the age of this ticket, starting a new one would be more appropriate.
Updated by Kill Bill almost 8 years ago
restart_service_if_running()
is a completely useless function as designed. The issue is fixed in https://github.com/pfsense/FreeBSD-ports/pull/309