| 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.
|  | | 
05-23-2011, 04:09 PM
| | | Mysql error - New Zimbra installation Hi,
I just install Zimbra on a new server and everything went well. But I can't acces the website (both http/https). I check in the mailbox.log and I have the following errors:
Caused by: java.sql.SQLException: Access denied for user 'zimbra'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:1075)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:3566)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:3498)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:919)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java: 4004)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:12 84)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(C onnectionImpl.java:2172)
... 56 more
My guess is that the zimbra user is not authorized to log into the database, but I don't why, and how to fix this.
Anyone have an idea?
Thanks, appreciated. | 
12-10-2011, 02:39 AM
| | Special Member | |
Posts: 114
| | delerium34,
Did you ever solve this? And if so, how? I'm having the same problem.
Any assistance greatly appreciated. | 
12-10-2011, 03:05 AM
| | Zimbra Consultant & Moderator | |
Posts: 20,314
| | Quote:
Originally Posted by mlanner Did you ever solve this? And if so, how? I'm having the same problem.  | How about some further information about the problem? Log file entries? New install or an upgrade or your current installation? ZCS version and release? Has it just happened? Which operating system? What have you tried to resolve the problem? What's the status of the services?
Did you look at some of the forums threads on this topic: http://search.yahoo.com/search?p=sit...UTF-8&fr=moz35
__________________
Regards
Bill
| 
12-10-2011, 04:04 AM
| | Special Member | |
Posts: 114
| | Bill,
This is a migration from a 32-bit machine to a 64-bit Ubuntu 10.04 machine. I've followed the Network Edition: Moving from 32-bit to 64-bit Server - Zimbra :: Wiki and Platform and OS Independent ZCS to ZCS Migration Using Rsync - Zimbra :: Wiki instructions. The 64-bit installation is fine, until I restore LDAP, after that it craps out.
And when checking Zimbra status, I get: Code: zimbra@mail:~$ zmcontrol status
Host mail.domain.com
antispam Running
antivirus Running
convertd Running
ldap Running
logger Running
mailbox Stopped
zmmailboxdctl is not running.
mta Running
snmp Running
spell Running
stats Running My mailbox.log provides the following: Code: 2011-12-10 01:11:03,432 WARN [main] [] misc - Could not establish a connection to the database. Retrying in 5 seconds.
com.zimbra.common.service.ServiceException: system failure: getting database connection
ExceptionId:main:1323508263432:54e1ffc754a39254
Code:service.FAILURE
at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:248)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java:313)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java:277)
at com.zimbra.cs.db.DbPool.waitForDatabase(DbPool.java:199)
at com.zimbra.cs.db.DbPool.startup(DbPool.java:190)
at com.zimbra.cs.util.Zimbra.startup(Zimbra.java:156)
at com.zimbra.cs.util.Zimbra.startup(Zimbra.java:123)
at com.zimbra.soap.SoapServlet.init(SoapServlet.java:125)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1254)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:471)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.handler.DebugHandler.doStart(DebugHandler.java:127)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:158)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user 'zimbra'@'localhost' (using password: YES)'.
** BEGIN NESTED EXCEPTION **
java.sql.SQLException
MESSAGE: Access denied for user 'zimbra'@'localhost' (using password: YES)
STACKTRACE:
java.sql.SQLException: Access denied for user 'zimbra'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2924)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:68)
at com.zimbra.cs.db.ZimbraConnectionFactory.createConnection(ZimbraConnectionFactory.java:66)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java:294)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java:277)
at com.zimbra.cs.db.DbPool.waitForDatabase(DbPool.java:199)
at com.zimbra.cs.db.DbPool.startup(DbPool.java:190)
at com.zimbra.cs.util.Zimbra.startup(Zimbra.java:156)
at com.zimbra.cs.util.Zimbra.startup(Zimbra.java:123)
at com.zimbra.soap.SoapServlet.init(SoapServlet.java:125)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1254)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:471)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.handler.DebugHandler.doStart(DebugHandler.java:127)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServer.java:158)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
** END NESTED EXCEPTION **
Attempted reconnect 3 times. Giving up.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2997)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:68)
at com.zimbra.cs.db.ZimbraConnectionFactory.createConnection(ZimbraConnectionFactory.java:66)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java:294)
... 39 more However, when trying to log in to MySQL using: Code: [zimbra@myhost ~]$ mysql mysql OR Code: [zimbra@myhost ~]$ mysql zimbra ... it works just fine logging in. | 
12-10-2011, 05:28 AM
| | Special Member | |
Posts: 114
| | I started from scratch ... again. Clean install of 6.0.14 on Ubuntu 10.04. After installation, Zimbra runs fine. I then shut down Zimbra. When I restore the LDAP-config by running: Code: root@mail:/# /opt/zimbra/openldap/sbin/slapadd -q -n 0 -F /opt/zimbra/data/ldap/config -cv -l /backup/ldap-config.bak I get the following: Code: slapadd: could not add entry dn="cn=config" (line=1):
slapadd: could not add entry dn="cn=module{0},cn=config" (line=41):
slapadd: could not add entry dn="cn=schema,cn=config" (line=57):
slapadd: could not add entry dn="cn={0}core,cn=schema,cn=config" (line=912):
slapadd: could not add entry dn="cn={1}cosine,cn=schema,cn=config" (line=1143):
slapadd: could not add entry dn="cn={2}inetorgperson,cn=schema,cn=config" (line=1308):
slapadd: could not add entry dn="cn={3}zimbra,cn=schema,cn=config" (line=1348):
slapadd: could not add entry dn="cn={4}amavisd,cn=schema,cn=config" (line=6580):
slapadd: could not add entry dn="olcDatabase={-1}frontend,cn=config" (line=6712): Already exists
slapadd: could not add entry dn="olcDatabase={0}config,cn=config" (line=6732): Already exists
database init failed (monitor)
olcDatabase: value #0: only one monitor database allowed (monitor)
slapadd: could not add entry dn="olcDatabase={1}monitor,cn=config" (line=6750):
slapadd: could not add entry dn="olcDatabase={2}hdb,cn=config" (line=6768): Already exists
_#################### 100.00% eta none elapsed none fast!
Closing DB... That doesn't look right to me. | 
12-10-2011, 05:33 AM
| | Zimbra Consultant & Moderator | |
Posts: 20,314
| | As you've mentioned two wiki articles in your earlier post I have to ask, the only instructions you should be following are these: Network Edition: Moving from 32-bit to 64-bit Server - Zimbra :: Wiki - is that what you're doing?
__________________
Regards
Bill
Last edited by phoenix; 12-10-2011 at 06:33 AM..
| 
12-10-2011, 05:52 AM
| | Special Member | |
Posts: 114
| | Yes, that's what I did the first time. Did not work. I used those same directions previously, on another host that I migrated. It worked fine. This time around, not so much, although I'm doing it the exact same way. :S | 
12-10-2011, 06:07 AM
| | Special Member | |
Posts: 114
| | Here are my exact steps:
On OLD host: Code: mkdir /backup
chown zimbra:zimbra /backup
As zimbra:
/opt/zimbra/libexec/zmslapcat /backup
/opt/zimbra/libexec/zmslapcat -c /backup On NEW host: Code: mkdir /backup
chown zimbra:zimbra /backup
rm -rf /opt/zimbra/data/ldap/config/*
rm -rf /opt/zimbra/data/ldap/hdb/*
mkdir -p /opt/zimbra/data/ldap/hdb/db /opt/zimbra/data/ldap/hdb/logs On OLD host: Code: rsync -avz -e ssh --progress /opt/zimbra/data/ldap/hdb/db/DB_CONFIG root@[ip-address]:/opt/zimbra/data/ldap/hdb/db On NEW host: Code: chown -R zimbra:zimbra /opt/zimbra/data/ldap On OLD host: Code: rsync -avz -e ssh --progress /backup/ root@[ip-address]:/backup On NEW host: Code: /opt/zimbra/openldap/sbin/slapadd -q -n 0 -F /opt/zimbra/data/ldap/config -cv -l /backup/ldap-config.bak
/opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv -l /backup/ldap.bak | 
12-10-2011, 06:35 AM
| | Zimbra Consultant & Moderator | |
Posts: 20,314
| | This is a test server you're using, isn't it? On the new server, shutdown ZCS and try the following command and see what you get with that: Code: /opt/zimbra/libexec/zmmyinit
__________________
Regards
Bill
| 
12-10-2011, 09:33 AM
| | Special Member | |
Posts: 114
| | Well, test server or not ... I guess you can call it that ... but if everything went well during migration, the "NEW" host wouldn't be a test server. If the "NEW" server came up properly, it would become the new production server and the "OLD" server would be turned off, retired and eventually erased.
Basically, to turn the scenario and thinking around a bit, I guess it might be useful to look at the situation as a case with a completely dead production server, one that has a perfectly good Zimbra NE generated backup on remote storage. Now, how would I go about restoring to a new server, assuming that I have a good backup? | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |