-
1. Re: HornetQ 2.3.0.Alpha replication journal synchronization
qtm Aug 31, 2012 3:35 AM (in response to qtm)The example I've tried couldn't have worked on 2.3.0Alpha(it was specified in the documentation that the failback example doesn't work). I've tried the trunk version, but I think I'm missing something, because after restarting the live server (replication works fine for a little while) the back-up node dies:
HQ112044: error starting server locator: HornetQException[errorType=ILLEGAL_STATE message=null]
at org.hornetq.core.client.impl.ServerLocatorImpl.initialise(ServerLocatorImpl.java:350) [hornetq-core.jar:]
ERROR [org.hornetq.core.server] HQ114036: Failed to decode packet: java.lang.IllegalStateException: Missing replication token on the queue.
at org.hornetq.core.replication.ReplicationManager.replicated(ReplicationManager.java:407) [hornetq-core.jar:]
My configuration:
live:
[..]
<failover-on-shutdown>true</failover-on-shutdown>
<shared-store>false</shared-store>
<allow-failback>true</allow-failback>
<check-for-live-server>true</check-for-live-server>
<journal-type>ASYNCIO</journal-type>
<connectors>
<connector name="netty-connector">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="[my_ip]"/>
<param key="port" value="5445"/>
</connector>
<connector name="netty-connector-2">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="[my_ip]"/>
<param key="port" value="5545"/>
</connector>
</connectors>
<!-- Acceptors -->
<acceptors>
<acceptor name="netty-acceptor">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="[my_ip]"/>
<param key="port" value="5445"/>
</acceptor>
</acceptors>
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
<connector-ref>netty-connector</connector-ref>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>true</forward-when-no-consumers>
<max-hops>1</max-hops>
<static-connectors>
<connector-ref>netty-connector-2</connector-ref>
</static-connectors>
</cluster-connection>
</cluster-connections>
[..]
back-up:
<failover-on-shutdown>true</failover-on-shutdown>
<shared-store>false</shared-store>
<backup>true</backup>
<allow-failback>true</allow-failback>
<check-for-live-server>true</check-for-live-server>
<journal-type>ASYNCIO</journal-type>
<connectors>
<connector name="netty-connector">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="[my_ip]"/>
<param key="port" value="5545"/>
</connector>
<connector name="netty-connector-2">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="[my_ip]"/>
<param key="port" value="5445"/>
</connector>
</connectors>
<!-- Acceptors -->
<acceptors>
<acceptor name="netty-acceptor">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="[my_ip]"/>
<param key="port" value="5545"/>
</acceptor>
</acceptors>
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
<connector-ref>netty-connector</connector-ref>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>true</forward-when-no-consumers>
<max-hops>1</max-hops>
<static-connectors>
<connector-ref>netty-connector-2</connector-ref>
</static-connectors>
</cluster-connection>
</cluster-connections>
What else needs to be added?