apache - ApacheDS Multi Master config -
i'm looking help apacheds multi master solution. i'm new setting ldap solutions , it's quite possible i'm making pretty basic errors.
i have 2 centos vm's running - ldap1 , ldap2. each vm having running apacheds solution. ldap1 running apacheds on port 10389 , ldap2 running apacheds on port 10399.
i can connect both servers using apache directory studio no problems , can see default structures listed.
i have imported sevenseas construction ldap1, , enabled debug both ldap1 , ldap2 replication uncommenting lines in /instances/default/conf/log4j.properties
log4j.logger.org.apache.directory.server.provider_log=debug log4j.logger.org.apache.directory.server.consumer_log=debug
i effort create multimaster config next guide : http://joacim.breiler.com/apacheds/ch08s02.html
1) enable replication handler on ldap1 importing next ldif
dn: ads-serverid=ldapserver,ou=servers,ads-directoryserviceid=default,ou=config changetype: modify add: ads-replreqhandler ads-replreqhandler: org.apache.directory.server.ldap.replication.provider.syncreplrequesthandler
2) enable replication handler on ldap2 importing same ldif above
3) restart both ldap1 , ldap2 apacheds servers.
4) 1 time server restarts check apacheds.log , see next entries ( on both ldap1 , ldap2)
[08:41:28] debug [org.apache.directory.server.provider_log] - initializing syncrepl provider [08:41:28] debug [org.apache.directory.server.provider_log] - starting replication consumer manager [08:41:28] debug [org.apache.directory.server.provider_log] - no replica logs found initialize [08:41:28] debug [org.apache.directory.server.provider_log] - syncrepl provider initialized
5) import next ldif on ldap2 (no errors generated)
dn: ads-replconsumerid=1,ou=replconsumers,ads-serverid=ldapserver,ou=servers,ads-directoryserviceid=default,ou=config objectclass: ads-base objectclass: ads-replconsumer objectclass: top ads-replaliasderefmode: never ads-replattributes: * ads-replconsumerid: 1 ads-replprovhostname: ldap1 ads-replprovport: 10389 ads-replrefreshinterval: 60000 ads-replrefreshnpersist: true ads-replsearchfilter: (objectclass=*) ads-replsearchscope: sub ads-replsearchsizelimit: 0 ads-replsearchtimeout: 0 ads-repluserdn: uid=admin,ou=system ads-repluserpassword:: c2vjcmv0 ads-searchbasedn: o=sevenseas
6) import next ldif on ldap1
dn: ads-replconsumerid=2,ou=replconsumers,ads-serverid=ldapserver,ou=servers,ads-directoryserviceid=default,ou=config objectclass: ads-base objectclass: ads-replconsumer objectclass: top ads-replaliasderefmode: never ads-replattributes: * ads-replconsumerid: 2 ads-replprovhostname: ldap2 ads-replprovport: 10399 ads-replrefreshinterval: 60000 ads-replrefreshnpersist: true ads-replsearchfilter: (objectclass=*) ads-replsearchscope: sub ads-replsearchsizelimit: 0 ads-replsearchtimeout: 0 ads-repluserdn: uid=admin,ou=system ads-repluserpassword:: c2vjcmv0 ads-searchbasedn: o=sevenseas
7) effort restart ldap1 , ldap2 apacheds servers , nail next error on both servers. (reported in apacheds.log
08:52:42] error [org.apache.directory.server.config.configpartitionreader] - error occured while reading configuration dn 'ou=replconsumers,ads-serverid=ldapserver,ou=servers,ads-directoryserviceid=default,ou=config' objectclass 'ads-replconsumer': err_04274 can't find oid name ads-base [08:52:42] error [org.apache.directory.server.uberjarmain] - failed start service. org.apache.directory.server.config.configurationexception: error occured while reading configuration dn 'ou=replconsumers,ads-serverid=ldapserver,ou=servers,ads-directoryserviceid=default,ou=config' objectclass 'ads-replconsumer': err_04274 can't find oid name ads-base @ org.apache.directory.server.config.configpartitionreader.read(configpartitionreader.java:641) @ org.apache.directory.server.config.configpartitionreader.read(configpartitionreader.java:600) @ org.apache.directory.server.config.configpartitionreader.read(configpartitionreader.java:600) @ org.apache.directory.server.config.configpartitionreader.readconfig(configpartitionreader.java:754) @ org.apache.directory.server.config.configpartitionreader.readconfig(configpartitionreader.java:718) @ org.apache.directory.server.config.configpartitionreader.readconfig(configpartitionreader.java:690) @ org.apache.directory.server.apachedsservice.start(apachedsservice.java:177) @ org.apache.directory.server.uberjarmain.start(uberjarmain.java:76) @ org.apache.directory.server.uberjarmain.main(uberjarmain.java:54)
8) reverted config before import allow me restart servers
9) if remove next line ldif used in point 5 / 6, i'm able start servers.
objectclass: ads-base
10) debug (on both ldap1 , ldap2) reflects the replication working
[09:02:31] debug [org.apache.directory.server.provider_log] - initializing syncrepl provider [09:02:31] debug [org.apache.directory.server.provider_log] - starting replication consumer manager [09:02:31] debug [org.apache.directory.server.provider_log] - no replica logs found initialize [09:02:31] debug [org.apache.directory.server.provider_log] - syncrepl provider initialized
11) login ldap2 , not see partition o=sevenseas - me says replication hasn't worked ? have missed stage ?
update i've been able create more progress on this. whilst using apache directory studio tool - stumbled on server configuration tabs (right click on ldap connection). amongst tabs replication tab. allows add together consumers. on ldap1 added consumer point ldap2 , on ldap2 added consumer point ldap1, basedn ou=system. consumer id appears need match id's given in point 5 /6.
i restarted both ldap servers.
when servers restarted see talking each other (via debug). made edit ou_system partition on ldap1 , replicated ldap2. made edit ou=system partition on ldap2 , replicated ldap1.
my issue cannot replicate other partitions - no matter base of operations dn in consumer config.
i guess started working on same issue @ same time today. replication custom partition seems work when set cache 1000 partition.
apache apacheds
No comments:
Post a Comment