Zmconfigd
zmconfigd
Description
In the HELIX (7.x) version of ZCS, a new daemon "zmconfigd" replaces what was known as "zmmtaconfig" in previous versions. The goal was to implement a long-running Java process to handle configuration changes, rather than executing a new instance of a JVM process often. The primary bug number where this was implemented was the following:
Startup times are too long due to zmprov JVM instantiation [1] - FIXED: 7.0 Beta1
As of HELIX (7.x), the zmmtaconfig process is no longer available on the ZCS system.
Process
The zmconfigd process runs as a long-running JVM process. For example:
zimbra 3487 0.5 7.5 707508 154532 ? Sl Nov21 164:55 /opt/zimbra/java/bin/java -XX:ErrorFile=/opt/zimbra/log -client -Xmx256m -Dzimbra.home=/opt/zimbra -Djava.library.path=/opt/zimbra/lib -Djava.ext.dirs=/opt/zimbra/java/jre/lib/ext:/opt/zimbra/lib/jars:/opt/zimbra/lib/ext-common:/opt/zimbra/lib/ext/backup:/opt/zimbra/lib/ext/clamscanner:/opt/zimbra/lib/ext/network:/opt/zimbra/lib/ext/zimbra-license:/opt/zimbra/lib/ext/zimbrahsm:/opt/zimbra/lib/ext/zimbrasync -Djava.io.tmpdir=/opt/zimbra/data/tmp -Dpython.cachedir=/opt/zimbra/data/tmp/jython-cachedir org.python.util.jython /opt/zimbra/libexec/zmconfigd
zmconfigd also has a "watcher" process, that manages zmconfigd and ensures that it is running at all times on all ZCS nodes (LDAP master, LDAP replica, nginx proxy, MTA, mailstore, logger):
zimbra 12175 0.0 0.0 8996 844 pts/0 S 10:41 0:00 /bin/bash /opt/zimbra/bin/zmconfigdctl start
The zmconfigdctl and zmconfigd processes will be started/stopped automatically by zmcontrol.
zmconfigd can be manually restarted using the following steps:
# su - zimbra $ zmconfigdctl restart Stopping zmconfigdctl...success Stopping zmconfigd...done. Starting zmconfigd...done. Starting zmconfigdctl...success
or:
# su - zimbra $ zmconfigdctl stop Stopping zmconfigdctl...success Stopping zmconfigd...done. $ zmconfigdctl start Starting zmconfigd...done. $ Starting zmconfigdctl...success
Log
The zmconfigd log file is /opt/zimbra/log/zmconfigd.log and is rotated automatically by the zmconfigd process. Older versions of the log can be available at /opt/zimbra/log/zmconfigd.log.[0-9]
The zmconfigd pid file is /opt/zimbra/log/zmconfigd.pid
Configuration
In HELIX (7.x), zmconfigd uses the zmlocalconfig configurations matching "zmmtaconfig". The default settings are the following:
$ zmlocalconfig -x | grep zmmtaconfig zmmtaconfig_enable_config_restarts = true zmmtaconfig_interval = 60 zmmtaconfig_listen_port = 7171 zmmtaconfig_log_level = 3
If the localconfig (LC) key zmmtaconfig_watchdog_services exists, zmconfigd will watch whatever services are defined in that list. Otherwise, it will watch only "antivirus" (that's the default). Watching anything *other* than antivirus is not recommended.
In IronMaiden (8.x), the zmmtaconfig* keys are replaced with zmconfigd* keys.
Important Bug Fixes
There were some important bug fixes related to zmconfigd in 7.1.1 Patch 2 through 7.1.3. Prior to these fixes, zmconfigd could stop or cause mailboxd or amavisd to restart unexpectedly, and are important. These fixes include:
- Upgrade to Jython 2.5.2 [2] - FIXED 7.1.1 Patch 2, 7.1.2
- zmconfigd stop AS/AV if archiving is installed but not enabled [3] - FIXED 7.1.1 Patch 2, 7.1.2
- jython tmp dir should be /opt/zimbra/data/tmp [4] - FIXED 7.1.2
- zmconfigd can restart antivirus when zmcontrol stop is issued [5] - FIXED 7.1.3
- zmconfigd memory usage [6] - FIXED 7.1.3