Re: [jgroups-users] problem with cluster merge after startup user error

Questions/problems related to using JGroups <[email protected]> Fri, 6 Apr 2018 12:01:45 +0200
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.53387.1523010425.919.javagroups-users@lists.sourceforge.net>

On 05/04/18 22:14, Questions/problems related to using JGroups wrote:
> Hi all,
> 
> Using JGroups 4.0.8.Final and a tcp-based stack (code to generate it 
> below), we have an issue when a user starts the 2nd node with some wrong 
> info. I bet you know where I'm going with this, but we start A and it 
> has B's ip:port in initial_hosts. Since B isn't running we have a 1-node 
> cluster A.
> 
> Then someone starts B but has the wrong port for A in initial_hosts. So 
> it doesn't find A and we have two 1-node clusters. After some time (~50 
> to 90 seconds), A sends a discovery request again and finds B, and they 
> end up merging.

OK

> This causes some problems for us because B doesn't perform 
> non-coordinator tasks that should have happened at startup, and it could 
> be very confusing to users to try to debug why they don't have an A/B 
> cluster and suddenly they do. Also sometimes B becomes the coordinator, 
> which could affect starting other nodes. (Either way, they both have 
> incorrect copies of the cluster state shared with STATE_TRANSFER.)
> 
> Do you have a suggested way to change our setup so that, once A and B 
> start and don't find each other, they stay that way?

That's kind of a strange requirement and I'm not sure I understand... 
You could dynamically remove TCPPING and/or MERGE3 from the running node 
and thus disable merging. But don't you want the 2 nodes to eventually 
end up in the same cluster?


> Thanks,
> Bobby
> 
> Our channel creation code:
> 
>          List<Protocol> stack = new ArrayList<>();
>          stack.add(new TCP()
>              .setValue("bind_addr", InetAddress.getByName(<our address 
> set by user>))
>              .setValue("bind_port", bindingPort)
>              .setValue("thread_pool_min_threads", 1)
>              .setValue("thread_pool_keep_alive_time", 5000)
>              .setValue("send_buf_size", 640000)
>              .setValue("sock_conn_timeout", 300)
>              .setValue("recv_buf_size", 5000000));
>          stack.add(new TCPPING()
>              .setValue("initial_hosts", <get hosts set by user>)
>              .setValue("send_cache_on_join", true)
>              .setValue("port_range", 0));        }
>          stack.add(new MERGE3()
>              .setValue("min_interval", 10000)
>              .setValue("max_interval", 30000));
>          stack.add(new FD_ALL()
>              .setValue("timeout", getJGroupsTotalTimeout() * 1000L));
>          stack.add(new VERIFY_SUSPECT()
>              .setValue("timeout", 1500));
>          stack.add(new BARRIER());
>          stack.add(new NAKACK2()
>              .setValue("use_mcast_xmit", false));
>          stack.add(new UNICAST3());
>          stack.add(new STABLE()
>              .setValue("desired_avg_gossip", 50000)
>              .setValue("max_bytes", 4000000));
>          stack.add(<custom auth protocol>);
>          stack.add(new GMS()
>              .setValue("join_timeout", 3000));
>          stack.add(new MFC()
>              .setValue("max_credits", 2000000)
>              .setValue("min_credits", 800000));
>          stack.add(new FRAG2());
>          stack.add(new STATE_TRANSFER());
>          return new JChannel(stack);
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> 
> 
> 
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
> 

-- 
Bela Ban | http://www.jgroups.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
javagroups-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javagroups-users