Unable to chase v3 reference

I was using SunOne LDAP command line utility 'ldapsearch' to perform a search on Microsoft Active Directory installed on Windows 2003 server from the linux box with kernel 2.1 version. I got the result back from the ldapsearch command but then it hanged for very long time and came back with an error message saying that "Unable to chase v3 reference

If somebody know what does that error message means and how to solve the problem please let me know.

The command and the result is given below

./ldapsearch -b dc=ad,dc=abcdcom,dc=com -h spccaladc01 -p 389 -s sub -DCN=wpsbind,CN=Users,dc=ad,dc=abcdcom,dc=com-w "-" "(&(objectclass=User)(sAMAccountName=PSFT))"

Enter bind password:

n: CN=psft,CN=Users,DC=AD,DC=abcdCOM,DC=COM

objectClass: top

objectClass: person

objectClass: organizationalPerson

objectClass: user

cn: psft

description: WebSphere AD Integration Account

givenName: psft

distinguishedName: CN=psft,CN=Users,DC=AD,DC=abcdCOM,DC=COM

Unable to chase v3 reference ldap://ForestDnsZones.AD.SPIRENTCOM.COM/DC=ForestDnsZones,DC=AD,DC=SPIRENTCOM,D C=COM (Can't connect to the LDAP server)

Unfollowed continuation reference(s):

ldap://ForestDnsZones.AD.SPIRENTCOM.COM/DC=ForestDnsZones,DC=AD,DC=SPIRENTCOM,D C=COM

Unable to chase v3 reference ldap://DomainDnsZones.AD.SPIRENTCOM.COM/DC=DomainDnsZones,DC=AD,DC=SPIRENTCOM,D C=COM (Can't connect to the LDAP server)

Unfollowed continuation reference(s):

ldap://DomainDnsZones.AD.SPIRENTCOM.COM/DC=DomainDnsZones,DC=AD,DC=SPIRENTCOM,D C=COM

Unable to chase v3 reference ldap://AD.SPIRENTCOM.COM/CN=Configuration,DC=AD,DC=SPIRENTCOM,DC=COM (Can't connect to the LDAP server)

Unfollowed continuation reference(s):

ldap://AD.SPIRENTCOM.COM/CN=Configuration,DC=AD,DC=SPIRENTCOM,DC=COM

[1881 byte] By [pranaysr] at [2007-11-26 7:44:07]
# 1

I believe that MS AD returns referrals and serach references with generic domain names and not real hostnames. MS clients know how to transform them in real Directory Server hosts, but I tend to consider these kind of referrences as proprietary extensions which are not described in any standard.

Regards,

Ludovic.

ludovicp at 2007-7-6 19:54:23 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2

I got solution to the proble. The problem basically lies here when you have multiple ldap setup, when one ldap server returns result which include the reference to another ldap server then by default the ldap sdk library will start chasing the refernce coming with result and might cause a infinite loop which will finally hang your system. The solution is you run ldapsearch command with -R as the option which means that the you are supressing the referral.

Or in your code you can turn off the referral by using ldap_set_option(*ldap,LDAP_OPT_REFERRALS,LDAP_OPT_OFF)

Hope somebody will find it useful.

pranaysr at 2007-7-6 19:54:23 > top of Java-index,Web & Directory Servers,Directory Servers...