OPENDJ Replication Master Slave

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

  • Author
    Posts
  • #21359
     miky7
    Participant

    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 opendj.first.com \
     --port1 4444 \
     --bindDN1 "cn=Directory Manager" \
     --bindPassword1 pass \
     --noReplicationServer1 \
     --host2 opendj.second.com \
     --port2 4444 \
     --bindDN2 "cn=Directory Manager" \
     --bindPassword2 pass \
     --replicationPort2 8989 \
     --onlyReplicationServer2 \
     --trustAll \
     --no-prompt

    and

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

    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!!

    #21360
     JnRouvignac
    Participant

    Hello,

    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 opendj.first.com \
    –port1 4444 \
    –bindDN1 “cn=Directory Manager” \
    –bindPassword1 pass \
    –noReplicationServer1 \
    –host2 opendj.second.com \
    –port2 4444 \
    –bindDN2 “cn=Directory Manager” \
    –bindPassword2 pass \
    –replicationPort2 8989 \
    –onlyReplicationServer2 \
    –trustAll \
    –no-prompt
    `

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

    Cheers,
    Jean-Noel

    Side-note: there is no such thing as master/slave with ForgeRock Directory Services. There is only one supported mode: multi-master. See https://en.wikipedia.org/wiki/Multi-master_replication

    #21361
     Ludo
    Moderator

    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).
    https://backstage.forgerock.com/docs/ds/5.5/admin-guide/#read-only-repl

    #21380
     miky7
    Participant

    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.

©2020 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?