Unsolved

This post is more than 5 years old

82 Posts

1127

July 1st, 2013 01:00

crontab unable to execute replcnt.sh

Hello,

I am facing a weird issue on a gen 3 grid in which root's crontab is unable to run the replication report script /usr/local/avamar/etc/replcnt.sh. The following error is captured when it runs through cron:

SOURCE.....: avamar01

DESTINATION: avamar02

avmgr --hfsaddr=Avamar02 --id=repluser --ap=****** getl --path=/

ERROR:  Destination is not responding

Domain / Client Name                                   Source     Dest     Diff

==================================================== ======== ======== ========

Clients checked: 0

Clients out of sync: 0

If I run it manually, it works perfectly but not with crontab.

The same script is being used on another grid (which is on gen4) through root's crontab and it runs perfectly fine.

Can someone please help me out here ?

82 Posts

July 1st, 2013 05:00

I think I identified the pattern. Tried to run the report on another grid with same OS (kernel version) and avamar version.

Gen 3

Kernel = 2.6.9-89.ELsmp

Avamar = 6.0.2-153

And same error was received. Is there any issue related to Red Hat Linux not able to communicate the destination grid through root's crontab ?

82 Posts

July 1st, 2013 07:00

I narrowed it down further. It seems like crontab cannot execute "avmgr" commands and thus the script.

I have tried various options and flags with avmgr inside crontab, none of them works.

Again, manually the command runs. Possibly a bug, avmgr has with RHEL 2.6 ?

16 Posts

July 2nd, 2013 11:00

Based on the output you supplied in your first comment it looks like it ran avmgr but then returned no results.

If it is not running avmgr then you could try the full path name for it instead: /usr/local/avamar/bin/avmgr

Another alternative would be to load /etc/profile before running avmgr by doing 'source /etc/profile' that should load the proper environment variables needed to run it.

82 Posts

July 3rd, 2013 01:00

Thanks JBalentine, it indeed solved my problem. But it is amazing to see avmgr work when run manually (without full path), but not with cron.

Also, environment variables were already set in profile. So I replaced the occurrences of avmgr with /usr/local/avamar/bin/avmgr in the entire script and it worked !!

No Events found!

Top