We have a Zimbra installation in a virtual environment. (CentOS)
And to make a long story short we had some resource constraints that were giving the Zimbra server a hard time. I fixed the resource problem, but Zimbra was still acting weird, so I decided to reboot.
During reboot, the system displayed a black screen that said "System is Restarting".
I waited for quite some time before guessing that the system was hung, so I did a hard reboot.
When the system came back up, some of the zimbra services weren't starting like the logwatch, and noticed that the connections to the database were failing.
Assuming corruption, I started in trying to follow the database recovery steps, but the thing is... the database was starting but connections were being rejected.
If I looked in the mysql log, the last line would read:
120502 9:48:21 [Note] /opt/zimbra/mysql/libexec/mysqld: ready for connections.
Version: '5.1.58-log' socket: '/opt/zimbra/db/mysql.sock' port: 7306 Source distribution
Soo... the database is up?
But if I would try to connect to the database, even using the zimbra tools, I would get the following message:
[root@zimbra1 bin]# sudo -u zimbra ./zmmysqlstatus
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Now, it's obvious that zimbra is trying to connect using a different socket than the database is actually listening on.
Why? No clue.
Looking in /opt/zimbra/conf/my.cnf
the socket is clearly specified as /opt/zimbra/db/mysql.sock
Why Zimbra now wants to use the /var directory is beyond me.
So I went into /var/lib ... created a directory called 'mysql' and then made a symbolic link to mysql.sock in the /opt/zimbra/conf directory, and after a reboot, everything works again.
Why would zimbra refuse to listen to it's own configuration and opt for something that never existed?