Bandwidthd problem
-
For reference, I can tell you that on my 2.0.1 nanobsd box, it writes to /usr/local/bandwidthd/htdocs, so it must not be read-only.
Same problem here - Alix 2 with
2.1-BETA0 (i386) built on Sat Sep 15 16:38:19 EDT 2012 FreeBSD 8.3-RELEASE-p4Syslog shows clearly
Sep 23 17:43:10 pfsense2 bandwidthd: Monitoring subnet 10.28.0.0 with netmask 10.28.0.0
Sep 23 17:43:10 pfsense2 bandwidthd: Cannot open htdocs/index.html for writing# touch /usr/pbi/bandwidthd-i386/bandwidthd/htdocs/index.php
touch: /usr/pbi/bandwidthd-i386/bandwidthd/htdocs/index.php: Read-only file system -
For reference, I can tell you that on my 2.0.1 nanobsd box, it writes to /usr/local/bandwidthd/htdocs, so it must not be read-only.
Same problem here - Alix 2 with
2.1-BETA0 (i386) built on Sat Sep 15 16:38:19 EDT 2012 FreeBSD 8.3-RELEASE-p4Syslog shows clearly
Sep 23 17:43:10 pfsense2 bandwidthd: Monitoring subnet 10.28.0.0 with netmask 10.28.0.0
Sep 23 17:43:10 pfsense2 bandwidthd: Cannot open htdocs/index.html for writingtouch /usr/pbi/bandwidthd-i386/bandwidthd/htdocs/index.php
touch: /usr/pbi/bandwidthd-i386/bandwidthd/htdocs/index.php: Read-only file system
Just did the upgrade from 2.0.1
And bandwidth is failing to start errors below
This is another nano install on a CF card in a watchguard, keep in mind this has been working flawless for the past 11months not a single issue and it has been rebooted once in this time.Dec 6 08:22:22 bandwidthd: Cannot open htdocs/index.html for writing Dec 6 08:22:22 bandwidthd: Cannot open htdocs/index.html for writing Dec 6 08:22:22 bandwidthd: Monitoring subnet 10.0.0.0 with netmask 10.0.0.0 Dec 6 08:22:22 bandwidthd: Monitoring subnet 10.0.0.0 with netmask 10.0.0.0 Dec 6 08:22:12 bandwidthd: Cannot open htdocs/index.html for writing Dec 6 08:22:12 bandwidthd: Cannot open htdocs/index.html for writing Dec 6 08:22:12 bandwidthd: Monitoring subnet 10.0.0.0 with netmask 10.0.0.0 Dec 6 08:22:12 bandwidthd: Monitoring subnet 10.0.0.0 with netmask 10.0.0.0
-
The quoted netmasks (10.0.0.0.0 and 10.28.0.0) are "unusual". Shouldn't they be 255.0.0.0 or the like?
-
I wanted to see why bandwidthd was reported as working on 2.0.1 nanobsd, so I loaded a clean 2.0.1 on a CF card and stuck it in an Alix 2D13. Directly after installing bandwidthd 2.0.1.3 from the Package Manager the CF card is left mounted RW. So bandwidthd runs, happily scribbling on the CF card at regular intervals until the next reboot.
After a reboot, the CF card is correctly mounted readonly. bandwidthd can't scribble on the CF card. The system log regularly reports this:Dec 9 18:12:25 kernel: pid 20118 (bandwidthd), uid 0: exited on signal 11 Dec 9 18:15:43 kernel: pid 15441 (bandwidthd), uid 0: exited on signal 11 Dec 9 18:15:46 kernel: pid 31625 (bandwidthd), uid 0: exited on signal 11 Dec 9 18:19:09 kernel: pid 25051 (bandwidthd), uid 0: exited on signal 11
So 2.0.1 nanobsd systems that have bandwidthd working must have one of:
a) Never been rebooted since installing the package; or
b) An old version of the bandwidthd package that mounts the CF card RW; or
c) Another package that wrongly mounts the CF card RW at boot time; or
d) A bit of extra code hacked in by the admin to purposely mount the CF card RW.Anyway, now I know that this is not a new problem in 2.1 - I had been really struggling to see how it could have been working for 2.0.1 nanobsd users.
Now to fix it… -
I d like to see a fix as i truly miss Bandwidth D. Is there a fix that a newbie to Linux like me could deploy easily ?
-
-
Any updates on this issue? :(
-
ditto.
Any updates ? -
on install i get this in the syslog
php: /pkg_edit.php: The command '/usr/local/etc/rc.d/bandwidthd.sh stop' returned exit code '1', the output was 'No matching processes were found'/usr/local/etc/rc.d/bandwidthd.sh start
Syntax Error "syntax error" on line 32However there is no line 32 in bandwidthd.sh ???
Running 2.1-BETA1 (amd64)
built on Fri Feb 15 04:33:17 EST 2013
FreeBSD 8.3-RELEASE-p5 -
php: /pkg_edit.php: The command '/usr/local/etc/rc.d/bandwidthd.sh stop' returned exit code '1', the output was 'No matching processes were found'
That is no problem - when it tries to stop/start there will be no existing process running the first time, so that message comes out.
/usr/local/etc/rc.d/bandwidthd.sh start
Syntax Error "syntax error" on line 32I have nanoBSD systems, and the bandwidthd install now writes a custom bandwidthd.sh for the nanobsd case that puts the bandwidthd output data into /var/bandwidthd - so that the CF card can be left readonly.
I had a look at the code that creates bandwidthd.sh for the other cases and can't see an obvious error.
Please post the bandwidthd package version (latest is 2.0.1.4) and the content of bandwidthd.sh - then I can track down what is going wrong. -
Please post the bandwidthd package version (latest is 2.0.1.4) and the content of bandwidthd.sh - then I can track down what is going wrong.
Oh my bad. The last line in the subnet settings text, "The subnet(s) on which bandwidthd will report. (separate with ';' for multiple subnets, e.g. 192.168.1.0/24;10.0.0.0/24)."The ordinary subnet for the selected interface/s is automatically put in the config, do not specify it here."
Well i had, and it gave me that error, now im running bandwithd without problems ;)So if anyone get
bandwidthd: Syntax Error "syntax error" on line 32
bandwidthd: Syntax Error "syntax error" on line 33
Check subnet config -
Alternatively, bandwidthd since version 2 can log to an external postgresql database. To test, I just set up bandwidthd on a local linux server with postgesql to catch bandwidthd logs from my Alix based nanobsd install of pfsense. I was able to get the linux install of bandwidthd working using postgresql for storage after a fair amount of newbie fanagling.
Presumably using bandwidthd as a 'forwarder' sort of like pfflowd instead of hosting the php and data files locally on a compact flash installation should conceivably alleviate some of the issues?
Unfortunately, I am unable to persist changes to the bandwidthd.conf file for obvious reasons. How does one properly modify config files that are subject to the pfsense GUI?
arri
ps. Sullrich attached the readme file from bandwidthd here: http://forum.pfsense.org/index.php/topic,2117.msg23881.html#msg23881 note the section on database support for more information.
-
The bandwidthd package consists of the bandwidthd tbz/pbi of the "real" software, plus the pfSense PHP and xml in GitHub at:
https://github.com/pfsense/pfsense-packages/tree/master/config/bandwidthd
That code generates the conf file and controls the start/stop…
If you can give it an option to pass the data to another system, feel free to mod the code and submit a pull request. That would certainly be beneficial for nanoBSD CF installs. -
Phil, I am going to attempt to respond to your suggestion and would very much appreciate some guidance regarding my progress in a new thread: http://forum.pfsense.org/index.php/topic,64790.msg351425.html#msg351425
arri
-
Try change
<url>/bandwidthd" target="_blank</url>
->```
<url>/bandwidthd/index.html" target="_blank</url>After that I can watch statistics normally :)
-
@nirovulf - what browser+version+settings are you using?
I am using Firefox (23.0.1). That displays the index.html automatically, without needing it specified. We can easily put your change into the bandwidthd package, as it should not do any harm. I would just like to know what environment causes the problem. -
phil.davis
I use Firefox 19.0.2, pfsense version: 2.0.3-RELEASE (i386)
built on Fri Apr 12 10:22:21 EDT 2013
FreeBSD pfsense.router 8.1-RELEASE-p13 FreeBSD 8.1-RELEASE-p13 #0: Fri Apr 12 10:47:01 EDT 2013 root@snapshots-8_1-i386.builders.pfsense.org:/usr/obj.pfSense/usr/pfSensesrc/src/sys/pfSense_SMP.8 i386
Settings: interface - LAN, checked output_cdf, recover_cdf, draw_graphs; Meta Refresh set to 120. All other settings are default -
I am a bit surprised that your Firefox does not go looking for index.html by default. But anyway, it is safer for all old/new/whatever browsers if we explicitly specify index.html like you suggest.
Pull request: https://github.com/pfsense/pfsense-packages/pull/483
30 minutes after that is committed you should be able to reinstall bandwidthd XML and it will work. -
How about editing /usr/local/etc/rc.d/bandwidthd.sh to point at /usr/pbi/bandwidthd-amd64/bandwidthd/bandwidthd instead of /usr/local/bandwidthd/bandwidthd?
-
How about editing /usr/local/etc/rc.d/bandwidthd.sh to point at /usr/pbi/bandwidthd-amd64/bandwidthd/bandwidthd instead of /usr/local/bandwidthd/bandwidthd?
This code in bandwidthd.inc "should" select/use the new PBI-based directory names based on the pfSense version (>2.0 means it has PBI) and 32 or 64-bit install.
// Check pfSense version $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); switch ($pfs_version) { case "1.2": case "2.0": define('PKG_BANDWIDTHD_BASE', '/usr/local/bandwidthd'); break; default: define('PKG_BANDWIDTHD_BASE', '/usr/pbi/bandwidthd-' . php_uname("m") . '/bandwidthd'); } // End: Check pfSense version
I don't have a 64-bit install to try. What happens now on pfSense 2.1-RELEASE 64-bit?
Post the bandwidthd.sh that it makes, then hopefully I can see what happens. -
`#!/bin/sh
This file was automatically generated
by the pfSense service handler.
rc_start() {
/usr/local/bandwidthd/bandwidthd
}rc_stop() {
/usr/bin/killall bandwidthd
}case $1 in
start)
rc_start
;;
stop)
rc_stop
;;
restart)
rc_stop
rc_start
;;
esac` I've had this issue on two different 64 bit systems and one 32 (all I have tried) all running 2.1 or a RC thereof. -
Now I really looked at the code! It has never worked for a 2.1 PBI-based full install.
Edit /usr/local/pkg/bandwidthd.inc to change line 324 from:/usr/local/bandwidthd/bandwidthd
to
{$bandwidthd_base_dir}/bandwidthd
like in this GitHub change: https://github.com/phil-davis/pfsense-packages/commit/c918257082611cc9d9e9f9987a0a317d629885d7
That should make it understand full installs for 2.0.n and 2.1 in both i386 and amd64.
Then save your bandwidthd settings again and check that bandwidth.sh has better code, and that bandwidthd actually works.
If all is well, I will submit the pull request. -
Hello every one
I have the latest pfsense build installed:
–--------------------
2.1-DEVELOPMENT (i386)
built on Wed May 2 08:30:27 EDT 2012
FreeBSD 8.3-RELEASEinstalled the latest bandwidthd
–-----------------------
"bandwidthd 2.0.1.3"and it always shows me Please start bandwidthd to populate this directory.
I searched in this forum and was not able to find a proper solution
Thanks
kaluTo anyone running into "Please start bandwidthd to populate this directory."
First check to see if it's running:
ps auxwww | grep -i bandwidthd
If it's running check the directory:
ls -al /usr/local/www/bandwidthd lrwxr-xr-x 1 root wheel 43 Sep 16 12:41 /usr/local/www/bandwidthd -> /usr/pbi/bandwidthd-amd64/bandwidthd/htdocs
I can see that the actual files aren't being written there.
Check this directory:
ls -al /usr/local/bandwidthd/htdocs/
If you see files in there, all you need to do is make the correct link
rm /usr/local/www/bandwidthd
ln -s /usr/local/bandwidthd/htdocs/ /usr/local/www/bandwidthd
Note: I ended up installing bandwidthd from pkg_add because I ran into issues originally, so my way is definitely non-standard. And this probably only affects people who updated through the 2.1 beta, RC development cycle. I'm sure stable has this working out of the box.
-
Just a comment freehood4all's note:
"Note: I ended up installing bandwidthd from pkg_add because I ran into issues originally, so my way is definitely non-standard. And this probably only affects people who updated through the 2.1 beta, RC development cycle. I'm sure stable has this working out of the box."
If I read your note right, you suggest that stable versions shouldn't have this problem.
I updated from a recently installed 2.0.3Release to 2.1Release, and definitely do have this problem.Phil.davis describes a fix (previous comment in this thread) that mostly works, except for missing icons.
-
Hi, I noticed that this only happens when I use firfox, not chrome or IE.
Thanks
-
To anyone running into "Please start bandwidthd to populate this directory."
First check to see if it's running:
ps auxwww | grep -i bandwidthd
If it's running check the directory:
ls -al /usr/local/www/bandwidthd lrwxr-xr-x 1 root wheel 43 Sep 16 12:41 /usr/local/www/bandwidthd -> /usr/pbi/bandwidthd-amd64/bandwidthd/htdocs
Check this directory:
ls -al /usr/local/bandwidthd/htdocs/
If you see files in there, all you need to do is make the correct link
rm /usr/local/www/bandwidthd
ln -s /usr/local/bandwidthd/htdocs/ /usr/local/www/bandwidthd
This one works for me.. Thanks.
-
This last method did not work for me.
I also upgraded.. from 2.0.3 to 2.1 and had bandwidthd previously installed.So for me this was the fix:
#First remove the package via GUI.
killall bandwidthd #Just incase it still runs.
find / -name "bandwidthd" #You get a list of files and directories related to Bandw.D.
#Now delete all of them..
rm -rf /directory/you/find#I also removed these.., which seem to be packages..
/root/var/db/pbi/installed/bandwidthd-2.0.1_5-i386
/root/var/db/pbi/.hashqueue/bandwidthd-2.0.1_5-i386Now install it again via GUI and it worked for me.
-
Now I really looked at the code! It has never worked for a 2.1 PBI-based full install.
Edit /usr/local/pkg/bandwidthd.inc to change line 324 from:/usr/local/bandwidthd/bandwidthd
to
{$bandwidthd_base_dir}/bandwidthd
like in this GitHub change: https://github.com/phil-davis/pfsense-packages/commit/c918257082611cc9d9e9f9987a0a317d629885d7
That should make it understand full installs for 2.0.n and 2.1 in both i386 and amd64.
Then save your bandwidthd settings again and check that bandwidth.sh has better code, and that bandwidthd actually works.
If all is well, I will submit the pull request.#!/bin/sh # This file was automatically generated # by the pfSense service handler. rc_start() { // /usr/local/bandwidthd/bandwidthd /usr/pbi/bandwidthd-amd64/bandwidthd/bandwidthd } rc_stop() { /usr/bin/killall bandwidthd } case $1 in start) rc_start ;; stop) rc_stop ;; restart) rc_stop rc_start ;; esac
Should the commented out line use # instead of //? ( // /usr/local/bandwidthd/bandwidthd)
edit: I believe the // issue was my doing as I commented that line out without verifying it wasn't a standalone line.
-
I can confirm that uninstalling the package leaves the old directory intact (/usr/local/bandwidthd) and that removing this directory prior to reinstalling makes the new install function as expected.
The difference appears to be that /usr/local/bandwidthd/bandwidthd is now a symlink to /usr/pbi/bandwidthd-amd64/bandwidthd/bandwidthd, the bandwidthd.inc line 324 is the same.
-
To resolve this problem (php: /pkg_edit.php: The command '/usr/local/etc/rc.d/bandwidthd.sh stop' returned exit code '1', the output was 'No matching processes were found') on start the bandwidth on new version of pfsense 2.1 and new version off bandwidth 2.0.1 i do just removed the directory "/usr/local/bandwidthd" and reinstalled a bandwidth. Its work fine to me.
Ps.: My english is not good. :( hehe
-
installed the latest bandwidthd
and it always shows me Please start bandwidthd to populate this directory.I ran through the troubleshooting and confirmed BandwidthD was running, but when clicking on Services, BandwidthD, the Access BandwidthD, a new page/tab opens to https://192.168.0.1/bandwidthd/index.html with the same error (using Firefox).
If I change the URL to https://192.168.0.1/bandwidthd/ then the summary page appears as expected. It would appear the link is not set correctly, or the index page should be deleted when proper data is found. I'm using the output_cdf method.
-
I just checked installing fresh on a new system. The initial "Please start bandwidthd to populate this directory." page is found at index.html, and after a while index.html is updated with the daily data.
I now have the following in /usr/local/www/bandwidthd-rw-r--r-- 1 root wheel 2230 Dec 13 13:33 10.49.143.1-1-R.png -rw-r--r-- 1 root wheel 2207 Dec 13 13:33 10.49.143.1-1-S.png -rw-r--r-- 1 root wheel 2636 Dec 13 13:33 Subnet-1-10.49.143.0.html -rw-r--r-- 1 root wheel 2242 Dec 13 13:26 Subnet-2-10.49.143.0.html -rw-r--r-- 1 root wheel 2245 Dec 13 13:16 Subnet-3-10.49.143.0.html -rw-r--r-- 1 root wheel 2242 Dec 13 13:33 Total-1-R.png -rw-r--r-- 1 root wheel 2244 Dec 13 13:33 Total-1-S.png -rw-r--r-- 1 root wheel 2587 Dec 13 13:26 Total-2-R.png -rw-r--r-- 1 root wheel 2646 Dec 13 13:26 Total-2-S.png -rw-r--r-- 1 root wheel 1844 Dec 13 13:16 Total-3-R.png -rw-r--r-- 1 root wheel 1853 Dec 13 13:16 Total-3-S.png -rw-r--r-- 1 root wheel 3323 Dec 13 13:33 index.html -rw-r--r-- 1 root wheel 2939 Dec 13 13:26 index2.html -rw-r--r-- 1 root wheel 2948 Dec 13 13:16 index3.html -rw-r--r-- 1 root wheel 653 Dec 13 12:16 index4.html -rw-r--r-- 1 root wheel 1649 Dec 13 11:51 legend.gif -rw-r--r-- 1 root wheel 7573 Dec 13 11:51 logo.gif
@rsleegers - If you can reproduce this, what does your system have in /usr/local/www/bandwidthd ?
-
@rsleegers - If you can reproduce this, what does your system have in /usr/local/www/bandwidthd ?
Yes, after a day or so (I think more than a day), the tab/link worked without modifying.
-
To anyone running into "Please start bandwidthd to populate this directory."
First check to see if it's running:
ps auxwww | grep -i bandwidthd
If it's running check the directory:
ls -al /usr/local/www/bandwidthd lrwxr-xr-x 1 root wheel 43 Sep 16 12:41 /usr/local/www/bandwidthd -> /usr/pbi/bandwidthd-amd64/bandwidthd/htdocs
I can see that the actual files aren't being written there.
Check this directory:
ls -al /usr/local/bandwidthd/htdocs/
If you see files in there, all you need to do is make the correct link
rm /usr/local/www/bandwidthd
ln -s /usr/local/bandwidthd/htdocs/ /usr/local/www/bandwidthd
Note: I ended up installing bandwidthd from pkg_add because I ran into issues originally, so my way is definitely non-standard. And this probably only affects people who updated through the 2.1 beta, RC development cycle. I'm sure stable has this working out of the box.
Nice one freehood4all your fix worked for me on a Netgate box running pfSense 2.1 (amd64).
thanks -
Hello all
I installed the bandwidthd package today.
the installation went right but after that it s now impossible to access the Webgui.
My network is good, so pfSence is still running.
Did someone meet this problem??Thx
-
I cant get bandwidthd working either.
I upgraded from 2.0.3 to 2.1, and it didnt work.This last method did not work for me.
I also upgraded.. from 2.0.3 to 2.1 and had bandwidthd previously installed.So for me this was the fix:
#First remove the package via GUI.
killall bandwidthd #Just incase it still runs.
find / -name "bandwidthd" #You get a list of files and directories related to Bandw.D.
#Now delete all of them..
rm -rf /directory/you/find#I also removed these.., which seem to be packages..
/root/var/db/pbi/installed/bandwidthd-2.0.1_5-i386
/root/var/db/pbi/.hashqueue/bandwidthd-2.0.1_5-i386Now install it again via GUI and it worked for me.
I tried this, no luck. Rebooted, restarted package, same thing. In System log it says:
php: /status_services.php: The command '/usr/local/etc/rc.d/bandwidthd.sh stop' returned exit code '1', the output was 'No matching processes were found'
bandwidthd: log.1.0.cdf is corrupted, skippingwhen going to bandwidthd it says:
bandwidthd has nothing to graph. This message should be replaced by graphs in a few minutes. If it's not, please see the section titled "Known Bugs and Troubleshooting" in the READMEin /usr/pbi/bandwidthd-i386/bandwidthd there is the log file, but it is empty…
-rw-r--r-- 1 root wheel 0 Mar 2 13:59 log.1.0.cdfAm i doing something wrong or does anyone know how to fix it?
Thank you. -
I'm getting the following error when attempting to start Bandwidthd:
Error: Syntax Error "syntax error" on line 58Build info:
pfSense 2.1-RELEASE (amd64)
built on Wed Sep 11 18:17:48 EDT 2013
FreeBSD 8.3-RELEASE-p11
Bandwidthd 2.0.1_5 pkg v.0.3This is a fresh install and I'm trying to log to a psgdb.
Database tests confirm that the DB is up, with the correct schema, and accessible.Conf file output (edited for anonymity):
subnet 10.x.x.x 255.255.255.0
dev "em0"
promiscuous false
filter "ip"
graph false
pgsql_connect_string "user = bandwidthd dbname = bandwidthd password = xxxxxxx host = xxx.xxx.xxx.xxx"
sensor_id "proxy01.xxx.local"Anyone have any ideas?
Thanks
-
The fix seems to be here:
https://forum.pfsense.org/index.php?topic=78175 -
Edit: found info on 2.2 problems here: https://forum.pfsense.org/index.php?topic=84642.0