Page 2 of 2

This happe

Posted: Wed Oct 17, 2007 10:35 pm
by jholder
Stop mysql
su - zimbra

logmysql.server stop
su - root

rm -rf /opt/zimbra/logger/db/data/*

chown zimbra:zimbra /opt/zimbra/db/data

chmod 775 /opt/zimbra/db/data

cd /opt/zimbra/libexec

./zmloggerinit
Let's see what happens.

This happe

Posted: Thu Oct 18, 2007 3:28 am
by marklindley
Hi John,
:D
Previously I had tried what I am going to post as the fix but I didn't remove the data dir. I can understand that you wouldn't want to do this if you had a lot of data but my scenario was I had nothing to lose.
Process for fixing the below error is really simple actually:
1. as root rm -rf /opt/zimbra/db/data (you will lose any data you have)

2. rerun the ./install.sh in the zcs dir and upgrade. This will keep you existing config.
3. To check the logger is running:

su zimbra

zmcontrol status
4. Now login to the admin panel and hey presto! the server status is working.


Thanks guys for you help .... it made me think about what was actually happening and learned a lot about zimbra.


"mailserver.err" 50L, 2487C 18,1 Top

InnoDB: The first specified data file ./ibdata1 did not exist:

InnoDB: a new database to be created!

071017 18:04:57 InnoDB: Setting file ./ibdata1 size to 10 MB

InnoDB: Database physically writes the file full: wait...

071017 18:04:58 InnoDB: Log file ./ib_logfile0 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile0 size to 5 MB

InnoDB: Database physically writes the file full: wait...

071017 18:04:58 InnoDB: Log file ./ib_logfile1 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile1 size to 5 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Doublewrite buffer not found: creating new

InnoDB: Doublewrite buffer created

InnoDB: Creating foreign key constraint system tables

InnoDB: Foreign key constraint system tables created

071017 18:04:58 InnoDB: Started; log sequence number 0 0

071017 18:04:58 [ERROR] Can't start server : Bind on unix socket: Permission denied

071017 18:04:58 [ERROR] Do you already have another mysqld server running on socket: /opt/zimbra/logger/db/mysql.sock ?

071017 18:04:58 [ERROR] Aborting
071017 18:04:58 InnoDB: Starting shutdown...
PS John
There is a step missing from the process. You can't chown as the dir is not there because you have removed it. I ran mkdir data then the chown but it didn't work either.
su - root

rm -rf /opt/zimbra/db/data

chown -R zimbra:zimbra /opt/zimbra/db/data

chmod -R 775 /opt/zimbra/db/data

cd /opt/zimbra/libexec

/zmloggerinit

This happe

Posted: Thu Oct 18, 2007 12:22 pm
by mmorse
-even we make mistakes sometimes :)

This happe

Posted: Fri Oct 19, 2007 11:51 pm
by jholder
[quote user="marklindley"]
PS John
There is a step missing from the process. You can't chown as the dir is not there because you have removed it. I ran mkdir data then the chown but it didn't work either.
su - root

rm -rf /opt/zimbra/db/data

chown -R zimbra:zimbra /opt/zimbra/db/data

chmod -R 775 /opt/zimbra/db/data

cd /opt/zimbra/libexec

/zmloggerinit[/quote]

Nice catch! :)

This happe

Posted: Fri Oct 26, 2007 11:58 am
by ppearl
[quote user="jholder"]Stop mysql
su - zimbra

logmysql.server stop
su - root

rm -rf /opt/zimbra/db/data/*

chown zimbra:zimbra /opt/zimbra/db/data

chmod 775 /opt/zimbra/db/data

cd /opt/zimbra/libexec

./zmloggerinit
Let's see what happens.[/QUOTE]
Shouldn't that be /opt/zimbra/logger/db/... if we're re-initializing the logger data instead of /opt/zimbra/db/... ? Maybe I'm missing something.
I was talking to someone who followed this procedure but this didn't resolve their problem... although I'm not 100% sure what the original problem was as I was late to the party.
Regardless, after following this procedure it appeared their passwords in the localconfig was different than the passwords in the logger db. I followed the Resetting LDAP & MySQL Passwords - Zimbra :: Wiki procedure to sync the mysql passwords with the values in the config and things worked again.

This happe

Posted: Fri Oct 26, 2007 12:04 pm
by jholder
YES! You're exactly right!
Sorry about that!

This happe

Posted: Tue Feb 26, 2008 12:17 am
by newmember
So here is what I did:


Log in and stop zimbra process:

su zimbra

zmcontrol stop
Change user:

su root
Checked for processes and killed what was left running:

ps auxww | grep zimbra

ps auxww | grep mysql
Remove old data:

rm -rf /opt/zimbra/logger/db/
Setup directories with correct permissions and access:

chown -R zimbra:zimbra /opt/zimbra/logger/db/

chmod -R 775 /opt/zimbra/logger/db/
Reset password and database:

/opt/zimbra/libexec/zmloggerinit
Change user:

su zimbra
Start Zimbra:

zmcontrol start


All good?

zmcontrol start
[QUOTE]zimbra@mail log]$ zmcontrol start

Host mail.domain.com

Starting ldap...Done.

Starting logger...Done.

Starting mailbox...Done.

Starting antispam...Done.

Starting antivirus...Done.

Starting snmp...Done.

Starting spell...Done.

Starting mta...Done.

[zimbra@mail log][/QUOTE]

This happe

Posted: Wed Mar 19, 2008 10:30 pm
by 1319arion
[quote user="jholder"]Hi Mark-

This is honestly a shot in the dark, but we restrict access to the mysqldb to localhost for security. If there isn't a localhost adapter, then that can cause your issue. I've seen this in particular on Virtual Machines like Xen.
What does ifconfig show?[/QUOTE]
For those of us using virtual machine technologies like Xen and linux-vservers, is there a way we can change the localhost security restriction? My Zimbra installation is on a linux-vservers system and I'm doing my firewalling on the host OS so I'm not worried about limiting connections to localhost inside the virtual machine. Also, linux-vservers doesn't really have a proper localhost (which has lead to plenty of other issues that I've already worked around...). How can I add proper MySQL GRANT line to allow access from an IP address? i.e.:
GRANT ALL ON zimbra_logger.* TO 'zimbra'@'x.x.x.x' IDENTIFIED BY 'zimbra';
Would that do the trick? Any info/help would be appreciated.
-Arion

This happe

Posted: Thu Mar 20, 2008 11:44 am
by 1542brian
I'm not quite what problem you are trying to solve but your grant statement should work as long as your "identified by" passwd matches the zcs localconfig key zimbra_logger_mysql_passwd.

This happe

Posted: Fri Mar 21, 2008 6:09 pm
by 1319arion
[quote user="1542brian"]I'm not quite what problem you are trying to solve but your grant statement should work as long as your "identified by" passwd matches the zcs localconfig key zimbra_logger_mysql_passwd.[/QUOTE]
I've had a Zimbra install operating in a linux-vserver instance for quite a while now (since 4.0.x days), but logging has *never* worked properly. Since Zimbra hobbles along without the logger, I've been making do. The root of the problem is that linux-vserver virutal machines have a very screwuy localhost setup. They don't really have a "lo" device or a loopback address. When a program inside of a linux-vserver tries to bind to "0.0.0.0", vservers intercepts the call and makes it bind to a specific IP address (one that the vserver instance has access to). So, things that rely on binding to and connecting to localhost often break. There is a Zimbra Wiki page that talks about vserver installs, but I'm not sure if anyone has been able to get logging to work properly...
Although "zmcontrol status" says that logger is running and operating properly, when I use the Zimbra Admin interface, I get the error message identified at the beginning of this thread:
Message: Csfe service error

Error code: service.FAILURE

Method: ZmCsfeCommand.invoke

Details:system failure: getting database logger connection
My log file for the logger mysql instance doesn't show anything out of the ordinary. As far as the loggermysqld is concerned, it thinks it was able to bind to localhost. However, it was actually forced to bind to a specific IP because of vservers:
osaka:/opt/zimbra/logger/db/data# netstat -a -n --inet | grep 7307

tcp 0 0 123.123.123.123:7307 0.0.0.0:* LISTEN
So, I'm guessing that the error above it related to the fact that the Zimbra Admin system is trying to connect to localhost or that mysql access control is trying to restrict things to 'zimbra'@'localhost' even though thats not necessarily valid.
I guess I'm still trying to puzzle this whole situation out. Frankly, linux-vservers are really starting to annoy me, but unfortunately I have no choice but to run inside of a virtual machine. The screwy network problems with vservers has me wanting to look at alternate solutions like OpenVZ. Oh well.
Any help or ideas of what I should try would be appreciated.
Thanks,

Arion