Hi All,
hi Martin.
Thanks for the tip. Tried that sample configuration within the
server.xml file. Only edited servername/ip and port for the two
instances. But this, configured right in my opinion, always throw an
error on starting apacheds and apacheds server terminated and will not
run!
Then, Martin, I used your sample configuration. Now I was able to
start both ApacheDS Servers. But, I do get warnings and error messages.
The warnings I do get within apacheds-rolling.log on server1 is:
[13:20:28] WARN
[org.apache.directory.mitosis.service.protocol.handler.ReplicationClientProtocolHandler] - [apacheds4.douglas-informatik.de/172.28.192.12:389] Starting a partial replication log
transfer.
The warning is the same in apacheds-rolling.log on server2:
[13:34:37] WARN
[org.apache.directory.mitosis.service.protocol.handler.ReplicationClientProtocolHandler] - [apacheds3.douglas-informatik.de/172.28.192.11:389] Starting a partial replication log
transfer.
The error message I do get is the following and occurs when I try to
connect thru LDAP Studio (or any other ldap client) to either the one
or the other of the replicant ldap servers:
[13:39:35] WARN
[org.apache.directory.mitosis.service.protocol.handler.ReplicationServerProtocolHandler] - [/172.16.160.63:3726] Unexpected
exception.
org.apache.mina.filter.codec.ProtocolDecoderException: No appropriate
message decoder: 30 25 02 01 01 60 20 02 01 03 04 13 75 69 64 3D 61 64
6D 69 6E 2C 6F 75 3D 73 79 73 74 65 6D 80 06 73 65 63 72 65 74
(Hexdump: empty)
at
org.apache.mina.filter.codec.demux.DemuxingProtocolCodecFactory$ProtocolDecoderImpl.doDecode(DemuxingProtocolCodecFactory.java:314)
at
org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:137)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:163)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54)
at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:243)
at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:305)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Unknown Source)
[13:39:35] WARN
[org.apache.directory.mitosis.service.protocol.handler.ReplicationServerProtocolHandler] - [/172.16.160.63:3726] Unexpected
exception.
java.lang.NullPointerException
at
org.apache.directory.mitosis.service.protocol.handler.ReplicationServerContextHandler.contextEnd(ReplicationServerContextHandler.java:72)
at
org.apache.directory.mitosis.service.protocol.handler.ReplicationProtocolHandler.sessionClosed(ReplicationProtocolHandler.java:98)
at
org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.sessionClosed(AbstractIoFilterChain.java:677)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(AbstractIoFilterChain.java:321)
at
org.apache.mina.common.support.AbstractIoFilterChain.access$900(AbstractIoFilterChain.java:54)
at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed(AbstractIoFilterChain.java:781)
at
org.apache.mina.filter.LoggingFilter.sessionClosed(LoggingFilter.java:70)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(AbstractIoFilterChain.java:321)
at
org.apache.mina.common.support.AbstractIoFilterChain.access$900(AbstractIoFilterChain.java:54)
at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed(AbstractIoFilterChain.java:781)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(ProtocolCodecFilter.java:286)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(AbstractIoFilterChain.java:321)
at
org.apache.mina.common.support.AbstractIoFilterChain.access$900(AbstractIoFilterChain.java:54)
at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed(AbstractIoFilterChain.java:781)
at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:265)
at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:305)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Unknown Source)
So, why I am no longer able to bind to ldap server when replication is
configured? Can anybody help me with that? Help is really appreciated.
TIA,
Markus Pohle
Zitat von Martin Alderson <[EMAIL PROTECTED]>:
Hi Markus,
You should have a commented out configuration block for the
replication module in your default server.xml. If you can't find it
have a look at
http://svn.apache.org/viewvc/directory/apacheds/releases/1.5.0/server-main/server.xml?view=markup and search for "replication". Just uncomment that block and change the port numbers / addresses as
appropriate.
As an example, for server 1 (running on 10.0.0.1) use:
<bean
class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
<property name="name" value="replicationService" />
<property name="interceptor">
<bean
class="org.apache.directory.mitosis.service.ReplicationService">
<property name="configuration">
<bean
class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
<property name="replicaId">
<bean
class="org.apache.directory.mitosis.common.ReplicaId">
<constructor-arg>
<value>instance_a</value>
</constructor-arg>
</bean>
</property>
<property name="serverPort" value="10390" />
<property name="peerReplicas">
<set>
<value>[EMAIL PROTECTED]:10390</value>
</set>
</property>
</bean>
</property>
</bean>
</property>
</bean>
and for server 2 (running on 10.0.0.2) use:
<bean
class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
<property name="name" value="replicationService" />
<property name="interceptor">
<bean
class="org.apache.directory.mitosis.service.ReplicationService">
<property name="configuration">
<bean
class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
<property name="replicaId">
<bean
class="org.apache.directory.mitosis.common.ReplicaId">
<constructor-arg>
<value>instance_b</value>
</constructor-arg>
</bean>
</property>
<property name="serverPort" value="10390" />
<property name="peerReplicas">
<set>
<value>[EMAIL PROTECTED]:10390</value>
</set>
</property>
</bean>
</property>
</bean>
</property>
</bean>
I personally wouldn't recommend using this feature for production
servers though as it has a few problems. Check out the bugs on JIRA
and test it thoroughly for your use cases. I ended up making my
own copy of the mitosis source and hacking it around a bit to get
it performing the way I needed it.
Hope this helps,
Martin
Markus Pohle <[EMAIL PROTECTED]> 01/06/2007 21:00 >>>
Hi Alex,
thats correct... build-in replication support thru mitosis is in
apacheds version 1.5 only.
but still have the problem that I do not understand how to configure
the replication with two master ldap servers as described in my first
email.
did anybody from the core team configure the replication and tested
it? maybe someone can send me sample configuration file that I can use?
any help is really appreciated!!
TIA,
Markus Pohle
--
WEBUNITY - Internet, Consulting, Neue Medien
Markus Pohle (SCJP)
GPG Public Key Block available at:
http://www.webunity.de/[EMAIL PROTECTED]