Results 1 to 5 of 5

Thread: [SOLVED] NE resource deleted, can't be restored, mysql contstraing violations

  1. #1
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    717
    Rep Power
    9

    Default [SOLVED] NE resource deleted, can't be restored, mysql contstraing violations

    Actual problem: 5.0.2 backups can't be restored to 5.0.4 server. Keep reading.

    So I just accidentally deleted a resource account, which was sharing a global calendar to almost every user on the system.

    zmrestore attempts fail with "Error code: service.FAILURE Message: system failure: restoring table: mailbox Details:soap:Receiver"

    Help!!!

    I've mitigated the impact on users by disabling the minicalendar and zmmailbox df all mountpoints to the global calendar, but still getting zillions of these:

    Code:
    ExceptionId:btpool0-2082:1206550663127:e2052f28a0145c52
    Code:service.FAILURE
            at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.j
    ava:253)
            at com.zimbra.cs.db.DbMailbox.createMailbox(DbMailbox.java:182)
            at com.zimbra.cs.mailbox.MailboxManager.createMailbox(MailboxManager.jav
    a:669)
            at com.zimbra.cs.mailbox.MailboxManager.getMailboxByAccountId(MailboxMan
    ager.java:290)
            at com.zimbra.cs.mailbox.MailboxManager.getMailboxByAccountId(MailboxMan
    ager.java:226)
            at com.zimbra.soap.DocumentHandler.getRequestedMailbox(DocumentHandler.j
    ava:157)
            at com.zimbra.cs.service.mail.MailDocumentHandler.preHandle(MailDocument
    Handler.java:46)
            at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEngine.java:387)
            at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:250)
            at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:156)
            at com.zimbra.soap.SoapServlet.doPost(SoapServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:177)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
    )
            at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
    Handler.java:1093)
            at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
    
            at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
            at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
    Handler.java:1084)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
    60)
            at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
    a:216)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
    81)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
    16)
            at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:406)
    
            at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
    lerCollection.java:211)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
    java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
    39)
            at org.mortbay.jetty.handler.RewriteHandler.handle(RewriteHandler.java:1
    76)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
    39)
            at org.mortbay.jetty.Server.handle(Server.java:313)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
    6)
            at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
    n.java:844)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
    va:396)
            at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
    .java:442)
    Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
     Duplicate entry 'fc5cfd24-e9c6-449d-b20c-2c46f130ed83' for key 2
    
    Query being executed when exception was thrown:
    
    com.mysql.jdbc.ServerPreparedStatement[68421] - INSERT INTO mailbox(account_id,
    id, group_id, index_volume_id, item_id_checkpoint, last_backup_at, comment) SELE
    CT 'fc5cfd24-e9c6-449d-b20c-2c46f130ed83', next_mailbox_id, 0, index_volume_id,
    255, null, 'wsgcal@example.com' FROM current_volumes ORDER BY index_volume_id L
    IMIT 1
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
            at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedSt
    atement.java:1160)
            at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPrepared
    Statement.java:685)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :1400)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :1314)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :1299)
            at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Del
    egatingPreparedStatement.java:233)
            at com.zimbra.cs.db.DbMailbox.createMailbox(DbMailbox.java:137)
            ... 35 more
    2008-03-26 11:57:43,130 ERROR [btpool0-2082] [name=wsgcal@example.com;aname=cmi
    ller@example.com;ip=137.22.128.119;ua=Zimbra iSync Connector/5.0.1971 (Mac OS X
     1049);] mailbox - Error during mailbox creation
    com.zimbra.common.service.ServiceException: system failure: writing new mailbox
    row for account fc5cfd24-e9c6-449d-b20c-2c46f130ed83
    ExceptionId:btpool0-2082:1206550663130:e2052f28a0145c52
    Code:service.FAILURE
            at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.j
    ava:253)
            at com.zimbra.cs.db.DbMailbox.createMailbox(DbMailbox.java:182)
            at com.zimbra.cs.mailbox.MailboxManager.createMailbox(MailboxManager.jav
    a:669)
            at com.zimbra.cs.mailbox.MailboxManager.getMailboxByAccountId(MailboxMan
    ager.java:290)
            at com.zimbra.cs.mailbox.MailboxManager.getMailboxByAccountId(MailboxMan
    ager.java:226)
            at com.zimbra.soap.DocumentHandler.getRequestedMailbox(DocumentHandler.j
    ava:157)
            at com.zimbra.soap.SoapEngine.generateResponseHeader(SoapEngine.java:483
    )
            at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:283)
            at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.java:156)
            at com.zimbra.soap.SoapServlet.doPost(SoapServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:177)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
    )
            at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
    Handler.java:1093)
            at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
    
            at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
            at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
    Handler.java:1084)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
    60)
            at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
    a:216)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
    81)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
    16)
            at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:406)
    
            at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
    lerCollection.java:211)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
    java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
    39)
            at org.mortbay.jetty.handler.RewriteHandler.handle(RewriteHandler.java:1
    76)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
    39)
            at org.mortbay.jetty.Server.handle(Server.java:313)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
    6)
            at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
    n.java:844)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
    va:396)
            at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
    .java:442)
    Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
     Duplicate entry 'fc5cfd24-e9c6-449d-b20c-2c46f130ed83' for key 2
    
    Query being executed when exception was thrown:
    
    com.mysql.jdbc.ServerPreparedStatement[68421] - INSERT INTO mailbox(account_id,
    id, group_id, index_volume_id, item_id_checkpoint, last_backup_at, comment) SELE
    CT 'fc5cfd24-e9c6-449d-b20c-2c46f130ed83', next_mailbox_id, 0, index_volume_id,
    255, null, 'wsgcal@example.com' FROM current_volumes ORDER BY index_volume_id L
    IMIT 1
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
            at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedSt
    atement.java:1160)
            at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPrepared
    Statement.java:685)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :1400)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :1314)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
    :1299)
            at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Del
    egatingPreparedStatement.java:233)
            at com.zimbra.cs.db.DbMailbox.createMailbox(DbMailbox.java:137)
            ... 34 more
    Last edited by Rich Graves; 03-27-2008 at 09:47 AM.

  2. #2
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    717
    Rep Power
    9

    Default

    Account exists but is wedged:

    $ zmmailbox -z -m wsgcal
    ERROR: service.FAILURE (system failure: writing new mailbox row for account fc5cfd24-e9c6-449d-b20c-2c46f130ed83)

  3. #3
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    717
    Rep Power
    9

    Default

    Or deleted:

    $ zmprov da wsgcal
    ERROR: service.FAILURE (system failure: writing new mailbox row for account fc5cfd24-e9c6-449d-b20c-2c46f130ed83)

  4. #4
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    717
    Rep Power
    9

    Default 5.0.2 backups can't be restored to 5.0.4 server

    Marking thread is solved.

    If the subject line of this response is news to you, beware!!!

    I'm upgrading my test system to from 5.0.1 to 5.0.2, then mounting the SAN snapshot taken right before the 5.0.4 upgrade, then either imapsyncing/RESTing or upgrading the 5.0.2 test system to 5.0.4 and swapping backup directories.

    Lessons:

    1) Take a full backup ASAP after any upgrade, even minor patch releases

    2) If you're relying on a SAN snapshot of store/db/index/etc. for failback, make sure you have the base platform installed with the correct version before going forward.

  5. #5
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    20

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  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. DNS Questions and Trouble Installing
    By smurraysb in forum Installation
    Replies: 22
    Last Post: 03-14-2008, 03:27 PM
  4. Deleted files not freeing their handle in /tmp
    By Centurion in forum Administrators
    Replies: 5
    Last Post: 12-08-2007, 04:34 PM
  5. Replies: 18
    Last Post: 03-20-2006, 02:22 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
  •