Viewing replication errors with the idsldapsearch command

You can use the idsldapsearch to display replication errors. Viewing this information can help you identify the source of your replication problem.

About this task

The replication errors can be displayed by two replication status attributes:
  • ibm-replicationFailedChanges
  • ibm-replicationFailedChangeCount

Procedure

  1. Use the idsldapsearch command to display replication errors:
    idsldapsearch -D adminDN -w adminPW -h servername 
    -p portnumber -b " " -s sub objectclass=ibm*nt 
    ibm-replicationfailedchanges ibm-replicationfailedchangecount 
    This command returns an output similar to the following output:
    cn=server-1389,ibm-replicaServerId=server-389,
    ibm-replicaGroup=default,o=sample
    ibm-replicationfailedchanges=1 20050407202221Z 68 1 
    170814 add cn=entry-85,o=sample 
    ibm-replicationfailedchangecount=1
  2. Use the idsldapexop command to show data for the update, try the update again, or remove the update from the replication error log. Use the following idsldapexop command to show data for the failed update:
    ldapexop -D adminDN -w adminPW -op controlreplerr -show 1 -ra 
    	cn=server-1389,ibm-replicaServerId=server-389,
    ibm-replicaGroup=default,o=sample
    This command returns an output similar to the following output:
    dn: entry-85,o=sample 
    cn: entry-85 
    objectclass: person 
    objectclass: eperson 
    objectclass: organizationalperson 
    objectclass: inetorgperson 
    objectclass: top 
    userpassword: {AES256}tDO9yQT540xpp7ZMIg95mA== 
    sn: user 
    ibm-entryuuid: bf201fcb-758e-41dc-bdea-1855fe0b860b 
    control: 1.3.6.1.4.1.42.2.27.8.5.1 false 
    control: 1.3.18.0.2.10.19 false:: 
    		MIQAAADJMIQAAAAnCgEAMIQAAAAeBAxjcmVhdG9yc05hbWUxhAAAAAoECENOPUFETUlOMIQAAA
    AxCgEAMIQAAAAoBA9jcmVhdGVUaW1lc3RhbXAxhAAAABEEDzIwMDUwMzMwMjMyNzQ3WjCEAAAAKA
    oBADCEAAAAHwQNbW9kaWZpZXJzTmFtZTGEAAAACgQIQ049QURNSU4whAAAADEKAQAwhAAAACgED2
    1vZGlmeVRpbWVzdGFtcDGEAAAAEQQPMjAwNTAzMzAyMzI3NDda 
  3. Use the idsldapexop command to try the update again:
    ldapexop -D adminDN -w adminPW -op controlreplerr -retry 1 -ra 
    	cn=server-1389,ibm-replicaServerId=server-389,
    ibm-replicaGroup=default,o=sample 
    This command returns an output similar to the following output:
    Operation completed successfully. 
    This result indicates only that it was possible to send the update again, not that the update was successful.
  4. Run the idsldapsearch command again:
    idsldapsearch -D adminDN -w adminPW -h servername 
    -p portnumber -b " " -s sub objectclass=ibm*nt
    ibm-replicationfailedchanges ibm-replicationfailedchangecount 
    This command returns an output similar to the following output:
    cn=server-1389,ibm-replicaServerId=server-389,
    ibm-replicaGroup=default,o=sample 
    ibm-replicationfailedchanges=2 20050407214939Z 68 2 
    	170814 add cn=entry-85,o=sample 
    ibm-replicationfailedchangecount=1
    Notice that the update failed again. The error ID is now 2, the number of attempts is 2, and the last time and result code are updated.
  5. Use the idsldapexop command to remove the failed update from the replication error log:
    idsldapexop -D adminDN -w adminPW -op controlreplerr -delete 2 -ra 
    	cn=server-1389,ibm-replicaServerId=server-389,
    ibm-replicaGroup=default,o=sample 
    This command returns an output similar to the following output:
    Operation completed successfully.
  6. Run the idsldapsearch command again:
    idsldapsearch -D adminDN -w adminPW -h servername 
    -p portnumber -b " " -s sub objectclass=ibm*nt 
    ibm-replicationfailedchanges ibm-replicationfailedchangecount 
    This command returns an output similar to the following output:
    cn=server-1389,ibm-replicaServerId=server-389,ibm-replicaGroup=default,o=sample
    ibm-replicationfailedchangecount=0
    It is also possible to try and delete all failures again by using all in place of the error ID.
    Note: Do not confuse the change ID, which is constant, with the error ID, which is changed on every failed attempt.