I'm running into a really strange problem and I'm out of ideas. The good thing is I've been able to reproduce this problem both in my production and VM environments.
I'm trying to use a bash script to stop, and start zimbra via the crontab.
But what happens is, when zimbra starts, some of the services fail to load. I have to manually retry zmcontrol stop/start several times to everything to load fine again.
IF I run the same script manually, everything works just fine. Any help would be appreciated.
Here is my simple script being run as the zimbra user:
/opt/zimbra/bin/zmcontrol stop > /opt/scripts/zmcontrol_stop.out
#Wait 45 sec for all services to properly shut down
/opt/zimbra/bin/zmcontrol start > /opt/scripts/zmcontrol_start.out
Output of zmcontrol_stop.out
[zimbra@gp-sf1-xen01-centos scripts]$ tail -f zmcontrol_stop.out
Output of zmcontrol_start.out
Again, if I run this script manually as the zimbra user, everything works perfectly fine.
[zimbra@gp-sf1-xen01-centos scripts]$ tail -f zmcontrol_start.out
Both VM and production environments are running zimbra 7.1.3 under CentOS in a XEN virtual environment