Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 2004 08:29:24 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        "Eric Crist" <ecrist@secure-computing.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: BandwidthD syntax error?
Message-ID:  <20040707082924.478bfc17.wmoran@potentialtech.com>
In-Reply-To: <001901c4641b$27fa34a0$6501a8c0@Nomad>
References:  <001901c4641b$27fa34a0$6501a8c0@Nomad>

next in thread | previous in thread | raw e-mail | index | archive | help
"Eric Crist" <ecrist@secure-computing.net> wrote:
> Hey all,
> 
> I just installed bandwidthd, and I get the following error when I try to
> run it from it's home directory:
> 
> Monitoring subnet 63.228.14.240 with netmask 255.255.255.248
> grog# Opening dc0
> Opening dc0
> Opening dc0
> Opening dc0
> Syntax Error "parse error" on line 40
> Syntax Error "parse error" on line 40
> Syntax Error "parse error" on line 40
> Syntax Error "parse error" on line 40
> 
> That's where it crashes.  If I try running it from /usr/local/etc/rc.d
> with the following command, I get the following error:
> 
> grog# sh /usr/local/etc/rc.d/bandwidthd.sh start
> Monitoring subnet 63.228.14.240 with netmask 255.255.255.248
>  bandwidthdgrog# Opening dc0
> Opening dc0
> Opening dc0
> Opening dc0
> Syntax Error "parse error" on line 40
> Syntax Error "parse error" on line 40
> Syntax Error "parse error" on line 40
> Syntax Error "parse error" on line 40
> 
> Now, this is the config file that is shipped with bandwidthd, with the
> only change being my personal IP information.  The other funny part:
> line 40 doesn't exist.  The last line in the document is 39.

I'm not familiar with bandwidthd, but I'm familiar with that type of error.

It seems most parsers generate an error referring to last line + 1 when they
fall off the end of the file without closing a block.  i.e. the parser
encountered a starting { but never found the closing } (This can hold true
for "", (), and probably many other grouping symbols)

So, the first thing to do is to check all your brackets and quotes and make
sure they're properly balanced.  Since it's only a 39 line config, it
shouldn't be too hard to track down.  If you find that it _is_ a problem
with the default config file, and not an error you introduced, you should
file a PR.

HTH

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040707082924.478bfc17.wmoran>