Results 1 to 4 of 4

Thread: LDAP and MySQL mismatch

  1. #1
    Join Date
    Mar 2006
    Posts
    41
    Rep Power
    9

    Default LDAP and MySQL mismatch

    I am unable to create users - always reporting a SOAP error, but I can edit, only not create...

    "Server error encountered Message: system failure: createAccount Error code: service.FAILURE Method: ZmCsfeCommand.prototype.invoke Details:soap:Receiver"

    My LDAP database crashed completely, and had a backup, but it was not exactly the same time as the other database.

    After lots of debugging, stack back traces, logs with debugging - we have worked out where the problem is, but not the solution.

    The problem is that mysql (zimbra and others) show users that do not exist in LDAP.

    So a quick "select id, comment from mailbox" on zimbra shows two users, 199 and 200 that do not exist in LDAP.

    But, if I do a "delete from mailbox where id = 199"
    mysql> delete from mailbox where id = 200;
    ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`mboxgroup100/mail_item`, CONSTRAINT `fk_mail_item_mailbox_id` FOREIGN KEY (`mailbox_id`) REFERENCES `zimbra`.`mailbox` (`id`))

    So something is screwy...

    My question is, how can I tell Zimbra to use an ID above all of these - as I think the problem is related to no free entry.

    Here is a log entry that lead to this issue: (shortened to important line)

    } catch (NameAlreadyBoundException e) {

    Scott

  2. #2
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    719
    Rep Power
    9

    Default

    Assuming this is FOSS edition? The proper backups/redologs in NE would have prevented such a mismatch.

    It's telling you what to do -- first, delete from mboxgroup100.mail_item where id=200, and to be really clean, trace those rows in mboxgroup100.mail_item to blobs in /opt/zimbra/store.

    (Does mysql support the dangerous oracleism "on delete cascade"?)

    Rather than chasing deletia, you could also try creating the LDAP entries manually. zimbra.mailbox tells you the accountid, with a comment telling the username.

    Going forward, consider setting up an LDAP secondary. http://www.zimbra.com/docs/os/latest...ation.6.1.html

  3. #3
    Join Date
    Mar 2006
    Posts
    41
    Rep Power
    9

    Default

    Yep the FOSS edition.

    I am going to try the LDAP manual create first. Unfortunately the backup / restore was the problem. My fault really, but when I did the rsync, I did not delete old entries. Combine that with LDAP crash (well known problem on RC2) I am in this bind.

    There seems to me three solutions to the problem:

    1) LDAP manual create with old IDs
    2) Remove old mysql entries with IDs and store/X, index/X etc
    3) Tell something that the next free ID is bigger

    This number 3 would be the best, but I can't figure out where Zimbra stores the next free ID. Anyone know?

    Scott

  4. #4
    Join Date
    Mar 2006
    Posts
    41
    Rep Power
    9

    Default

    Quote Originally Posted by Rich Graves View Post
    It's telling you what to do -- first, delete from mboxgroup100.mail_item where id=200, and to be really clean, trace those rows in mboxgroup100.mail_item to blobs in /opt/zimbra/store.
    Unfortunately it gets very hard to follow...

    mysql> delete from mail_item where mailbox_id = 200;
    ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`mboxgroup100/mail_item`, CONSTRAINT `fk_mail_item_folder_id` FOREIGN KEY (`mailbox_id`, `folder_id`) REFERENCES `mail_item` (`mailbox_id`, `id`))

    Which is a reference back to itself...

    I think we are barking up the wrong tree.

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. Replies: 7
    Last Post: 10-05-2007, 03:14 PM
  3. Replies: 0
    Last Post: 08-30-2007, 10:06 AM
  4. Replies: 4
    Last Post: 11-15-2006, 11:16 AM
  5. Lost LDAP and MYSQL passwords
    By jholder in forum Installation
    Replies: 13
    Last Post: 03-05-2006, 08:29 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
  •