5 Replies Latest reply on Oct 17, 2012 1:35 PM by jboren

    ghettoVCBg2 will not run from crontab on vMA 5.1

    joeboren Novice

      Greetings,

       

      Recently upgraded our 4.1 environment to 5.1 all around, ESXi, Vcenter, and vMA.  Copied all ghettoVCBg2.pl and all my backup scripts over and fixed the version check and other issues in order to get it to run on 5.1.  Now it runs fine when executed from the console, but will not run from crontab.  No errors are reported, the cron log just shows that it started the script.  If i redirect std output in the crontab entry to a file, the file is created but empty.

       

       

      Here is the sanitized script that is called from the crontab to start the job.

       

      #!/bin/bash
      #
      LD_LIBRARY_PATH=/opt/vmware/vma/lib64:/opt/vmware/vma/lib
      export LD_LIBRARY_PATH
      PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/java/jre-vmware/bin:/sbin:/usr/sbin:/home/vi-admin/bin
      export PATH
      cd /home/vi-admin/ghettoVCBg2
      #
      /home/vi-admin/ghettoVCBg2/ghettoVCBg2.pl --vmlist /home/vi-admin/ghettoVCBg2/backup_lists/server --output /home/vi-admin/ghettoVCBg2/backup_logs/ghettoVCBg2-server.log
      #

       

      The ghettoVCBg2 log contains the following error (for each host server):

       

      10-12-2012 17:14:32 --  debug: Main: Login by vi-fastpass to: host.domain.local
      10-12-2012 17:14:40 --  warn: Unable to login to: host.domain.local - maybe offline or unreachable - skipping

       

      This worked fine under 4.1, works fine from the command line, just won't work from cron.  Anyone have any ideas what the issue is?

       

      Thanks,

      Joe