Bandwidthd broken? [Resolved with patch]
-
I tried today's snapshot (amd-64) in a VM for testing; pfSense works OK but I can't get bandwidthd working. It's my first try playing with bandwidthd though. I did see some package changes go through last month, but I thought bandwidthd was done.
bandwidthd package installs OK, shows up as installed, and I ticked the 'enable bandwidthd' checkbox on the config page. But going to the 'access bandwidthd' tab, I get "Please start bandwidthd to populate this directory".
From the console bandwidthd is not found via the default path. Other debugging info:
[2.2-ALPHA][root@pfSense.localdomain]/root(9): ls -l `find / -name \*bandwidthd\*` -rw-r--r-- 1 root wheel 706 Jun 14 07:56 /tmp/bandwidthd.info -rwxr-xr-x 1 root wheel 278 Jun 14 07:57 /usr/local/etc/rc.d/bandwidthd.sh -rw-rwxrwx 1 root wheel 13129 Jun 14 07:56 /usr/local/pkg/bandwidthd.inc -rw-r--r-- 1 root wheel 9947 Jun 14 07:56 /usr/local/pkg/bandwidthd.xml lrwxr-xr-x 1 root wheel 49 Jun 14 07:56 /usr/local/www/bandwidthd -> /usr/pbi/bandwidthd-amd64/local/bandwidthd/htdocs -rwxr-xr-x 1 root wheel 52904 Jun 7 02:43 /usr/pbi/bandwidthd-amd64/local/bandwidthd/bandwidthd -rw-r--r-- 1 root wheel 1769 Jun 14 07:57 /usr/pbi/bandwidthd-amd64/local/bandwidthd/etc/bandwidthd.conf -rw-r--r-- 1 root wheel 1566 Jun 7 02:43 /usr/pbi/bandwidthd-amd64/local/bandwidthd/etc/bandwidthd.conf-dist -r-xr-xr-x 1 root wheel 492 Jun 7 02:43 /usr/pbi/bandwidthd-amd64/local/etc/rc.d/bandwidthd.sh.sample -rwxr-xr-x 1 root operator 11103 Jun 7 02:43 /usr/pbi/bandwidthd-amd64/rc.d/bandwidthd.sh.sample -rw-r--r-- 1 root operator 73 Jun 7 02:43 /usr/pbi/bandwidthd-amd64/rc.d/bandwidthd.sh.sample.pbiopt lrwxr-xr-x 1 root wheel 51 Jun 14 07:16 /usr/pbi/rc.d/bandwidthd.sh.sample -> /usr/pbi/bandwidthd-amd64/rc.d/bandwidthd.sh.sample -rw-r--r-- 1 root operator 0 Jun 14 07:16 /var/db/pbi/.hashqueue/bandwidthd-2.0.1_6-amd64 /usr/pbi/bandwidthd-amd64: total 184 -rw-r--r-- 1 root operator 149720 Jun 7 02:43 .pbi-hash-list drwxr-xr-x 2 root operator 512 Jun 7 02:43 bin drwxr-xr-x 2 root operator 512 Jun 7 02:43 etc drwxr-xr-x 2 root operator 512 Jun 7 02:43 linux drwxr-xr-x 14 root wheel 512 Jun 7 02:43 local drwxr-xr-x 2 root operator 512 Jun 7 02:43 pbiconf drwxr-xr-x 2 root operator 512 Jun 7 02:43 pbimeta drwxr-xr-x 2 root operator 512 Jun 7 02:43 rc.d drwxr-xr-x 2 root operator 512 Jun 7 02:43 run drwxr-xr-x 2 root operator 512 Jun 7 02:43 virtbase /usr/pbi/bandwidthd-amd64/local/bandwidthd: total 60 -rwxr-xr-x 1 root wheel 52904 Jun 7 02:43 bandwidthd drwxr-xr-x 2 root wheel 512 Jun 14 07:16 etc drwxr-xr-x 2 root wheel 512 Jun 14 07:56 htdocs /usr/pbi/bandwidthd-amd64/local/share/licenses/bandwidthd-2.0.1_6: total 28 -r--r--r-- 1 root wheel 18092 Jun 7 02:43 GPLv2 -r--r--r-- 1 root wheel 81 Jun 7 02:43 LICENSE -r--r--r-- 1 root wheel 203 Jun 7 02:43 catalog.mk /var/db/pbi/installed/bandwidthd-2.0.1_6-amd64: total 92 -rw-r--r-- 1 root operator 6 Jun 7 02:43 pbi_arch -rw-r--r-- 1 root operator 5 Jun 7 02:43 pbi_archivecount -rw-r--r-- 1 root operator 65 Jun 7 02:43 pbi_archivesum -rw-r--r-- 1 root operator 21 Jun 7 02:43 pbi_author -rw-r--r-- 1 root operator 9 Jun 7 02:43 pbi_category -rw-r--r-- 1 root operator 4 Jun 7 02:43 pbi_createver -rw-r--r-- 1 root operator 26 Jun 7 02:43 pbi_defaultpath -rw-r--r-- 1 root operator 344 Jun 7 02:43 pbi_desc -rw-r--r-- 1 root operator 12 Jun 7 02:43 pbi_fbsdver -rw-r--r-- 1 root operator 6179 Jun 7 02:43 pbi_icon.png -rw-r--r-- 1 root operator 26 Jun 14 07:16 pbi_installedpath -rw-r--r-- 1 root operator 6 Jun 7 02:43 pbi_license -rw-r--r-- 1 root operator 21 Jun 7 02:43 pbi_maintainer -rw-r--r-- 1 root operator 16 Jun 7 02:43 pbi_mdate -rw-r--r-- 1 root operator 11 Jun 7 02:43 pbi_name -rw-r--r-- 1 root operator 0 Jun 7 02:43 pbi_requiresroot -rw-r--r-- 1 root operator 37 Jun 7 02:43 pbi_shortdesc -rw-r--r-- 1 root operator 5 Jun 7 02:43 pbi_type -rw-r--r-- 1 root operator 8 Jun 7 02:43 pbi_version -rw-r--r-- 1 root operator 35 Jun 7 02:43 pbi_web -rw-r--r-- 1 root operator 10 Jun 7 02:43 post-install.sh -rw-r--r-- 1 root operator 10 Jun 7 02:43 pre-install.sh -rw-r--r-- 1 root operator 10 Jun 7 02:43 pre-remove.sh [2.2-ALPHA][root@pfSense.localdomain]/root(10): /usr/pbi/bandwidthd-amd64/local/bandwidthd/bandwidthd -l Shared object "libpq.so.5" not found, required by "bandwidthd"
-
Shared object "libpq.so.5" not found
That has happened to me in the past, and I am on 32-bit installs on nanoBSD. Uninstalled and reinstalled and then the library/ies appear again. Do the "standard" computer thing and uninstall and reinstall! And if you can figure out what actually makes the problem happen (presumably some "event" during installation) then report back and we can make progress to fix or handle it.
-
I saw Renato made some updates related to packages yesterday that perhaps could help, but no dice.
I installed new snapshot from scratch (pfSense-LiveCD-2.2-DEVELOPMENT-amd64-20140613-1600.iso.gz), unticked 'check package signature', and then installed bandwidthd from the list of available packages. Checked the last commit:
[2.2-ALPHA][admin@pfSense.localdomain]/etc(3): cat version.lastcommit aba02f656010bc190b5db0e0c659f8f79402b6a9
I see that /usr/local/etc/rc.d/bandwidthd.sh contains```
rc_start() {
/usr/local/bandwidthd/bandwidthd
}There is no such directory or executable file under /usr/local/, but there is under /usr/pbi/bandwithd-amd64:
[2.2-ALPHA][admin@pfSense.localdomain]/usr/pbi/bandwidthd-amd64/local/bandwidthd(13): ls -l
total 60
-rwxr-xr-x 1 root wheel 52904 Jun 7 02:43 bandwidthd
drwxr-xr-x 2 root wheel 512 Jun 19 10:10 etc
drwxr-xr-x 2 root wheel 512 Jun 19 10:10 htdocsRunning that file gives the same result as before:
[2.2-ALPHA][admin@pfSense.localdomain]/usr/pbi/bandwidthd-amd64/local/bandwidthd(21): ./bandwidthd -l
Shared object "libpq.so.5" not found, required by "bandwidthd"
[2.2-ALPHA][admin@pfSense.localdomain]/usr/pbi/bandwidthd-amd64/local/bandwidthd(22): find / -name libpq.so.5
/usr/pbi/bandwidthd-amd64/local/lib/libpq.so.5So there seems to be at least two separate problems: * RC file expects to find the bandwidthd executable in /usr/local/bandwidthd directory, but it lives somewhere else * The shared library libpq.so is not found by the executable I don't know anything about the pbi sytstem, so I can't be much further help other than testing.
-
That has happened to me in the past, and I am on 32-bit installs on nanoBSD. Uninstalled and reinstalled and then the library/ies appear again. Do the "standard" computer thing and uninstall and reinstall! And if you can figure out what actually makes the problem happen (presumably some "event" during installation) then report back and we can make progress to fix or handle it.
Phil, you made a commit to fix it for nano (https://github.com/pfsense/pfsense-packages/commit/dc690b55fe7b55b767af8461c4735ea4a3a60c3b), but there is another minor change needed for the non-nano (full install) case:
[2.2-ALPHA][root@pfsense]/usr/local/pkg(52): diff -ub bandwidthd.inc.old bandwidthd.inc --- bandwidthd.inc.old 2014-06-24 08:14:40.000000000 -0400 +++ bandwidthd.inc 2014-06-24 11:24:38.000000000 -0400 @@ -348,7 +348,9 @@ EOD; } else { $rc['start'] = <<<eod<br>-/usr/local/bandwidthd/bandwidthd +cd {$bandwidthd_base_dir} +{$bandwidthd_runtime_library_env} {$bandwidthd_base_dir}/bandwidthd +cd - EOD; } } else {</eod<br>
With this change, bandwidthd works for me (full install, amd64, 20-Jun-14 alpha 2.2 snapshot). I'm not sure how long it's been broken in the full-install case, but this fixes it.
-
The full install case on 2.2 has never worked. Thanks for sorting this out. I tested the change on a 2.1.4 full install also, and it does not break that, and should not break 2.0.n either, as the way the code works out the shell script to start it on 2.0.n case will end up the same as it was previously.
With this change, bandwidthd should now work on 2.0.* 2.1.* and 2.2 in both full and nanoBSD installs.
Pull request: https://github.com/pfsense/pfsense-packages/pull/679 -
I'm having the same issue as the OP and I'm glad a fix has been found..
How do I install the latest build from Github?
When will the fix be published to the 'Packages' section in the pfSense GUI? -
Hi,
Bandwidthd is working fine for me … but it doesn't work with Postgresql. Is that broken? Actually, it seems like Postgresql isn't installed?
Thanks!
-
I'm having the same issue as the OP and I'm glad a fix has been found..
How do I install the latest build from Github?
When will the fix be published to the 'Packages' section in the pfSense GUI?Pull request 679 referenced above was committed back in June 2014. bandwidthd should be showing 2.0.1_6 pkg v.0.5 and that is the version that should install from the packages list.
-
Hi,
Bandwidthd is working fine for me … but it doesn't work with Postgresql. Is that broken? Actually, it seems like Postgresql isn't installed?
Thanks!
You need to fill in the various Postgresql parameters to point to a database that is listening on some other system reachable on your network. pfSense itself does not have a Postgresql database engine.
-
Makes sense, thanks! I have the PostgreSQL server running now, and installed the schema (and can see the tables). No data showing up from BandwidthD yet … need to find the logs to see if I can figure out the problem.
Thanks again!
-
This problem still is ongoing for me, I'm using the standard install as a VM on VMWare. I read the patch was to fix the Nano version, but I believe it still affects the standard version. Are there any logs I can provide to help get to the root cause?
-
This problem still is ongoing for me, I'm using the standard install as a VM on VMWare. I read the patch was to fix the Nano version, but I believe it still affects the standard version. Are there any logs I can provide to help get to the root cause?
Nano was OK, the most recent patch was to fix bandwidthd startup on a full install. Please clarify which pfSense version you installed, and what is shown for the version of your bandwidthd package.