View Single Post
  #9 (permalink)  
Old 11-17-2005, 08:16 AM
marcmac marcmac is offline
Zimbra Employee
 
Posts: 2,103
Default LDAP Problems? Read this

If you've done an upgrade or fresh install of M2, and are getting the "Direct context" error, or can't get to port 389 error, here are some things to try.

First - check your DNS.

host `hostname` should return an IP address. (Note - those are backticks. Under the tilde key on my laptop, but it's a Mac, so YMMV).

Is that the IP address of your server? If you can't get to your server by that IP address, you'll need to fix your DNS.

Next - edit /opt/zimbra/conf/slapd.conf - comment out the line "loglevel 0"

ps auxww | grep slapd

If it's running, stop it (ldap stop).

start ldap (ldap start)

Any errors from the command line?

Check /var/log/zimbra.log for slapd errors.

If you're seeing TLS errors in the log, are there certificates in /opt/zimbra/conf/slapd.crt and /opt/zimbra/conf/slapd.key?

If there are no cert files:
edit /opt/zimbra/bin/ldap
change the line with
sudo /opt/zimbra/openldap/libexec/slapd -l LOCAL0 -4 -u zimbra -h "ldaps:// ldap://:389/"

to this (all one line):
sudo /opt/zimbra/openldap/libexec/slapd -l LOCAL0 -4 -u zimbra -h "ldap://:389/"

Edit /opt/zimbra/conf/slapd.conf and delete the LAST 4 lines (all start with "TLS")

(Note - if this was a fresh install, perform the above edit to /opt/zimbra/openldap/etc/openldap/slapd.conf, also)

start ldap.

If the problem goes away, you should be able to proceed. If it's an upgrade, we'll be providing an upgrade script to update the db. If it's a fresh install, read on.

Recovering from a bad install:

If the ldap errors showed up during a FRESH INSTALL, you can recover. Don't do this if you've upgraded, since you'll lose data.

After the above process, delete /opt/zimbra/openldap-data/* (leave the directory)
Make sure all zimbra processes are stopped
su - root
touch /opt/zimbra/.newinstall (Note the '.' in the filename)
/opt/zimbra/libexec/zmsetup.pl

Proceed with configuration as normal.

Last edited by marcmac; 11-17-2005 at 08:18 AM..
Reply With Quote