1

Since I've restored the Open Directory from an archive because my Server crashed and the DB was corrupt. The password server does not start anymore. The log looks like this:

Feb 14 2012 21:41:20 156746us    Mac OS X Password Service version 376.1 (pid = 2438) was started at: Tue Feb 14 21:41:20 2012.
Feb 14 2012 21:41:20 156801us    RunAppThread Created
Feb 14 2012 21:41:20 156852us    RunAppThread Started
Feb 14 2012 21:41:20 156879us    Initializing Server Globals ...
Feb 14 2012 21:41:20 163094us    Initializing Networking ...
Feb 14 2012 21:41:20 163196us    Initializing TCP ...
Feb 14 2012 21:41:20 191790us    SASL is using realm "SERVER.HOME.POST-NET.CH"
Feb 14 2012 21:41:20 191847us    Starting Central Thread ...
Feb 14 2012 21:41:20 191860us    Starting other server processes ...
Feb 14 2012 21:41:20 191873us    StartCentralThreads: 1 threads to stop
Feb 14 2012 21:41:20 191905us    Initializing TCP ...
Feb 14 2012 21:41:20 191954us    Starting TCP/IP Listener on ethernet interface, port 106
Feb 14 2012 21:41:20 192012us    Starting TCP/IP Listener on ethernet interface, port 3659
Feb 14 2012 21:41:20 192048us    Starting TCP/IP Listener on interface lo0, port 106
Feb 14 2012 21:41:20 192082us    Starting TCP/IP Listener on interface lo0, port 3659
Feb 14 2012 21:41:20 192117us    StartCentralThreads: Created 4 TCP/IP Connection Listeners
Feb 14 2012 21:41:20 192132us    Starting UNIX domain socket listener /var/run/passwordserver
Feb 14 2012 21:41:20 193034us    CRunAppThread::StartUp: caught error -1.
Feb 14 2012 21:41:20 193056us    ** ERROR: The Server received an error during startup.  See error log for details.
Feb 14 2012 21:41:20 193075us    RunAppThread::StartUp() returned: 4294967295
Feb 14 2012 21:41:20 193107us    Stopping server processes ...
Feb 14 2012 21:41:20 193119us    Stopping Network Processes ...
Feb 14 2012 21:41:20 193131us    Deinitializing networking ...
Feb 14 2012 21:41:20 193149us    Server Processes Stopped ...
Feb 14 2012 21:41:20 193165us    RunAppThread Stopped
Feb 14 2012 21:41:20 193202us    Aborting Password Service.  See error log.

The error log repeats the following:

Feb 14 2012 21:41:50 409022us    Server received error -1 during startup.
Feb 14 2012 21:41:50 409141us    Aborting Password Service.

Anyone an idea what's wrong here and how I can fix this?

2 Answers 2

1

I had this issue. It wasn't the password service - it was a corrupt ldap database.

http://www.iredmail.org/forum/topic3694-iredmail-support-power-cut-ldap-dont-sta rt.html https://discussions.apple.com/thread/4149695?start=0&tstart=0

Here's what I did.

  1. check if this is the problem

    $ sudo /usr/libexec/slapd -Tt 
    >> bdb_db_open: database "cn=authdata": db_open(/var/db/openldap/authdata/id2entry.bdb) failed: Invalid argument (22).
    
  2. Stop LDAP on OD Master

    $ sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist
    
  3. Repair Permissions

    $ diskutil repairPermissions /
    
  4. backup openldap db

    $ sudo cp /var/db/openldap/authdata/id2entry.bdb /var/db/openldap/authdata/id2entry.bdb.backup
    
  5. repair

    $ sudo db_recover -cv -h /var/db/openldap/openldap-data/
    >> Recovery complete at Thu Jun  6 11:01:35 2013
    >> Maximum transaction ID 8000060e Recovery checkpoint [2][6589846]
    
  6. run repair again to check

    $ sudo db_recover -cv -h /var/db/openldap/openldap-data/
    >> Finding last valid log LSN: file: 2 offset 6589938
    >> Recovery starting from [1][28]
    >> Recovery complete at Thu Jun  6 11:02:32 2013
    >> Maximum transaction ID 8000060e Recovery checkpoint [2][6589938]`
    
  7. double check if things were repaired correctly

    $ sudo /usr/libexec/slapd -Tt
    >> bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
    

    config file testing succeeded

  8. restart the service

    $ sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist
    
0
-1

I've run into similar issues in the past and typically resolve it by replacing the entire contents of /var/db/openldap from a Time Machine backup.

Make sure to stop ldap first:

sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist

Then For CYA, copy everything inside /var/db/openldap to the location of your choice. Then delete the three folders inside /var/db/openldap.

Open Time Machine from the /var/db/openldap directory and restore the 3 folders from a known working date/time.

Start ldap:

sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist

For good measure reboot and everything usually comes back to normal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .