Bandwidthd: Syntax Error on line…
-
bandwidthd: Syntax Error on line 31
I get this one myself, but seems to be a common error, with different lines coming up in searches.
Is there any way to eliminate these errors? Seems to be issues with the functions writing the config. -
I do know now that editing the config manually will resolve the issue, but the issue persists after a reboot.
Seems the config is generated at boot time somehow.
Is there anyone working on this (or that knows of the issue), or is there an equivalent low-resource package that does the same task?
-
I know that this was posted a while ago, but I figured I would let you know the issues I've encountered as well, and what I believe is the problem. I'm running pfSense 2.1 (i386) and have Bandwidthd 2.0.1_5 pkg v.0.2 installed. The syntax error that I've found was related to the "Skip Intervals" directive. When looking at the Bandwidthd configuration page from the web interface, there is a default of "0" entered. Line 30 of my config file simply had a "0" (without the quotes) entered on that line. The correct configuration directive (or parameter if I'm saying that incorrectly) is "skip_intervals 0". My assumption is that when you save the settings from the web interface, it's over-writing that line incorrectly, thus causing the service to not be able to parse the config. If you go look under "Diagnostics" menu, and then choose "Edit File", the file which I was able to edit, and get it running correctly is located under: /usr/pbi/bandwidthd-i386/bandwidthd/etc/bandwidthd.conf If you simply remove the offending "0" from line 30 (which is was for me under the interval section) it should work.
However, the easiest option was to simply clear that box from the web interface, and then click "Save". This should keep it from overwriting that line incorrectly, and that should work. Seeing as how the default is 0 according to the web interface, it shouldn't cause any issues.
-
Yes, 0 is the default, so no need to enter it.
I have enhanced the code that writes bandwidthd.conf - now it correctly passes through values like "0" into the conf file with the appropriate keyword prepended. That will take care of anyone who needs to put "0" or "0.0" (or similar values that evaluate to false in PHP) in a field and have it get through to the config - e.g. if your postgreSQL password was "0.0" you would have had a problem getting that through to the conf file!
bandwidthd package update will be available shortly after this pull request is committed:
https://github.com/pfsense/pfsense-packages/pull/565 -
e.g. if your postgreSQL password was "0.0" you would have had a problem getting that through to the conf file!
If that was your PostgreSQL password you have bigger problems than getting the value into the .conf file ;)
Thanks for fixing that, it's always annoying to find things in PHP that are quirky with 0. Like $t = "0"; empty($t) being true.