[Bro] Errors with broctl cron

C. L. Martinez carlopmart at gmail.com
Tue Mar 11 03:32:02 PDT 2014


Ok, problem solved. I have created a custom script exporting PATH
variable and all works ok.

Many thanks for your help.

On Mon, Mar 10, 2014 at 5:13 PM, Daniel Thayer <dnthayer at illinois.edu> wrote:
> On 03/10/2014 10:39 AM, C. L. Martinez wrote:
>>
>> On Mon, Mar 10, 2014 at 3:34 PM, Justin Azoff <JAzoff at albany.edu> wrote:
>>>
>>> On Mon, Mar 10, 2014 at 03:16:09PM +0000, C. L. Martinez wrote:
>>>
>>>> Here it is:
>>>>
>>>> root at testbro:~ # /nsm/bro/share/broctl/scripts/local-interfaces
>>>> 10.196.0.103
>>>> fe80::5054:ff:fe91:3813
>>>> 172.17.22.1
>>>> fe80::5054:ff:fec4:d17f
>>>> 172.17.23.1
>>>> fe80::5054:ff:fe1a:3c94
>>>> 172.17.24.1
>>>> fe80::5054:ff:fe69:9e59
>>>> ::1
>>>> fe80::1
>>>> 127.0.0.1
>>>>
>>>> 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
>>> that script:
>>>
>>>      export PATH=$PATH:/sbin:/usr/sbin
>>>
>>> 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:
>>
>> PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
>>
>> crontab entry is:
>>
>> 59      *       *       *       *       root    /nsm/bro/bin/broctl cron
>>
>> In my shell:
>>
>>
>> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/nsm/bro/bin
>>
>> 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
>> /usr/src/sbin/ifconfig
>>
>>
>> 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).
>



More information about the Bro mailing list