OpenLdap Replication Status

Hi,

I would like to know the command to check the status of OpenLdap replication. I am trying get contextCSN value from both the ldap instances and compare it. Command that I am using:

ldapsearch -W -D "cn=manager,dc=apigee,dc=com" -b "dc=apigee,dc=com" -LLL -h LDAP_IP -p 10389 | grep contextCSN

Can anyone correct the above command to find the variable or give me some other method to get replication status?

Thanks!

Solved Solved
0 5 6,713
1 ACCEPTED SOLUTION

let me try this one more time : ldapsearch -x -LLL -H ldap[?]://master:389 -s base -b 'dc=<yourdc>,dc=com' contextCSN[?] dn: dc=<yourdc>,dc=com it should return something like this: contextCSN: 20081025222436.822813Z&000000;000#000000

View solution in original post

5 REPLIES 5

I have not seen this command run the way you have but in this syntax instead...where you run on master and slave.

ldapsearch -x -LLL -H ldap[?]://master:389 -s base -b 'dc=(dcname),dc=com' contextCSN[?] dn: dc=(dcname),dc=com

I hope I understand it correctly, I ran the below command on both Master and Slave:

ldapsearch -x -LLL -H ldap://localhost:10389 -s base -b 'dc=apigee,dc=com' contextCSN dn: dc=apigee,dc=com -D "cn=manager,dc=apigee,dc=com" -w secret
dn: dc=apigee,dc=com

Getting:

# pagedresults: cookie=

There is no mater/slave relationship on LDAPs. They are configured as multi-master replication.

Thanks! @Maudrit

My bad on that. Wanted to know the best way to check whether replication is happening across LDAP nodes.

Checking the ldif file won't be enough I guess.

cat /opt/apigee/conf/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif

let me try this one more time : ldapsearch -x -LLL -H ldap[?]://master:389 -s base -b 'dc=<yourdc>,dc=com' contextCSN[?] dn: dc=<yourdc>,dc=com it should return something like this: contextCSN: 20081025222436.822813Z&000000;000#000000