EzyMailHostingAdministration

Zimbra JVM issue with OpenVZ

If you run Zimbra on OpenVZ, the zimbra service may fail to start with errors like those below.


Notification skipped
Starting servers...Could not create the Java virtual machine.
Unable to determine enabled services from ldap.
Enabled services read from cache. Service list may be inaccurate.
sh: zmcontrol.status.zMdWQ: Permission denied
sh: zmcontrol.status.zMdWQ: Permission denied
sh: zmcontrol.status.zMdWQ: Permission denied
sh: zmcontrol.status.zMdWQ: Permission denied
sh: zmcontrol.status.zMdWQ: Permission denied
sh: zmcontrol.status.zMdWQ: Permission denied
done.
Setting up zimbra crontab...done.

This problem is usually caused by assigning insufficient memory. To resolve it, increase the container’s memory until it can operate. Run the following commands to increase the container’s memory:

[root@Ezymailhosting ~]# vzctl set CID --vmguarpages XG --save
[root@Ezymailhosting ~]# vzctl set CID --privvmpages XG:YG  --save

where CID is the Container ID. X is the new amount of Memory assigned. Y is the amount of Memory available for bursting. To check whether you have increased it sufficiently, use this command:

[root@Ezymailhosting ~]# vzctl exec CID cat /proc/user_beancounters
Version: 2.5
    uid  resource              held      maxheld        failcnt
    CID: kmemsize          11266888     14778368             6
         lockedpages              0            0             0
         privvmpages         290231       524167          3958
         shmpages               129          129             0
         dummy                    0            0  ...        0
         numproc                 74          123             0
         physpages           484125       537642             0
         vmguarpages              0            0             0
         oomguarpages        104950       106891             0
         numtcpsock              17           32             0
         numflock                 7           15             0
         numpty                   1            2             0
         numsiginfo               0           24             0
         tcpsndbuf           209280       257632  ...        0
         tcprcvbuf           212992      1869520            81
         othersockbuf        158240       188016             0
         dgramrcvbuf              0         8720             0
         numothersock           156          174             0
         dcachesize         1846788      3624960             0
         numfile                906         1325             0
         dummy                    0            0  ...        0
         dummy                    0            0             0
         dummy                    0            0             0
         numiptent               20           20             0

Look at the last column, “failcnt”. All values must be 0. Otherwise, there is a memory allocation problem that may cause the container to malfunction. If this does not resolve the problem, try adding the settings below to /opt/zimbra/conf/localconfig.xml. These may help in some cases, but none of these settings are recommended for production use; use them only on a test machine.

<key name="zimbra_zmjava_options">
     <value>-Xms128m -Xmx128m</value>
</key>
EOF.← Back to articles