OPENDJ Replication Master Slave

This topic has 3 replies, 3 voices, and was last updated 4 years, 2 months ago by miky7.

  • Author
  • #21359

    Hi guys!
    I’m trying to create a simple replication with 2 opendj
    1 master
    1 slave
    I followed the guide and I executed these commands:

    ./dsreplication \
     enable \
     --adminUID admin \
     --adminPassword pass \
     --baseDN dc=persons,dc=example,dc=com \
     --host1 \
     --port1 4444 \
     --bindDN1 "cn=Directory Manager" \
     --bindPassword1 pass \
     --noReplicationServer1 \
     --host2 \
     --port2 4444 \
     --bindDN2 "cn=Directory Manager" \
     --bindPassword2 pass \
     --replicationPort2 8989 \
     --onlyReplicationServer2 \
     --trustAll \


    ./dsreplication \
     initialize-all \
     --adminUID admin \
     --adminPassword ciao \
     --baseDN dc=persons,dc=example,dc=com \
     --hostname \
     --port 4444 \
     --trustAll \

    But It doesn’t work.
    The port for replication is only on one of the opendjs.

    Does anyone have any suggestions to give me?

    Thanks a lot!!



    It is unclear to me what you are trying to setup.

    You wrote you want “1 master” and “1 slave”.
    But do you want both of these to be a combined Directory Server (a.k.a DS, i.e. a data server, i.e. a replica) and Replication Server (a.k.a RS)?

    The following command is creating the first node as a DS only (--noReplicationServer1) and the second one as a RS only (--onlyReplicationServer2):
    ./dsreplication \
    enable \
    –adminUID admin \
    –adminPassword pass \
    –baseDN dc=persons,dc=example,dc=com \
    –host1 \
    –port1 4444 \
    –bindDN1 “cn=Directory Manager” \
    –bindPassword1 pass \
    –noReplicationServer1 \
    –host2 \
    –port2 4444 \
    –bindDN2 “cn=Directory Manager” \
    –bindPassword2 pass \
    –replicationPort2 8989 \
    –onlyReplicationServer2 \
    –trustAll \

    The next command (dsreplication initialize-all) only works between nodes which are acting as Directory Servers.


    Side-note: there is no such thing as master/slave with ForgeRock Directory Services. There is only one supported mode: multi-master. See


    Jean-Noel is right, you enable replication as multi-master, but you can set a backend in read-only mode (so it receives the replication updates but reject any client direct update).


    thank you everyone for the answers!!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?