More Zimbra problems…

I’ve just finished migrating zimbra from one server to a new one with much more RAM and much stronger CPU, and lots of IO bandwidth…

I’ve used this URL as a guide line for the move…

Everything went perfect and dandy, just as the book says !!!

I thought to myself “something must be wrong, things never go so smooth expect in dreams”… And what I thought was just right…

root@mail:~# su zimbra
zimbra@mail:/home/madmin$ zmcontrol start
Host mail.xxxxxx.xxx
        Starting ldap…Done.
        Starting logger…Done.
        Starting mailbox…Done.
        Starting antispam…Done.
        Starting antivirus…Done.
        Starting snmp…Done.
        Starting spell…Done.
        Starting mta…Done.
        Starting stats…Done.

but doing netstat to see what are ports are now open, it shows nothing, no IMAP, no POP, no web admin, nothing at all…

More over, in /var/log/zimbra.log

Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: antispam: Running
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: antivirus: Running
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: ldap: Running
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: logger: Running
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: mailbox: Stopped
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: mta: Running
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: snmp: Running
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: spell: Running
Mar  2 01:42:03 mail zimbramon[11235]: 11235:info: 2009-03-02 01:42:01, STATUS: mail.xxxxxx.xxx: stats: Running
Mar  2 01:42:24 mail zmmailboxdmgr[11786]: status requested
Mar  2 01:42:24 mail zmmailboxdmgr[11786]: stale pid 769 found in /opt/zimbra/log/zmmailboxd_manager.pid: No such process
Mar  2 01:42:24 mail zmmailboxdmgr[11786]: assuming no other instance is running
Mar  2 01:42:24 mail zmmailboxdmgr[11786]: file /opt/zimbra/log/zmmailboxd.pid does not exist
Mar  2 01:42:24 mail zmmailboxdmgr[11786]: assuming no other instance is running
Mar  2 01:42:24 mail zmmailboxdmgr[11786]: no manager process is running
Mar  2 01:42:25 mail zmmailboxdmgr[11848]: status requested
Mar  2 01:42:25 mail zmmailboxdmgr[11848]: stale pid 769 found in /opt/zimbra/log/zmmailboxd_manager.pid: No such process

Now this is more like it 😀

There must be a catch, somewhere…

Looking into /opt/zimbra/bin/zmmailboxdctl it seems to redirect its logs to /opt/zimbra/log/zmmailboxd.out

Opening this file showed the error crystal clear

Invalid initial heap size: -Xms6497m
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.

This value seems to be set on the fly during the start of zmmailboxd, and seems to be a function of the total system memory…

back into /opt/zimbra/bin/zmmailboxdctl I found these lines that set variable $jm

#
# Memory for use by JVM
#
memkb=$(zmsysmemkb)
jm=`expr $memkb ‘*’ ${mailboxd_java_heap_memory_percent} / 100 / 1024`

all I have to do now is set jm to a static value which I’m sure it will work just fine which is 2048 to be:

#
# Memory for use by JVM
#
memkb=$(zmsysmemkb)
jm=2048

now running /opt/zimbra/bin/zmmailboxdctl start, and watching all the logs (/var/log/zimbra.log and /opt/zimbra/log/zmmailboxd.out) just started everything just fine and all services came online just like a charm…

Once again, Problem Solved 🙂

Advertisements

One Response

  1. you are great man.
    I had similar problem with the java heap..
    you help me a lot.

    Thanks again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: