Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Mysql error - New Zimbra installation

  1. #1
    Join Date
    Dec 2010
    Posts
    4
    Rep Power
    4

    Default 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.

  2. #2
    Join Date
    Nov 2007
    Location
    Berkeley, CA
    Posts
    115
    Rep Power
    7

    Default

    delerium34,

    Did you ever solve this? And if so, how? I'm having the same problem.

    Any assistance greatly appreciated.

  3. #3
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by mlanner View Post
    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


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    Join Date
    Nov 2007
    Location
    Berkeley, CA
    Posts
    115
    Rep Power
    7

    Default

    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.

  5. #5
    Join Date
    Nov 2007
    Location
    Berkeley, CA
    Posts
    115
    Rep Power
    7

    Default

    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.

  6. #6
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    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?
    Last edited by phoenix; 12-10-2011 at 06:33 AM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    Join Date
    Nov 2007
    Location
    Berkeley, CA
    Posts
    115
    Rep Power
    7

    Default

    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

  8. #8
    Join Date
    Nov 2007
    Location
    Berkeley, CA
    Posts
    115
    Rep Power
    7

    Default

    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

  9. #9
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    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


    Acompli: A new adventure for Co-Founder KevinH.

  10. #10
    Join Date
    Nov 2007
    Location
    Berkeley, CA
    Posts
    115
    Rep Power
    7

    Default

    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?

Similar Threads

  1. Zimbra 6 on Ubuntu 8.04 x64 reverting to IPv6
    By nimble7 in forum Installation
    Replies: 1
    Last Post: 11-29-2010, 11:03 PM
  2. [SOLVED] Install Problem in Ubuntu 6.06 Server
    By xtimox in forum Installation
    Replies: 16
    Last Post: 03-27-2008, 09:36 AM
  3. /tmp filling
    By Nutz in forum Administrators
    Replies: 8
    Last Post: 02-22-2008, 01:00 AM
  4. Reliable Zimbra installation on Debian Etch?
    By holunde in forum Installation
    Replies: 7
    Last Post: 06-21-2007, 12:01 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 06:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •