New cluster / channel are failing after 9 are created successfully

32 views
Skip to first unread message

Raju Panwar

unread,
Feb 20, 2024, 4:28:32 AM2/20/24
to jgroups-dev
Hi,

We are running jgroups 4.2.22.
 Following is the protocols stack.


<config
                xmlns="urn:org:jgroups"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
                <TCP
                                bind_addr="ip1"
                                bind_port="7901"
                                max_bundle_size="264k"
                                tcp_nodelay="true"
                                thread_pool.enabled="false"/>
                <TCPPING
                                initial_hosts="ip1[7901],ip2[7901]"
                                port_range="20"/>
                <FD_SOCK/>
                <FRAG2
                                frag_size="200000"/>
                <pbcast.NAKACK2
                                use_mcast_xmit="false"
                                discard_delivered_msgs="true"/>
                <pbcast.STABLE
                                desired_avg_gossip="20000"
                                stability_delay="2000"/>
                <pbcast.GMS
                                join_timeout="5000"
                                print_local_addr="true"/>
</config>


I am trying to create 12 channels.
We are creating separate cluster for each channels.
When we are trying to connect a channel, we are assigning it with new cluster name.
Cluster name are consists of channel number, i.e 0, 1, 2, 3.....11.

_channel.setName("Cluster" + "-datachannel_" + channelNumber);
_channel.connect(_connStr);

When we starts application, channel are created up to number 9 only. That means 0, 1, 2, 3...9 are created successfully.

When It try to connect to channel number or cluster number 10, it is throwing exception.

2021-03-08 02:31:29,745 [main] DEBUG [JGroupsChannelProvider] JGroups XML trying to connect to dataChannel_10SAS_CLUSTER
2021-03-08 02:31:29,747 [main] ERROR [JGroupsChannelProvider] JGroups XML connect error- java.net.BindException: no port available in range [7901 .. 7911] (bind_addr=/10.32.7.92)
java.net.BindException: no port available in range [7901 .. 7911] (bind_addr=/10.32.7.92)
        at org.jgroups.util.Util.createServerSocket(Util.java:3734) ~[jgroups-4.2.22.Final.jar:?]
        at org.jgroups.blocks.cs.TcpServer.<init>(TcpServer.java:70) ~[jgroups-4.2.22.Final.jar:?]
        at org.jgroups.protocols.TCP.start(TCP.java:99) ~[jgroups-4.2.22.Final.jar:?]
        at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:881) ~[jgroups-4.2.22.Final.jar:?]
        at org.jgroups.JChannel.startStack(JChannel.java:985) ~[jgroups-4.2.22.Final.jar:?]
        at org.jgroups.JChannel._preConnect(JChannel.java:849) ~[jgroups-4.2.22.Final.jar:?]
        at org.jgroups.JChannel.connect(JChannel.java:358) ~[jgroups-4.2.22.Final.jar:?]
        at org.jgroups.JChannel.connect(JChannel.java:352) ~[jgroups-4.2.22.Final.jar:?]
        at com.baypackets.ase.channel.jgroups.JGroupsChannelProvider.connect(JGroupsChannelProvider.java:417) ~[ase.jar:?]


port_range is far more than the number of channel we are creating.
Tried setting different port in bind_port and initial_hosts.

Can you please help us what we are missing here.
How we can resolve it.

Thanks
Raju Panwar



Bela Ban

unread,
Feb 20, 2024, 6:53:22 AM2/20/24
to jgrou...@googlegroups.com
TCP.port_range="20"
> *port_range* is far more than the number of channel we are creating.
> Tried setting different port in *bind_port* and *initial_hosts*.
>
> Can you please help us what we are missing here.
> How we can resolve it.
>
> Thanks
> Raju Panwar
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-dev...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-dev/5775d586-3ffa-40ab-84eb-6938649d8077n%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-dev/5775d586-3ffa-40ab-84eb-6938649d8077n%40googlegroups.com?utm_medium=email&utm_source=footer>.

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

Raju Panwar

unread,
Feb 20, 2024, 7:39:16 AM2/20/24
to jgroups-dev
Thank you so much for the reply and resolution.
That works.
Amazing.



I need one more help.
When I am trying to connect more than one channels we are getting some warning logs.

