Ubuntu & zmcontrol start/stop

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
mtk
Posts: 37
Joined: Sat Jun 21, 2014 1:00 am

Ubuntu & zmcontrol start/stop

Post by mtk »

Hi,

I am using Zimbra 8.7.1 on Ubuntu 14.04 (live) and 16.04 (testing).
To run backups through Veeam Endpoint for Linux I would like to stop Zimbra before the backup and start them once backup succeeded.
Therefor I generated two scripts:

Stop

Code: Select all

#!/bin/bash
sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
Start

Code: Select all

#!/bin/bash
sudo -u zimbra /opt/zimbra/bin/zmcontrol start
While stopping will run nicely, starting won't:

Code: Select all

Host zimbratest.local
        Starting ldap...Done.
        Starting zmconfigd...Done.
        Starting logger...Failed.
Starting logswatch...failed.


        Starting mailbox...Done.
        Starting memcached...Done.
        Starting proxy...Done.
        Starting amavis...Done.
        Starting antispam...Done.
        Starting antivirus...Done.
        Starting opendkim...Failed.
opendkim: /opt/zimbra/conf/opendkim.conf: ldap://zimbratest.local:389/?DKIMSelector?sub?(DKIMIdentity=$d): dkimf_db_open(): Connect error
Failed to start opendkim: 0


        Starting snmp...Done.
        Starting spell...Done.
        Starting mta...Done.
        Starting stats...Done.
        Starting service webapp...Done.
        Starting zimbra webapp...Done.
        Starting zimbraAdmin webapp...Done.
        Starting zimlet webapp...Done.
They won't work running the scripts from commandline:

Code: Select all

sudo ./zmcontrol_start.sh
This seems to be a particular problem with permissions or how Ubuntu is working.
Doing

Code: Select all

sudo /bin/bash
su zimbra
zmcontrol start
will work nicely.

Does anyone have an idea what could be wrong or where in the logs could be more output to retrieve the actual error?

Thanks in advance!
User avatar
DualBoot
Elite member
Elite member
Posts: 1326
Joined: Mon Apr 18, 2016 8:18 pm
Location: France - Earth
ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers
Contact:

Re: Ubuntu & zmcontrol start/stop

Post by DualBoot »

keep it simple :

Code: Select all

service zimbra stop
or

Code: Select all

service zimbra start
And for the log : /var/log/zimbra.log or /opt/zimbra/log/...
mtk
Posts: 37
Joined: Sat Jun 21, 2014 1:00 am

Re: Ubuntu & zmcontrol start/stop

Post by mtk »

DualBoot wrote:keep it simple :

Code: Select all

service zimbra stop
or

Code: Select all

service zimbra start
And for the log : /var/log/zimbra.log or /opt/zimbra/log/...
Worked! Thank you.
Post Reply