Aeron basic pub/sub pair connects on same host, fails across hosts

Tags: , ,



I am running the BasicPublisher/BasicSubscriber pair from https://github.com/real-logic/aeron binding them to the same multicast group+port. When they run on the same host they connect, but when they run on separate hosts (same switch+subnet+vlan) the publisher reports “Offer failed because publisher is not connected to subscriber”. Here are my configurations:

AERON PAIR:

java -Daeron.sample.channel="aeron:udp?endpoint=225.10.9.7:4050" 
-Daeron.sample.embeddedMediaDriver=true 
-cp ./aeron-all/build/libs/aeron-all-1.29.1-SNAPSHOT.jar 
io.aeron.samples.BasicPublisher
java -Daeron.sample.channel="aeron:udp?endpoint=225.10.9.7:4050" 
-Daeron.sample.embeddedMediaDriver=true 
-cp ./aeron-all/build/libs/aeron-all-1.29.1-SNAPSHOT.jar 
io.aeron.samples.BasicSubscriber

I ran an iperf udp pair on the same hosts binding to the same group+port, which I think proves that the switch is not blocking the multicast traffic. My hope is that I’m just using Aeron incorrectly; or perhaps there’s some other networking issue I can check?

IPERF PAiR:

iperf -c 225.10.9.7 -p 4050 -u -T 32 -t 300 -I 1 -b 1G
[  3] 46.0-47.0 sec   128 MBytes  1.07 Gbits/sec
…
iperf -s -u -B 225.10.9.7 -p 4050 -I 1 -b 1G
[  3] 45.0-46.0 sec   128 MBytes  1.07 Gbits/sec   0.001 ms   35/91304 (0.038%)
…

Java: java-1.8.0-openjdk.x86_64

OS: Centos7 3.10.0-514.26.2.el7.x86_64

Answer

When using multicast endpoints it is also necessary to provide the interface for some operating systems when going remote. The interface can have a mask to simplify configuration for all machines on a subnet. For example:

aeron:udp?endpoint=224.0.1.1:40456|interface=192.168.1.4
aeron:udp?endpoint=224.0.1.1:40456|interface=192.168.1.0/24

https://github.com/real-logic/aeron/wiki/Channel-Configuration



Source: stackoverflow