两个位于同一台机器且具有相同 cookie 的 Erlang 节点无法连接

两个位于同一台机器且具有相同 cookie 的 Erlang 节点无法连接

我打开了两个具有相同 cookie 和机器的 Erlang IPv6 节点,但是当我使用 net_adm:ping 命令时,它们无法连接。但是,当我打开两个具有相同 cookie 和机器的不同 IPv4 节点时,它们可以连接。erlang 版本是 21.1.3。Linux 操作系统是 Centos7。

以下是我的操作系统关于 IPv6 的设置

sysctl -a | grep ipv6 | grep disable
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.bond0.disable_ipv6 = 0
net.ipv6.conf.bond0/801.disable_ipv6 = 0
net.ipv6.conf.bond0/805.disable_ipv6 = 0
net.ipv6.conf.br-DYMAN1.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.docker0.disable_ipv6 = 0
net.ipv6.conf.ens12f0.disable_ipv6 = 0
net.ipv6.conf.ens12f1.disable_ipv6 = 0
net.ipv6.conf.ens4f0.disable_ipv6 = 0
net.ipv6.conf.ens4f1.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
net.ipv6.conf.ovs-system.disable_ipv6 = 0
net.ipv6.conf.virbr0.disable_ipv6 = 1
net.ipv6.conf.virbr0-nic.disable_ipv6 = 0

以下是我的试验。

erl -sname a -setcookie 123  -proto_dist inet6_tcp

Erlang/OTP 21 [erts-10.1.3] [source] [64-bit] [smp:56:56] [ds:56:56:10] [async-threads:1] [hipe]

Eshell V10.1.3  (abort with ^G)
(a@controller3)1> =WARNING REPORT==== 1-Feb-2019::10:16:58.151874 ===
**global: a@controller3 failed to connect to b@controller3**

erl -sname b -setcookie 123  -proto_dist inet6_tcp

Erlang/OTP 21 [erts-10.1.3] [source] [64-bit] [smp:56:56] [ds:56:56:10] [async-threads:1] [hipe]
Eshell V10.1.3  (abort with ^G)
(b@controller3)1> =WARNING REPORT==== 1-Feb-2019::10:16:58.155128 ===
**global: b@controller3 failed to connect to a@controller3**


(b@controller3)1> net_adm:ping('a@controller3').
pang

erl -sname dd -setcookie 123

Erlang/OTP 21 [erts-10.1.3] [source] [64-bit] [smp:56:56] [ds:56:56:10] [async-threads:1] [hipe]

Eshell V10.1.3  (abort with ^G)
(dd@controller3)1> net_adm:ping('cc@controller3').
pong
(dd@controller3)6> net_adm:ping('a@controller3').
pong

      ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens4f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
    link/ether 74:4a:a4:02:9a:11 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::764a:a4ff:fe02:9a11/64 scope link
       valid_lft forever preferred_lft forever
3: ens4f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
    link/ether 74:4a:a4:02:9a:11 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::764a:a4ff:fe02:9a11/64 scope link
       valid_lft forever preferred_lft forever
4: ens12f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 74:4a:a4:02:e5:da brd ff:ff:ff:ff:ff:ff
    inet6 fe80::764a:a4ff:fe02:e5da/64 scope link
       valid_lft forever preferred_lft forever
5: ens12f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 74:4a:a4:02:e5:db brd ff:ff:ff:ff:ff:ff
    inet6 fe80::764a:a4ff:fe02:e5db/64 scope link
       valid_lft forever preferred_lft forever
6: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 72:b2:6c:0a:ba:7c brd ff:ff:ff:ff:ff:ff
7: br-DYMAN1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 74:4a:a4:02:9a:11 brd ff:ff:ff:ff:ff:ff
    inet 192.168.32.3/24 brd 192.168.32.255 scope global br-DYMAN1:10
       valid_lft forever preferred_lft forever
    inet6 2025:3101::102/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::8c5c:94ff:fe75:1146/64 scope link
       valid_lft forever preferred_lft forever
8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 74:4a:a4:02:9a:11 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::764a:a4ff:fe02:9a11/64 scope link
       valid_lft forever preferred_lft forever
9: bond0.801@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master ovs-system state UP
    link/ether 74:4a:a4:02:9a:11 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::764a:a4ff:fe02:9a11/64 scope link
       valid_lft forever preferred_lft forever
10: bond0.805@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 74:4a:a4:02:9a:11 brd ff:ff:ff:ff:ff:ff
    inet 10.43.211.197/22 brd 10.43.211.255 scope global bond0.805
       valid_lft forever preferred_lft forever
    inet6 2025:3101::101/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::764a:a4ff:fe02:9a11/64 scope link
       valid_lft forever preferred_lft forever
11: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 02:42:00:9d:ae:14 brd ff:ff:ff:ff:ff:ff
    inet 172.172.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
12: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 52:54:00:18:8e:a2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
13: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
    link/ether 52:54:00:18:8e:a2 brd ff:ff:ff:ff:ff:ff

相关内容