1. I'm assuming you are using OpenLDAP as your directory since you have pointed ranger to 127.0.0.1, can you send me the ldapsearch output for any user entry, the syntax for ldapsearch would be :
# ldapsearch -x -b "dc=hortonworks,dc=com" -D "<binddn>" -W -h <LDAP-server-IP-addr>
NOTE : replace <binddn> with your actual bind address
This will help in configuring your ranger usersync details
[root@sandbox usersync]# ldapsearch -x -b "dc=hortonworks,dc=com" -D "dc=hadoop,dc=apache,dc=org" -W -h ldap://127.0.0.1:389 Enter LDAP Password: ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) [root@sandbox usersync]#
From the ldap setup output above I see that the ldap port is configured to 33389 where are in ranger configuration you specified "ldap://127.0.0.1:389". Can you please try to change the ldap url in ranger config to "ldap://127.0.0.1:33389"?
Is your ldap server running ? Send the output of the below command from the ldap server
# ps aux | grep -i slapd
Your binddn and base search cannot have different tree, It seems that your ldap server is not configured correctly.
Can you share how did you setup your ldap server ? slapd.conf or cn=config form ?
@Narasimma varman If you have followed the exact documentation then, your basedn should be dc=example,dc=com and binddn should be any of the users you added or cn=Manager,dc=example,dc=com, the password for cn=Manager,dc=example,dc=com will be the password you generated using "slappasswd" command which you gave in slapd.conf.
Are you able to perform an ldapsearch using the below command :
# ldapsearch -x -b "dc=example,dc=com" -H ldaps://<hostname>
Also, does your netstat show the same :
# netstat -ntpl | grep 5029
If the above does not work send your /etc/openldap/slapd.conf and /etc/sysconfig/ldap