Running Bro 2.2 under FreeBSD 10 host, "broctl cron" task returns me
the following error every hour:
warning: cannot get list of local IP addresses
error: script must be run on manager node
This is a Bro manager node controlling two Bro workers nodes.
What can be the problem?? I have revised node.cfg and broctl.cfg and
all its ok...
You get that error when the `local-interfaces` script fails.
What happens if you run
Here it is:
root@testbro:~ # /nsm/bro/share/broctl/scripts/local-interfaces
Nothing strange in my opinion ... In ode.cfg I use IP 172.17.24.1 to
connect to other workers ...
Yep, that's what it is supposed to do.. bro tries to fix the path in
so ifconfig can be found, but I wonder if it is not finding sed on your
system. Can you double check what your PATH is in the shell vs. what
it is for cron jobs?
PATH in cron:
crontab entry is:
59 * * * * root /nsm/bro/bin/broctl cron
In my shell:
sed: /usr/bin/sed /usr/share/man/man1/sed.1.gz /usr/src/usr.bin/sed
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
Uhmmm... I don't see where is the problem ...
I think the problem is that "bash" (probably located in /usr/local/bin)
is not found when broctl runs in a cron job. Probably the easiest fix
is to create a symlink to bash in either /bin or /usr/bin.
You might also need to make a symlink to python (broctl
requires both bash and python).
Hmm, if you run broctl cron from the shell, does it work?
Ok, problem solved. I have created a custom script exporting PATH
variable and all works ok.
Many thanks for your help.