Re: [jgroups-users] JGroups SimpleChat - not working - Need help

Questions/problems related to using JGroups <[email protected]> Fri, 12 Oct 2018 14:40:46 +0800
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.32462.1539326467.1387.javagroups-users@lists.sourceforge.net>
Noted with thanks, will keep you updated.

😊

On Fri, 12 Oct 2018 at 2:39 PM, Questions/problems related to using JGroups
<[email protected]> wrote:

> OK, so the test cluster ChatCluster works. I assume it is your real
> project which doesn't work? Make sure you use the same configuration and
> also set the bind_addr!
>
> On 12/10/18 08:26, Questions/problems related to using JGroups wrote:
> > Are you sure you're binding to the right network interface? What does
> > the startup show as bind_addr in TCP? I suggest explicitly set
> > TCP.bind_addr to 10.1.0.11 or 10.1.0.4 (or use bind_addr="site_local").
> >
> > Below is the log files for the sample program. Will send across the log
> > for the project as well.
> >
> >
> ###############################################################################################################################################################
> >
> > azureuser@POCCluster1:~/test/jgroups-3.6.16.Final$ java
> > -Djava.net.preferIPv4Stack=true jGroupTest.ClusterTest
> > Start creating channel
> > Oct 12, 2018 6:13:08 AM org.jgroups.stack.Configurator
> resolveAndAssignField
> > WARNING: JGRP000014: BasicTCP.use_send_queues has been deprecated: will
> > be removed in 4.0
> > only connect if we are not a unicast channel : cluster_name : ChatCluster
> > Event Name : connect_event : CONNECT_USE_FLUSH, arg=ChatCluster
> >
> > -------------------------------------------------------------------
> > GMS: address=POCCluster1-8872, cluster=ChatCluster, physical
> > address=10.1.0.11:7801 <http://10.1.0.11:7801>
> > -------------------------------------------------------------------
> > ** view: [POCCluster1-8872|0] (1) [POCCluster1-8872]
> > Done creating channel
> >  > Oct 12, 2018 6:13:14 AM org.jgroups.util.SuppressLog log
> > WARNING: JGRP000012: discarded message from different cluster poc-chat
> > (our cluster is ChatCluster). Sender was
> > 433ced63-94b6-51be-1f09-d356ea247388
> > Oct 12, 2018 6:13:48 AM org.jgroups.util.SuppressLog log
> > WARNING: JGRP000012: discarded message from different cluster poc-chat
> > (our cluster is ChatCluster). Sender was
> > b3df19e1-264c-e81c-314f-07410caa2a31
> > ** view: [POCCluster1-8872|1] (2) [POCCluster1-8872, POCCluster3-40705]
> > Received a message !!!
> > POCCluster3-40705: [azureuser] test
> >
> >
> ##############################################################################################################################################################
> >
> > azureuser@POCCluster3:~/test/jgroups-3.6.16.Final$ java
> > -Djava.net.preferIPv4Stack=true jGroupTest.ClusterTest
> > Start creating channel
> > Oct 12, 2018 6:13:51 AM org.jgroups.stack.Configurator
> resolveAndAssignField
> > WARNING: JGRP000014: BasicTCP.use_send_queues has been deprecated: will
> > be removed in 4.0
> > only connect if we are not a unicast channel : cluster_name : ChatCluster
> > Event Name : connect_event : CONNECT_USE_FLUSH, arg=ChatCluster
> >
> > -------------------------------------------------------------------
> > GMS: address=POCCluster3-40705, cluster=ChatCluster, physical
> > address=10.1.0.4:7801 <http://10.1.0.4:7801>
> > -------------------------------------------------------------------
> > ** view: [POCCluster1-8872|1] (2) [POCCluster1-8872, POCCluster3-40705]
> > Done creating channel
> >  > test
> > Sending message !!! [azureuser] test
> > Sending message done!!!
> >  > Received a message !!!
> > POCCluster3-40705: [azureuser] test
> > Oct 12, 2018 6:14:03 AM org.jgroups.util.SuppressLog log
> > WARNING: JGRP000012: discarded message from different cluster poc-chat
> > (our cluster is ChatCluster). Sender was
> > 433ced63-94b6-51be-1f09-d356ea247388
> >
> >
> ###############################################################################################################################################################
>
> >
> >
> > On Fri, 12 Oct 2018 at 00:34, Questions/problems related to using
> > JGroups <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >     Are you sure you're binding to the right network interface? What does
> >     the startup show as bind_addr in TCP? I suggest explicitly set
> >     TCP.bind_addr to 10.1.0.11 or 10.1.0.4 (or use
> bind_addr="site_local").
> >
> >     On 11/10/18 12:39, Questions/problems related to using JGroups wrote:
> >      > Hi Bela,
> >      >
> >      > Thank you for your response.
> >      >
> >      > BB: Can you upgrade JGroups to 3.6.16 (latest 3.6.x release)?
> >      >
> >      > Brady: No as of now we haven't upgraded to 3.6.16, I am still
> using
> >      > 3.6.10-Final. Will upgrade to 3.6.16 as well.
> >      >
> >      > BB: What do you mean? TCPPING.initial_hosts?
> >      >
> >      > Brady: <TCPPING async_discovery="true"
> >      >
> >      >
> >
>  initial_hosts="${jgroups.tcpping.initial_hosts:10.1.0.11[7800],10.1.0.4[7800]}"
> >      >               port_range="2"/>
> >      >
> >      > BB: Actually, are you using this on Azure? Then UDP:PING won't
> >     work as IP
> >      > multicasting is not supported on Azure. What's your config?
> >      >
> >      > Brady: Below is the ifconfig details, and the tcp.xml & the java
> >     code
> >      > which I modified and working fine, the messages are getting
> >     replicated
> >      > now in the sample one which I have attached.
> >      >
> >      > *_IFCONFIG:_*
> >      > *_
> >      > _*
> >      >
> >
>  ###########################################################################################################
> >      >
> >      > azureuser@POCCluster1:~$ ifconfig
> >      > eth0      Link encap:Ethernet  HWaddr 00:0d:3a:a1:06:b7
> >      >            inet addr:10.1.0.11  Bcast:10.1.0.255
> Mask:255.255.255.0
> >      >            inet6 addr: fe80::20d:3aff:fea1:6b7/64 Scope:Link
> >      >            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >      >            RX packets:27668611 errors:0 dropped:2 overruns:0
> frame:0
> >      >            TX packets:35145324 errors:0 dropped:0 overruns:0
> >     carrier:0
> >      >            collisions:0 txqueuelen:1000
> >      >            RX bytes:13776216781 (13.7 GB)  TX bytes:6677642951
> >     (6.6 GB)
> >      >
> >      > lo        Link encap:Local Loopback
> >      >            inet addr:127.0.0.1  Mask:255.0.0.0
> >      >            inet6 addr: ::1/128 Scope:Host
> >      >            UP LOOPBACK RUNNING  MTU:65536  Metric:1
> >      >            RX packets:361589 errors:0 dropped:0 overruns:0 frame:0
> >      >            TX packets:361589 errors:0 dropped:0 overruns:0
> carrier:0
> >      >            collisions:0 txqueuelen:1
> >      >            RX bytes:87320166 (87.3 MB)  TX bytes:87320166 (87.3
> MB)
> >      >
> >      >
> >      >
> >
>  ###########################################################################################################
> >      >
> >      > azureuser@POCCluster3:~$ ifconfig
> >      > eth0      Link encap:Ethernet  HWaddr 00:0d:3a:a0:71:7f
> >      >            inet addr:10.1.0.4  Bcast:10.1.0.255
> Mask:255.255.255.0
> >      >            inet6 addr: fe80::20d:3aff:fea0:717f/64 Scope:Link
> >      >            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >      >            RX packets:35882350 errors:0 dropped:1 overruns:0
> frame:0
> >      >            TX packets:38161526 errors:0 dropped:0 overruns:0
> >     carrier:0
> >      >            collisions:0 txqueuelen:1000
> >      >            RX bytes:17756705340 (17.7 GB)  TX bytes:8124894773
> >     (8.1 GB)
> >      >
> >      > lo        Link encap:Local Loopback
> >      >            inet addr:127.0.0.1  Mask:255.0.0.0
> >      >            inet6 addr: ::1/128 Scope:Host
> >      >            UP LOOPBACK RUNNING  MTU:65536  Metric:1
> >      >            RX packets:7621310 errors:0 dropped:0 overruns:0
> frame:0
> >      >            TX packets:7621310 errors:0 dropped:0 overruns:0
> carrier:0
> >      >            collisions:0 txqueuelen:1
> >      >            RX bytes:1379999399 (1.3 GB)  TX bytes:1379999399 (1.3
> GB)
> >      >
> >
>  ###########################################################################################################
> >      >
> >      > *_TCP.XML_*
> >      > Attached.
> >      >
> >      > _Java Code (renamed as .txt)_:
> >      > Attached.
> >      >
> >      > But now when we try to implement in our code we are getting
> >      > "java.lang.IllegalStateException: channel is disconnected
> >      >          at
> >      > org.jgroups.JChannel.checkClosedOrNotConnected(JChannel.java:971)
> >      >          at org.jgroups.JChannel.send(JChannel.java:427)
> >      >          at
> >      >
> >
>  com.ncs.beconnect.share.server.service.impl.JGroupsReceiveService.init(JGroupsReceiveService.java:88)"
> >      >
> >      > I am using the same default TCP.xml (the one which I have
> attached),
> >      > however, we would need to have the TCP_NIO2 protocol and it is not
> >      > working for this protocol (I mean the sample code which I have
> >     attached)
> >      >
> >      > Requesting for your help and suggestion.
> >      >
> >      > Thanks in advance.
> >      >
> >      > Warm Regards,
> >      >
> >      > Brady...
> >      >
> >      >
> >      >
> >      >
> >      > _______________________________________________
> >      > javagroups-users mailing list
> >      > [email protected]
> >     <mailto:[email protected]>
> >      > https://lists.sourceforge.net/lists/listinfo/javagroups-users
> >      >
> >
> >     --
> >     Bela Ban | http://www.jgroups.org
> >
> >
> >
> >     _______________________________________________
> >     javagroups-users mailing list
> >     [email protected]
> >     <mailto:[email protected]>
> >     https://lists.sourceforge.net/lists/listinfo/javagroups-users
> >
> >
> >
> >
> >
> > _______________________________________________
> > javagroups-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/javagroups-users
> >
>
> --
> Bela Ban | http://www.jgroups.org
>
>
>
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
>

_______________________________________________
javagroups-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javagroups-users