Hello,
I found some behavior I did not expect. I am using JGroup5 successfully on Android to send very large files to 25+ Android devices using multicast and ethernet to USB-C dongles. Files over 10G and it works. One thing I noticed is that the multicast port used, is not freed after I disconnect from the cluster.
If I just connect to a cluster, I dont send any messages at all. I have port 45678 configured.
When I execute ss -lnup on the Android devices, it shows me that port 45678 is still in use!
The only way to free the port is to restart the application.
I tried close and disconnect, but both leave the port open. This open port causes issues when the IP changes for the Android device, it then throws a: java.net.BindException: bind failed: EADDRNOTAVAIL. I tried adding port_range, to see if a higher port number would be used but that doesnt work either.
I'm not a Jgroup expert, maybe my config is wrong:
<config xmlns="urn:org:jgroups"
<UDP mcast_addr="239.8.8.8"
mcast_port="45678"
mcast_recv_buf_size="50MB"
thread_pool.min_threads="0"
thread_pool.max_threads="200"
thread_pool.keep_alive_time="30s" />
<PING />
<MERGE3 max_interval="20s" min_interval="10s" />
<FD_SOCK2 />
<FD_ALL3 />
<VERIFY_SUSPECT2 timeout="30s" />
<BARRIER />
<pbcast.NAKACK2 xmit_interval="0.5s" />
<UNICAST3 xmit_interval="0.5s"/>
<pbcast.STABLE max_bytes="15M" />
<pbcast.GMS print_local_addr="true" join_timeout="1s" />
<MFC max_credits="50M" min_threshold="0.4" />
<UFC max_credits="50M" min_threshold="0.4" />
<FRAG2 frag_size="60K" />
<pbcast.STATE_TRANSFER />
</config>
Any advice is welcome.
Anton