ldap_bind:cannot contact to ldap (-1)
I am new in ldap
i have install my openldap2,openldap2_client,nss_ldap,pam_ldap,db42 on suse enterprise10 and configure my ldap and add some organisation and users by ldapadd in DIT buy when i restart my pc and try to enter again after 2 days I tried to enter some ldap user but the follwing error appear ldap_bind:cannot contact to ldap (-1) and also when i try to search in my DIT same error occure Hint: ldap are running and no errors occure and i want to know how to listen to ldap port? |
If slapd is running, try to stop it and then start it again from command line in debug mode.
Code:
/usr/lib/openldap/slapd -d 65535 Quote:
Code:
netstat -tanpl|grep 389 |
thank you man for your fast reply
i write the command of starting ldap and the result of the last 3 lines Quote:
and when i listen to port 389 nothing done |
Strange that slapd stops at "bdb_db_open: dbenv_open(/var/lib/ldap)". Does is seems hanged? What is the output of
Code:
ps -ef|grep slapd Also what gives: Code:
ls -la /var/lib/ldap |
the output of ps -ef | grep slapd
Quote:
and the output of ls -la /var/lib/ldap Quote:
|
Debug mode is when you run slapd with the "-d" option, so it does not run in the background and produces more verbose output.
From the ps output, you have 2 slapd processes running (hanged?). You can kill them, try to recover the database, restart and see if it works. To do all of the above you need to run the following commands: Code:
pkill slapd |
thank you for your fast reply
the command Quote:
i change my dn but still the problem my ldap installed package Quote:
Quote:
|
i think that the problem is not from the packages because i aready installed them and ldap runnung normal but when i restart i think my ldap database corrupted by someway
so ldap cannot contact server |
I'm not familiar with SuSE's version of LDAP, but usually it's pretty similar between distributions.
I have my own little page on LDAP. I'm not sure how useful it would be for SuSE, but perhaps the steps about setting up the config files and database might be useful. http://home.roadrunner.com/~computertaijutsu/ldap.html |
You have to install db_utils, in order to be able to check and repair your ldap database.
Since slapd in debug mode stucks, you can try Code:
slaptest -d -1 |
i instal db-utilts and run db_recovery the result was :
Quote:
Quote:
|
Well, I don't know what is the problem with the database. Are you sure it's not some security thing, like SELinux or Apparmor?
If it's not a security problem, you can (re)move everything from /var/lib/ldap (make sure slapd is not running), use slapadd to add your initial ldif, start slapd and see what happens. |
All times are GMT -5. The time now is 04:20 AM. |