Skip navigation
Currently Being Moderated

IHM transparent failover with  BlazeDS - Cluster : problem

Jan 27, 2009 10:29 AM

Hello,
We are prototyping a clustered BlazeDS / Flex solution,
and we can't find out how to make the failover mechanism work 'every time'.

We need our IHM to (re)connect transparently to a destination in case of a BlazeDS server failure.

Our architecture looks like :
-----------------------------
Client Layer : MS-IE / Flash player 10
Flex application consuming streaming AMF messages.

L1 Layer : two linux servers whith a tomcat 6 server / jdk 1.5
BlazeDS exposes a clustered destination (with JGroups) via a Streaming AMF Channel.
Data are obtained via the JMSadapter from a remote JMS source.

L2 Layer : linux servers whith a tomcat 6 server / activeMQ 5.1 / jdk 1.5
JMS Broker serving a JMS Topic.
JMS Producer.


We ran the following test and gets various results :
-----------------------------

1- Start the L2 JMS-Producer.

2- Start L1-a and L1-b BlazeDS servers :
We can notice that the Jgroups Cluster is starting correctly.

3- Start an IHM with http://L1-a:8180/.... :
Connection works perfectly.
DS-Console@L1-a JMS-Consumer count is 1.
DS-Console@L1-a Message-Suscribers count is 1.

4- Start an IHM on http://L2-a:8180/.... :
Connection works perfectly.
DS-Console@L2-a JMS-Consumer count is 1.
DS-Console@L2-a Message-Suscribers count is 1.

5- Now we kill the tomcat server on L1-a (ctrl/C)
IHM on L2-a continues to work OK.

IHM on L1-a : detects 'connection loss'
On this event, we re-create the consumer ... but it rarely reconnects.

Most of the time (95/100 !) we have an error on IHM :"Consumer subscribe error - The consumer was not able to subscribe to its target destination."
The DS-console on L2-a gives the following information at this point :
- StreamingAMF / Streaming Client count = 1
- MessageDestination.JMSAdapter, topicConsumerCount = 0
- MessageService.MessageDestination.SubscriptionManager, SubscriberCount = 0

Sometimes, we get a error message on the server : "max-streaming-connection-per-session limit of 1 exceeded"

If we set down the network interface of L1-a, the problem occurs 100% of the time

Does anybody knows why this clusterd solution doesn't want to work ?
Thanks for your help.
 
Replies
  • Currently Being Moderated
    Feb 1, 2009 11:17 AM   in reply to (Quentin_Buonanno)
    Hi. So, if everything is working correctly the Consumer should be failing over to the new server without you needing to do anything. I'm not sure why you are listening for a disconnect event and then re-creating the Consumer. You shouldn't need to do that.

    When you are using a destination that is clustered, the client should get a list of the other servers in the cluster when it connects to the first server. On the Channel you are using, this list of servers is kept in the failoverURIs property.

    When the client gets disconnected from the server it is connected over, it should go through the list of endpoints in the failoverURIs property and try to connect to each endpoint listed there.

    You should be able to see this happening if you turn on client side logging. Here are instructions for how to do this if you haven't done it before.

    http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content =build_apps_6.html

    When you kill the Tomcat server on L1-a, when you look at the flashlog you should see the client connected to L1-a lose it's connection and then attempt to failover to another endpoint from the list of failoverURIs. If you see something different please respond back and include the contents of your flashlog.txt and I'll take a look.

    Thanks.

    -Alex
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)