Re: [javagroups-users] FD protocol w/ two hosts
Brought to you by:
belaban
From: Bela B. <be...@ya...> - 2004-07-19 03:47:39
|
Can you set TCP.bind_addr as well ? Should only matter when you have multiple NICs Les Hazlewood wrote: > Bela, > > Thanks very much for the response. I spent most of my last day or so > playing with configurations after reading your reply. > > But I'm still not getting any luck. > > Please try this from two different machines: > > java -cp jgroups.jar org.jgroups.demos.NotificationBusDemo -bus_name > test-group -props > "TCP(start_port=7800):TCPPING(initial_hosts=192.168.0.1[7800],192.168.0.2[7900];num_initial_members=2;up_thread=true;down_thread=true):MERGE2(min_interval=5000;max_interval=10000):FD:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(down_thread=true;up_thread=true;gc_lag=100;retransmit_timeout=3000):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=false)" > > After they've both started and you receive membership notification on > both, unplug the network cable from one of the machines. Wait about > 10 to 20 seconds and then plug it back in. > > On my boxes, they're not finding each other after plugging back in. I > tried both the MERGE2 and MERGEFAST protocols to no avail. I tried > switching the initial_hosts order as well, and still no luck. > > Am I doing something wrong? Are my configuration settings for the > stack incorrect? > > Any insight would be graciously received. > > Regards, > > Les > > > -----Original Message----- > From: Bela Ban [mailto:be...@ya...] > Sent: Mon 6/21/2004 12:52 PM > To: Les Hazlewood > Cc: jav...@li... > Subject: Re: [javagroups-users] FD protocol w/ two hosts > > Hi Les, > > simple: add the MERGE2 protocol to your stack, e.g.: > > ... > <PING timeout="2000" num_initial_members="3"/> > <MERGE2 max_interval="10000" min_interval="5000"/> > <FD timeout="2000" max_tries="3" shun="true"/> > ... > > > You may also want to experiment with MERGEFAST. > > Les Hazlewood wrote: > > >Hiya folks, > > > >First off, I'd like to say this is my first time using JGroups > directly (i.e. not as an 'oem' feature, like w/ JBoss), and I'm very > happy with its architecture and simplicity. Cheers to Bela and the > rest of you working on this great product. > > > >Ok, here's my setup/issue: > > > >I'll be deploying in a WAN environment, and in my LAN and simulated > WAN tests, I have two servers. They both use the NotificationBus > under the hood to take care of group membership notification and > messaging. They both need Failure Detection to know of each other's > existence. > > > >FD works great with both UDP/PING multicast as well as TCP/TCPPING. > Each server can detect when there is a legitimate crash or the > opposing member explicitly leaves the group. > > > >The one issue I have is the following: > > > >Server A and B have both started and both joined the group and are > both aware of each other. > > > >To simulate a WAN link going down or being disrupted, I unplug the > network cable from one of the machines, and they both correctly detect > the "failure" of the other and do their necessary exclusion processing. > > > >When I plug in the network cable 10 to 20 seconds after unplugging it > to simulate network reconnection, the servers can't "find" each other > unless I manually restart the NotificationBus on one of them. > > > >After reading the JavaDoc for FD, I realized this is because pinging > behavior stops after the group membership count drops below 2. This > means that upon a detected member leaving the group, it won't ever try > to ping/communicate with that member again until the remote member > explicitly indicates it is back online. > > > >This means FD can't resolve the network conditions I just > described/tested. > > > >Now, I understand what I want isn't just failure detection. What I > want is more of a true heartbeat mechanism. > > > >Is there a way I can get the functionality I desire with some other > form of FD or other JGroups Protocol? > > > >I tested out FD_SOCK as well, but that doesn't tell me when a machine > fails fast enough. Excluding the VERIFY_SUSPECT time, I require > knowing within 5 seconds of a machine failure. Because FD_SOCK relies > on socket timeouts (2 - 10/12 minutes), that isn't sufficient for my > requirements. > > > >If JGroups doesn't provide this functionality already, is there a way > I can insert my own Protocol in the stack? > > > >My assumption would be that each protocol corresponds to a name of a > class (e.g. FD or VERIFY_SUSPECT or pbcast.FD) relative to a base > default package (org.jgroups.protocols). If I wanted to create my own > protocol in the stack, can I specify the fully qualified class name in > the stack string? Would that work? > > > >Example: > > > >"UDP(.....):PING(.....):com.my.company.pkg.HEARTBEAT(.....):..." etc. > > > >Naturally, I would only want to do this if JGroups doesn't support > what I'm looking for. > > > >Does anyone have any feedback for me? Anyone? > Bueller....Bueller....? ;) > > > >Regards, and thanks for dealing with the long email. > > > >Les Hazlewood > >ers= > > > > -- > Bela Ban > Lead JGroups / JBossCache > > > > > -- Bela Ban Lead JGroups / JBossCache |