2021-03-08 05:54:22,780 [main] ERROR [JGroupsChannelProvider] JGroups XML connected to dataChannel_10SAS_CLUSTER
2021-03-08 05:54:22,780 [main] DEBUG [JGroupsChannelProvider] JGroups XML trying to connect to dataChannel_11SAS_CLUSTER
2021-03-08 05:54:22,784 [Connection.Receiver [10.32.7.92:7901 - 10.32.7.92:35139]-20,controlChannelSAS_CLUSTER,agnity-cas2.792-controlchannel] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is controlChannelSAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,785 [Connection.Receiver [10.32.7.92:7902 - 10.32.7.92:37743]-20,dataChannel_0SAS_CLUSTER,agnity-cas2.792-datachannel_0] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_0SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,786 [Connection.Receiver [10.32.7.92:7903 - 10.32.7.92:44235]-20,dataChannel_1SAS_CLUSTER,agnity-cas2.792-datachannel_1] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_1SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,786 [Connection.Receiver [10.32.7.92:7904 - 10.32.7.92:41641]-20,dataChannel_2SAS_CLUSTER,agnity-cas2.792-datachannel_2] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_2SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,787 [Connection.Receiver [10.32.7.92:7905 - 10.32.7.92:52659]-20,dataChannel_3SAS_CLUSTER,agnity-cas2.792-datachannel_3] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_3SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,787 [Connection.Receiver [10.32.7.92:7906 - 10.32.7.92:56533]-20,dataChannel_4SAS_CLUSTER,agnity-cas2.792-datachannel_4] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_4SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,788 [Connection.Receiver [10.32.7.92:7907 - 10.32.7.92:55869]-20,dataChannel_5SAS_CLUSTER,agnity-cas2.792-datachannel_5] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_5SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,788 [Connection.Receiver [10.32.7.92:7908 - 10.32.7.92:52577]-20,dataChannel_6SAS_CLUSTER,agnity-cas2.792-datachannel_6] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_6SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,789 [Connection.Receiver [10.32.7.92:7909 - 10.32.7.92:36781]-20,dataChannel_7SAS_CLUSTER,agnity-cas2.792-datachannel_7] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_7SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11
2021-03-08 05:54:22,789 [Connection.Receiver [10.32.7.92:7910 - 10.32.7.92:36537]-20,dataChannel_8SAS_CLUSTER,agnity-cas2.792-datachannel_8] WARN  [TCP] JGRP000012: discarded message from different cluster dataChannel_11SAS_CLUSTER (our cluster is dataChannel_8SAS_CLUSTER). Sender was agnity-cas2.792-datachannel_11


Attaching image also.

What are they warnings?
Do I need to take care of them?
If yes, how can I resolve this?

Thanks again.
Raju Panwar
Screenshot 2024-02-20 180630.png

Bela Ban

unread,
Feb 20, 2024, 8:59:10 AM2/20/24
to jgrou...@googlegroups.com
This shows that you have different clusters using the same ports. E.g.
TCPPING.initial_members listing the same IP addresses:ports, or MPING
having the same mcast_addr/mcast_port pairs.

You'll need to have different (discovery) ports for each cluster. The
warnings themselves are not causing any problems, besides cluttering up
the log files.
> > [7901 .. 7911] (bind_addr=/10.32.7.92 <http://10.32.7.92>)
> > java.net.BindException: no port available in range [7901 .. 7911]
> > (bind_addr=/10.32.7.92 <http://10.32.7.92>)
> https://groups.google.com/d/msgid/jgroups-dev/72c34069-21f0-4c86-82ba-6e5c05679d8bn%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-dev/72c34069-21f0-4c86-82ba-6e5c05679d8bn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Raju Panwar

unread,
Mar 15, 2024, 1:53:24 AM3/15/24
to jgroups-dev

Thanks for the response.
It worked for us.
Sorry for delay in response.

We are getting some un expected jgroups logs.
Can you please look those and help us what they are and how can we deal with them.

attaching screen shot.
Screenshot 2024-03-15 105054.png

belaban

unread,
Mar 15, 2024, 4:27:39 AM3/15/24
to Raju Panwar, jgroups-dev
There's nothing unexpected in that log; a member is excluded...



Von meinem/meiner Galaxy gesendet


-------- Ursprüngliche Nachricht --------
Von: 'Raju Panwar' via jgroups-dev <jgrou...@googlegroups.com>
Datum: 15.03.24 06:53 (GMT+01:00)
An: jgroups-dev <jgrou...@googlegroups.com>
Betreff: Re: New cluster / channel are failing after 9 are created successfully

Reply all
Reply to author
Forward
0 new messages