Results 1 to 3 of 3

Thread: LDAP will not start

  1. #1
    Join Date
    Jun 2006
    Location
    Indianapolis, IN
    Posts
    51
    Rep Power
    9

    Default LDAP will not start

    I did a "zmcontrol stop", then a "zmcontrol start" today, and now slapd won't run:

    This is on ZCS NE 4.5.5 GA

    Code:
            Starting ldap...Done.
    FAILED
    => bdb_last_id: get failed: DB_PAGE_NOTFOUND: Requested page not found (-30988)
    bdb_db_open: last_id(/opt/zimbra/openldap-data) failed: DB_PAGE_NOTFOUND: Requested page not found (-30988)
    bdb(): txn_checkpoint: failed to flush the buffer cache Invalid argument
    bdb_db_close: txn_checkpoint failed: Invalid argument (22)
    backend_startup_one: bi_db_open failed! (-30988)
    bdb_db_close: alock_close failed
    ERROR - failed to start slapd
    Only thing on google I found so far is reference to some Berkeley "db_recover" utility...but I don't have that, and wouldn't want to run it if it's not the solution.

    Any ideas?

    --Brian
    Last edited by bjared; 07-06-2007 at 07:57 AM. Reason: system info

  2. #2
    Join Date
    Jun 2006
    Location
    Indianapolis, IN
    Posts
    51
    Rep Power
    9

    Default More details

    I found the wiki page: http://www.zimbra.com/forums/adminis...er-reboot.html

    and ran:

    sudo /opt/zimbra/openldap/libexec/slapd -l LOCAL0 -4 -u zimbra -h ldap://zimbra1.ethosprime.com:389 -f /opt/zimbra/conf/slapd.conf -d 7

    I got a little more output from the error:

    Code:
    bdb_db_open:
    bdb_db_open: dbenv_open(/opt/zimbra/openldap-data)
    => bdb_last_id: get failed: DB_PAGE_NOTFOUND: Requested page not found (-30988)
    bdb_db_open: last_id(/opt/zimbra/openldap-data) failed: DB_PAGE_NOTFOUND: Requested page not found (-30988)
    bdb(): DB_ENV->log_flush: LSN of 2/4079694 past current end-of-log of 2/2320957
    bdb(): Database environment corrupt; the wrong log files may have been removed or incompatible database files imported from another environment
    bdb(): DB_ENV->log_flush: LSN of 2/4079694 past current end-of-log of 2/2320957
    bdb(): Database environment corrupt; the wrong log files may have been removed or incompatible database files imported from another environment
    ====> bdb_cache_release_all
    bdb(): DB_ENV->log_flush: LSN of 2/4079694 past current end-of-log of 2/2321046
    bdb(): Database environment corrupt; the wrong log files may have been removed or incompatible database files imported from another environment
    bdb(): id2entry.bdb: unable to flush page: 0
    bdb(): txn_checkpoint: failed to flush the buffer cache Invalid argument
    bdb_db_close: txn_checkpoint failed: Invalid argument (22)
    backend_startup_one: bi_db_open failed! (-30988)
    slapd shutdown: initiated
    ====> bdb_cache_release_all
    bdb_db_close: alock_close failed
    slapd destroy: freeing system resources.
    slapd stopped.
    connections_destroy: nothing to destroy.

  3. #3
    Join Date
    Jun 2006
    Location
    Indianapolis, IN
    Posts
    51
    Rep Power
    9

    Default Fixed it (I hope)

    OK. I "fixed" it. That's in quotes, because zimbra started now, but I'm not sure what kind of state it is in.

    Here's the process:

    Code:
    #!/bin/bash
    #
    # If you're having the same problem I had, zimbra won't be running, so it
    # probably shouldn't be running.  If you have slapd running...you should
    # not be looking at this script.  This is a script that will resolve the problem
    # I mentioned earlier in the forums.
    #
    # Your mileage may vary with this script.  I recreated this in the forums
    # text-editor from my command-line history. Please keep that in mind.
    
    cd /opt/zimbra
    cp -r openldap-data openldap-data.`date +"%Y%m%d"`.backup
    cp -r openldap-data openldap-data.sandbox
    cd openldap-data.sandbox
    mkdir dumps
    
    # Go through all .bdb files and dump them to the "dumps" subdirectory
    #
    for i in *.bdb ; do 
      BN=`basename $i .bdb`
      /opt/zimbra/sleepycat/bin/db_dump -r -f dumps/$BN.txt $i
    done
    
    cd dumps
    
    # Go through all the .txt files and load them into new .bdb files
    #
    for i in *.txt ; do
      BN=`basename $i.txt`
      /opt/zimbra/sleepycat/bin/db_load $BN.bdb < $i
    done
    
    # Next, copy all of the .bdb files into /opt/zimbra/openldap-data
    #
    #/bin/cp *.bdb /opt/zimbra/openldap-data
    Anyway, zimbra is up and running...so maybe this will be useful to others in the future.

    --Brian

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 06:01 AM
  2. 3 testing: LDAP: 389 Failed when restore zimbra
    By victorLeong in forum Administrators
    Replies: 15
    Last Post: 05-24-2007, 06:45 AM
  3. Mac OSX install: Java errors & LDAP CA error
    By jefbear in forum Installation
    Replies: 9
    Last Post: 12-16-2006, 02:39 PM
  4. LDAP won't start after reboot
    By cdyer in forum Administrators
    Replies: 0
    Last Post: 06-13-2006, 12:52 AM
  5. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 10:11 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
  •