Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-16-2009, 09:07 AM
Active Member
 
Posts: 36
Default Bug: zmmyinit failing - and workaround

I prepared a fresh new server (Xserve 3GHz Xeon, 8GB RAM, OS X10.4, Zimbra 6.0.1 Network Edition) to become our new mailserver. And as I want to switch over the service from the current (mac mini) zimbra server, I was following the docs for switching servers, and restoring its contents from backups.

The (empty) server is running fine, I can log into the web frontend and zmcontrol reports everything as running.

To prepare the server for restore, I followed Backup and Restore and when it comes to re-initialising the mysql database, zmmyinit cannot connect to the re-created mysql, giving errors:

mail:~ zimbra$ /opt/zimbra/libexec/zmmyinit
* Creating required directories
* Generating mysql config /opt/zimbra/conf/my.cnf
* Creating database in /opt/zimbra/db/data
* Starting mysql server
* Failed to connect to mysql...retrying
* Failed to connect to mysql...retrying
(repeated until I hit CTRL-C)

Because my.cnf is created by the zmmyinitwith a ridiculously big innodb_buffer_pool_size of 2576980377 bytes. The mysql in 10.4 server is only a 32bit version (yes, that's how Apple does it, and to make matters worse, it's a Power PC version in a Xeon server), thus mysql of course has to fail (log(mysql_error.log):

mysqld(11372) malloc: *** set a breakpoint in szone_error to debug
mysqld(11372) malloc: *** vm_allocate(size=2576371712) failed (error code=3)
mysqld(11372) malloc: *** error: can't allocate region
mysqld(11372) malloc: *** set a breakpoint in szone_error to debug
mysqld(11372) malloc: *** vm_allocate(size=2576371712) failed (error code=3)
mysqld(11372) malloc: *** error: can't allocate region
mysqld(11372) malloc: *** set a breakpoint in szone_error to debug
InnoDB: Fatal error: cannot allocate the memory for the buffer pool

The culprit is line 73 in /opt/zimbra/libexec/zmmyinit:

mysql_memory_percent=${mysql_memory_percent:=30}

It uses 30% of available mem for mysql, which is not entirely a bad idea, but with 8GB RAM and only a 32Bit mysql ...
I just edited the number down to 5 and now it works.

Last edited by deltatango; 10-16-2009 at 09:15 AM..
Reply With Quote
  #2 (permalink)  
Old 10-16-2009, 09:40 AM
Moderator
 
Posts: 7,929
Default

Does MAC have /proc/cpuinfo ? A potential change in the script would be
Code:
grep "flags.* lm.*" /proc/cpuinfo
and if lm is present then its 64bit else 32bit. mysql_memory_percent could be adjusted accordingly then.
__________________
Reply With Quote
  #3 (permalink)  
Old 10-16-2009, 09:49 AM
Active Member
 
Posts: 36
Default

Quote:
Originally Posted by uxbod View Post
Does MAC have /proc/cpuinfo
Unfortunately not (is BSD). Still, a "uname -p" gives "i386" under 10.4, but it is highly misleading, as 10.4 and 10.5 are a wild mixture of 32bit and 64 bit binaries.

Then again, Zimbra for Mac is only available in 32Bit, thus no need for determining the architecture.
Reply With Quote
  #4 (permalink)  
Old 10-16-2009, 10:59 AM
Zimbra Employee
 
Posts: 604
Default

not quite sure why you are calling zmmyinit by hand and/or editing the script. When doing a production install via zmsetup.pl. zmmyinit --mysql_memory_percent 10 is invoked on mac based systems with more then 2GB of RAM instead of the default 30percent. If you need to invoke it by hand then you just need to pass in the correct percentage for you system.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #5 (permalink)  
Old 10-19-2009, 01:45 AM
Active Member
 
Posts: 36
Default

Quote:
Originally Posted by brian View Post
not quite sure why you are calling zmmyinit by hand and/or editing the script. When doing a production install via zmsetup.pl. zmmyinit --mysql_memory_percent 10 is invoked on mac based systems with more then 2GB of RAM instead of the default 30percent. If you need to invoke it by hand then you just need to pass in the correct percentage for you system.
Ok, thanks for clarification. The additional parameter wasn't documented in http://www.zimbra.com/docs/ne/4.5.10...1.html#1059814

And thus I ran into the problem described.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.