You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ramit Arora <ra...@gmail.com> on 2008/03/26 21:48:26 UTC

Shared Filesystem Master/Slave doesn't work even on 5.1 SNAPSHOT

Hi,
I am trying to get a Master/Slave topology to work. I tried pure
Master/Slave in 5.0.0, but I faced problems mentioned in the thread:

http://www.nabble.com/Pure-Master-Slave---Out-of-sync-exceptions-td16296691s2354.html

So, I thought I'll give shared file system Master/Slave a go. I understand
that it doesn't work on 5.0.0., so I downloaded the binary unix installation
of apache-activemq-5.1-20080325.

It has the following problems:
1. Durable subscribers donot get messages after failing over to the slave
broker. They failover successfully, but the slave's web console shows them
as OFFLINE. The subscribers keep running, waiting for messages but they
never get them. If I restart the subscribers, I get the following stack
trace:

Caught: javax.jms.InvalidClientIDException: Broker: localhost - Client: a
already connected from /200.200.200.29:62970
javax.jms.InvalidClientIDException: Broker: localhost - Client: a already
connected from /200.200.200.29:62970
        at
org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:211)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at
org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:74)
        at
org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88)
        at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:663)
        at
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
        at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:293)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:181)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:141)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
        at java.lang.Thread.run(Thread.java:619)

2. Non-durable subscribers do failover & receive messages. However, if I
have a slow subscriber, it misses messages on failover. Eg. When the master
dies, if 100 messages were published & only 30 were received by the
subscriber, the remaining 70 messages are lost. The subscriber starts
receiving from 101.

The absence of a stable master/slave topology is becoming a real problem for
us. Somebody please advise us what needs to be done.

Thanks,
Ramit

-- 
View this message in context: http://www.nabble.com/Shared-Filesystem-Master-Slave-doesn%27t-work-even-on-5.1-SNAPSHOT-tp16315761s2354p16315761.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Shared Filesystem Master/Slave doesn't work even on 5.1 SNAPSHOT

Posted by Ramit Arora <ra...@gmail.com>.
Hi,
Replying to my own message, the problem may be due to the following whenever
I start a broker (or if a slave becomes a master):

INFO  AMQPersistenceAdapter          - Aquired lock for AMQ
Store/shared/activemq
INFO  AMQPersistenceAdapter          - AMQStore starting using directory:
/shared/activemq/
INFO  KahaStore                      - Kaha Store using data directory
/shared/activemq/kr-store/state
INFO  AMQPersistenceAdapter          - Active data files: []
WARN  AMQPersistenceAdapter          - The ReferenceStore is not valid -
recovering ...
INFO  KahaStore                      - Kaha Store successfully deleted data
directory /shared/activemq/kr-store/data
INFO  AMQPersistenceAdapter          - Journal Recovery Started from:
DataManager:(data-)
INFO  AMQPersistenceAdapter          - Recovered 0 operations from redo log
in 0.022 seconds.
INFO  AMQPersistenceAdapter          - Finished recovering the
ReferenceStore
INFO  KahaStore                      - Kaha Store using data directory
/shared/activemq/kr-store/data

Is it normal for the broker to delete the kr-store/data directory? Any ideas
are most appreciated.

Thanks,
Ramit


Ramit Arora wrote:
> 
> Hi,
> I am trying to get a Master/Slave topology to work. I tried pure
> Master/Slave in 5.0.0, but I faced problems mentioned in the thread:
> 
> http://www.nabble.com/Pure-Master-Slave---Out-of-sync-exceptions-td16296691s2354.html
> 
> So, I thought I'll give shared file system Master/Slave a go. I understand
> that it doesn't work on 5.0.0., so I downloaded the binary unix
> installation of apache-activemq-5.1-20080325.
> 
> It has the following problems:
> 1. Durable subscribers donot get messages after failing over to the slave
> broker. They failover successfully, but the slave's web console shows them
> as OFFLINE. The subscribers keep running, waiting for messages but they
> never get them. If I restart the subscribers, I get the following stack
> trace:
> 
> Caught: javax.jms.InvalidClientIDException: Broker: localhost - Client: a
> already connected from /200.200.200.29:62970
> javax.jms.InvalidClientIDException: Broker: localhost - Client: a already
> connected from /200.200.200.29:62970
>         at
> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:211)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>         at
> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:74)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:663)
>         at
> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:293)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:181)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
>         at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:141)
>         at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
>         at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
>         at java.lang.Thread.run(Thread.java:619)
> 
> 2. Non-durable subscribers do failover & receive messages. However, if I
> have a slow subscriber, it misses messages on failover. Eg. When the
> master dies, if 100 messages were published & only 30 were received by the
> subscriber, the remaining 70 messages are lost. The subscriber starts
> receiving from 101.
> 
> The absence of a stable master/slave topology is becoming a real problem
> for us. Somebody please advise us what needs to be done.
> 
> Thanks,
> Ramit
> 
> 

-- 
View this message in context: http://www.nabble.com/Shared-Filesystem-Master-Slave-doesn%27t-work-even-on-5.1-SNAPSHOT-tp16315761s2354p16323984.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.