Results 1 to 3 of 3

Thread: Help! I deleted my data.mdb file

  1. #1
    nitmotwani is offline Junior Member
    Join Date
    Feb 2013
    Posts
    7
    Rep Power
    2

    Default Help! I deleted my data.mdb file

    I have a zimbra version 8.0.2.GA.5569.UBUNTU10.64 UBUNTU10_64 FOSS edition running on a Ubuntu 10.04 server

    My server recently recovered from an unexpected failure and the RAM on the physical machine had to be replaced. Upon recovery, Zimbra was working fine but I noticed, what I've now learnt is familiar, a data.mdb file which took up about 85 gigs of memory. I searched the forums about this and I finally used the following steps (mentioned in this post (ldap database went from 97meg to 86gig) to get rid of this file:

    Code:
    # update database size
    zmlocalconfig -e ldap_db_maxsize=67108864
    
    # update log size
    zmlocalconfig -e ldap_accesslog_maxsize=536870912
    
    # allow time for zmconfigd to apply new setting (as suggested by Quanah)
    sleep 90
    
    # stop slapd
    ldap stop
    
    # change to database directory
    cd /opt/zimbra/data/ldap/mdb/db
    
    # backup database
    /opt/zimbra/libexec/zmslapcat /opt/zimbra/data/ldap/mdb/db
    
    # move to .old
    mv data.mdb data.mdb.old
    
    # recreate database with new size and restore from backup
    /opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -l /opt/zimbra/data/ldap/mdb/db/ldap.bak
    
    # start slapd
    ldap start
    
    # archive original
    gzip data.mdb.old
    I however used smaller maxsizes of 10 gigs each. I also foolishly, deleted the old data.mdb since it was taking too long to archive it.

    Now the situation I'm in is as follows: I can't seem to bind to my LDAP port 389 and I get the following error when restarting using zmcontrol:

    Code:
    Unable to determine enabled services from ldap.
    Enabled services read from cache. Service list may be inaccurate.
    	Starting zmconfigd...Done.
    	Starting logger...Failed.
    Starting logswatch...[] FATAL: failed to initialize LDAP client
    com.zimbra.cs.ldap.LdapException: LDAP error: : invalid credentials
    ExceptionId:main:1360745602916:32165dbbf08ae86f
    Code:ldap.LDAP_ERROR
    	at com.zimbra.cs.ldap.LdapException.LDAP_ERROR(LdapException.java:88)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:72)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:38)
    	at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:117)
    	at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnectionPool(LdapConnectionPool.java:64)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapContext.init(UBIDLdapContext.java:95)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapClient.init(UBIDLdapClient.java:37)
    	at com.zimbra.cs.ldap.LdapClient.getInstance(LdapClient.java:63)
    	at com.zimbra.cs.ldap.LdapClient.initialize(LdapClient.java:86)
    	at com.zimbra.cs.account.ldap.LdapProv.<init>(LdapProv.java:46)
    	at com.zimbra.cs.account.ldap.LdapProvisioning.<init>(LdapProvisioning.java:256)
    	at com.zimbra.cs.account.ldap.LdapProvisioning.<init>(LdapProvisioning.java:253)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    	at java.lang.Class.newInstance0(Class.java:372)
    	at java.lang.Class.newInstance(Class.java:325)
    	at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:278)
    	at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:238)
    	at com.zimbra.cs.account.ProvUtil.initProvisioning(ProvUtil.java:745)
    	at com.zimbra.cs.account.ProvUtil.main(ProvUtil.java:3509)
    Caused by: LDAPException(resultCode=49 (invalid credentials), errorMessage='invalid credentials')
    	at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:1837)
    	at com.unboundid.ldap.sdk.LDAPConnectionPool.createConnection(LDAPConnectionPool.java:666)
    	at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:562)
    	at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:113)
    	... 18 more
    zimbra logger service is not enabled!  failed.
    In zimbra.log I see the following output:
    warning: dict_ldap_connect: Unable to bind to server ldap://email.server.com:389 with dn uid=zmpostfix,cn=appaccts,cn=zimbra: 49 (Invalid credentials)

    And upon trying to restart mta using zmamtactl, I see the following:
    opendkim: /opt/zimbra/conf/opendkim.conf: ldap://email.bookmyforex.com:389/?DKIMSelector?sub?(DKIMIdentity=$d): dkimf_db_open(): Invalid credentials
    Failed to start opendkim: 0
    zmopendkimctl failed to start


    Things I've tried already (to no avail):
    1. Changing my ldap password using zmldappasswd
    2. Bits and pieces of info mentioned here (since the info here seems to be for older versions and not exactly applicable): Network Edition: Moving from 32-bit to 64-bit Server - Zimbra :: Wiki


    Thank you

  2. #2
    nitmotwani is offline Junior Member
    Join Date
    Feb 2013
    Posts
    7
    Rep Power
    2

    Default

    Quote Originally Posted by nitmotwani View Post
    I have a zimbra version 8.0.2.GA.5569.UBUNTU10.64 UBUNTU10_64 FOSS edition running on a Ubuntu 10.04 server

    My server recently recovered from an unexpected failure and the RAM on the physical machine had to be replaced. Upon recovery, Zimbra was working fine but I noticed, what I've now learnt is familiar, a data.mdb file which took up about 85 gigs of memory. I searched the forums about this and I finally used the following steps (mentioned in this post (ldap database went from 97meg to 86gig) to get rid of this file:

    Code:
    # update database size
    zmlocalconfig -e ldap_db_maxsize=67108864
    
    # update log size
    zmlocalconfig -e ldap_accesslog_maxsize=536870912
    
    # allow time for zmconfigd to apply new setting (as suggested by Quanah)
    sleep 90
    
    # stop slapd
    ldap stop
    
    # change to database directory
    cd /opt/zimbra/data/ldap/mdb/db
    
    # backup database
    /opt/zimbra/libexec/zmslapcat /opt/zimbra/data/ldap/mdb/db
    
    # move to .old
    mv data.mdb data.mdb.old
    
    # recreate database with new size and restore from backup
    /opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -l /opt/zimbra/data/ldap/mdb/db/ldap.bak
    
    # start slapd
    ldap start
    
    # archive original
    gzip data.mdb.old
    I however used smaller maxsizes of 10 gigs each. I also foolishly, deleted the old data.mdb since it was taking too long to archive it.

    Now the situation I'm in is as follows: I can't seem to bind to my LDAP port 389 and I get the following error when restarting using zmcontrol:

    Code:
    Unable to determine enabled services from ldap.
    Enabled services read from cache. Service list may be inaccurate.
    	Starting zmconfigd...Done.
    	Starting logger...Failed.
    Starting logswatch...[] FATAL: failed to initialize LDAP client
    com.zimbra.cs.ldap.LdapException: LDAP error: : invalid credentials
    ExceptionId:main:1360745602916:32165dbbf08ae86f
    Code:ldap.LDAP_ERROR
    	at com.zimbra.cs.ldap.LdapException.LDAP_ERROR(LdapException.java:88)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:72)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapException.mapToLdapException(UBIDLdapException.java:38)
    	at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:117)
    	at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnectionPool(LdapConnectionPool.java:64)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapContext.init(UBIDLdapContext.java:95)
    	at com.zimbra.cs.ldap.unboundid.UBIDLdapClient.init(UBIDLdapClient.java:37)
    	at com.zimbra.cs.ldap.LdapClient.getInstance(LdapClient.java:63)
    	at com.zimbra.cs.ldap.LdapClient.initialize(LdapClient.java:86)
    	at com.zimbra.cs.account.ldap.LdapProv.<init>(LdapProv.java:46)
    	at com.zimbra.cs.account.ldap.LdapProvisioning.<init>(LdapProvisioning.java:256)
    	at com.zimbra.cs.account.ldap.LdapProvisioning.<init>(LdapProvisioning.java:253)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    	at java.lang.Class.newInstance0(Class.java:372)
    	at java.lang.Class.newInstance(Class.java:325)
    	at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:278)
    	at com.zimbra.cs.account.Provisioning.getInstance(Provisioning.java:238)
    	at com.zimbra.cs.account.ProvUtil.initProvisioning(ProvUtil.java:745)
    	at com.zimbra.cs.account.ProvUtil.main(ProvUtil.java:3509)
    Caused by: LDAPException(resultCode=49 (invalid credentials), errorMessage='invalid credentials')
    	at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:1837)
    	at com.unboundid.ldap.sdk.LDAPConnectionPool.createConnection(LDAPConnectionPool.java:666)
    	at com.unboundid.ldap.sdk.LDAPConnectionPool.<init>(LDAPConnectionPool.java:562)
    	at com.zimbra.cs.ldap.unboundid.LdapConnectionPool.createConnPool(LdapConnectionPool.java:113)
    	... 18 more
    zimbra logger service is not enabled!  failed.
    In zimbra.log I see the following output:
    warning: dict_ldap_connect: Unable to bind to server ldap://email.server.com:389 with dn uid=zmpostfix,cn=appaccts,cn=zimbra: 49 (Invalid credentials)

    And upon trying to restart mta using zmamtactl, I see the following:
    opendkim: /opt/zimbra/conf/opendkim.conf: ldap://email.bookmyforex.com:389/?DKIMSelector?sub?(DKIMIdentity=$d): dkimf_db_open(): Invalid credentials
    Failed to start opendkim: 0
    zmopendkimctl failed to start


    Things I've tried already (to no avail):
    1. Changing my ldap password using zmldappasswd
    2. Bits and pieces of info mentioned here (since the info here seems to be for older versions and not exactly applicable): Network Edition: Moving from 32-bit to 64-bit Server - Zimbra :: Wiki


    Thank you
    I was able to get rid of the java exception but I'm still having seeing an error binding to the ldap port. And i see this error now on zmcontrol startup. Would really appreciate some direction regarding this:

    Starting ldap...Done.
    Unable to determine enabled services from ldap.
    Enabled services read from cache. Service list may be inaccurate.
    Starting zmconfigd...Done.
    Starting logger...Failed.
    Starting logswatch...ERROR: account.NO_SUCH_SERVER (no such server: email.bookmyforex.com)
    zimbra logger service is not enabled! failed.


    Starting mailbox...Done.
    Starting antispam...Done.
    Starting antivirus...Done.
    Starting snmp...Done.
    Starting spell...Done.
    Starting mta...Failed.
    Starting saslauthd...done.
    opendkim: /opt/zimbra/conf/opendkim.conf: ldap://email.bookmyforex.com:389/?DKIMSelector?sub?(DKIMIdentity=$d): dkimf_db_open(): Invalid credentials
    Failed to start opendkim: 0
    zmopendkimctl failed to start

  3. #3
    quanah is offline Zimbra Employee
    Join Date
    May 2007
    Location
    Zimbra
    Posts
    1,262
    Rep Power
    10

    Default

    If you have an ldap.bak around, I suggest you reload it. You completely deleted your LDAP database.

    I would also note that you should spend more time reading. data.mdb is a *sparse* file, as clearly noted in numerous threads, and at https://wiki.zimbra.com/wiki/OpenLDA...0#Notes_on_MDB
    So it is not 80GB. It just appears to be 80GB, and if you use commands correctly, you won't have issues archiving it.

    --Quanah
    Quanah Gibson-Mount
    Server Architect
    Zimbra, Inc
    --------------------
    Zimbra :: the leader in open source messaging and collaboration

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 01-05-2012, 02:48 PM
  2. Deleted /var/log/zimbra.log file
    By drdre in forum Administrators
    Replies: 1
    Last Post: 09-19-2011, 03:10 PM
  3. Restore Deleted Account Data
    By bgazzard in forum General Questions
    Replies: 0
    Last Post: 12-23-2010, 08:15 PM
  4. data of deleted users
    By kathmandu in forum Administrators
    Replies: 4
    Last Post: 02-10-2009, 05:15 PM
  5. view data of deleted user
    By kathmandu in forum Administrators
    Replies: 3
    Last Post: 01-29-2009, 03:05 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
  •