Modifying LDAP Connection Handler in OpenDJ

By default clients are allowed to keep their connections open and reuse them for other operations. This can lead to problems under certain circumstances. To prevent this, clients must be forced to open a new connection for each operation.

This can be done by setting ds-cfg-use-tcp-keep-alive=false for each of the connection handlers.

You can modify the ds-cfg-use-tcp-keep-alive using the command line tool (interactive mode or non-interactive mode), LDAP browser or the Directory Console.

In order to do that thru the command line you can execute the next OpenDJ commands:

dsconfig -n -X –port 4444 –bindDN “cn=Directory Manager” –bindPassword Password1dm set-connection-handler-prop –handler-name “LDAP Connection Handler” –set use-tcp-keep-alive:false

dsconfig -n -X –port 4444 –bindDN “cn=Directory Manager” –bindPassword Password1dm set-connection-handler-prop –handler-name “LDAPS Connection Handler” –set use-tcp-keep-alive:false

You have to executed the command for the LDAP and LDAPS connections like we did above.