0

I am new with opendj. Using ConnectionChangeRecordWriter writeChangeRecord() method, I can add an entry into opendj LDAP server with result success . It looks fine. But, immediately after the calling method, I want to search the entry which was added, and the exception thown with EntryNotFoundException:

org.forgerock.opendj.ldap.EntryNotFoundException: No Such Entry: Entry ns-base-config-key=track,cn=Schema,ou=Configs,dc=nationsky,dc=com cannot be modified because no such entry exists in the server.

While, if after several minutes after adding, I can search the entry successfully. Thus, I have to make a loop to keep searching until the result is successful. What's the matter with it? Did I make mistake? Thank you for your help.

Long Cui
  • 1
  • 1

1 Answers1

0

This generally happens when coding against a replication topology that sits behind a load balancer.

The add request is routed by the load balancer towards directory server A while the subsequent read is routed to directory server B. Sometimes the search request reaches server B before the add operation is replayed on it.

JnRouvignac
  • 807
  • 5
  • 19