Aeron基本的发布/订阅对在同一主机上连接,跨主机连接失败

huangapple go评论71阅读模式
英文:

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

问题

以下是翻译好的内容:

我正在运行来自 https://github.com/real-logic/aeron 的 BasicPublisher/BasicSubscriber 配对,将它们绑定到相同的组播组+端口。当它们在同一台主机上运行时,它们可以连接,但当它们在不同的主机上运行时(相同的交换机+子网+VLAN),发布者报告说:“Offer failed because publisher is not connected to subscriber”(提供失败,因为发布者未连接到订阅者)。以下是我的配置:

AERON 配对:

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

我在同一台主机上运行了一个绑定到相同组+端口的 iperf udp 配对,我认为这证明了交换机没有阻止组播流量。我希望只是我错误地使用了 Aeron;或者可能有一些其他的网络问题我可以检查?

IPERF 配对:

iperf -c 225.10.9.7 -p 4050 -u -T 32 -t 300 -I 1 -b 1G
[  3] 46.0-47.0 秒   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 秒   128 MBytes  1.07 Gbits/sec   0.001 ms   35/91304 (0.038%)

Java: java-1.8.0-openjdk.x86_64

操作系统: Centos7 3.10.0-514.26.2.el7.x86_64

英文:

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

答案1

得分: 3

使用组播端点时,在某些操作系统进行远程操作时还需要提供接口。接口可以具有掩码,以简化子网上所有机器的配置。例如:

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

英文:

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

答案2

得分: 1

我遇到了类似的问题,通过添加一个 ttl 配置选项来解决,类似于以下内容:

aeron:udp?endpoint=224.0.1.1:40456|interface=192.168.1.4|ttl=16
aeron:udp?endpoint=224.0.1.1:40456|interface=192.168.1.0/24|ttl=16
英文:

I had a similar issue and it was fixed by adding a ttl config option something like this

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

huangapple
  • 本文由 发表于 2020年7月27日 21:40:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/63116623.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定