LDAP service does not start

SYMPTOMS

When the LDAP service is started it stops immediately with an error. The
Windows event log may present one of the following errors under the "System"
event log:

The MailEnable LDAP Service service terminated with the following
service-specific error: The directory cannot be removed.

The MailEnable LDAP Service service terminated with service-specific
error: The media is write protected..

CAUSE

Error 1:

This occurs if the server already has a service using the LDAP default port
(port 389). The MailEnable LDAP service is unable to bind to the port, so
exits.

Error 2:

The LDAP "slapd.conf" contains invalid paths in the top "include" lines to a
drive that is either write protected or is no longer online.

RESOLUTION

Error 1 Resolution:

To resolve you can either stop the other application that is using the port,
or you can configure the LDAP service to bind to another port. In order to
change the port number for the LDAP service you will need to add the following
registry key, changing the number the port you wish to listen on: