简体   繁体   English

在谷歌云平台(GCP)上连接 Erlang/Elixir VM 节点的问题,相同的 VPC - 不同的区域,MNESIA 无法复制

[英]Issue with connecting Erlang/Elixir VM nodes on Google Cloud Platform (GCP), same VPC - different regions, MNESIA can't replicate

I am trying to connect two Erlang VMs (running on Centos 8, Erlang/OTP 23), one located on GCP us-east1-b and other GCP europe-west6, both inside same VPC, running on separate subnets, us-east 10.33.0.0/16 eur-west on 10.88.0.0/16.我正在尝试连接两个 Erlang 虚拟机(在 Centos 8,Erlang/OTP 23 上运行),一个位于 GCP us-east1-b 和其他 GCP europe-west6 上,都在同一个 VPC 内,在不同的子网 us-east 上运行.0.0/16 eur-west 于 10.88.0.0/16。 GCP routes and firewalls should be set to allow traffic across those subnets and throughout the VPC. GCP 路由和防火墙应设置为允许跨这些子网和整个 VPC 的流量。 Ping works from VM to VM (see below). Ping 从 VM 工作到 VM(见下文)。 Telnet works to erlang epmd port 4369. ISSUE - when connecting machine to machine using erlang ping utility net_adm:ping()/1 - returns a "pang", meaning does not connect. Telnet 适用于 erlang epmd 端口 4369。问题 - 使用 erlang ping 实用程序 net_adm:ping()/1 将机器连接到机器时 - 返回“pang”,表示未连接。

Any suggestions or thoughts on what might be the issues, much appreciated !!!任何关于可能是什么问题的建议或想法,非常感谢!

Here is additional research and facts RE the setups.这是有关设置的其他研究和事实。

NOTE - the GCP firewall rules, note the GCP network "block" ing result on the test connection, and note the TELNET responses for ports 35539 and 42257 do not connect (which maybe explains why the VM's return a "pang" or can't connect)注意 - GCP 防火墙规则,注意测试连接上的 GCP 网络“阻塞”结果,并注意端口 35539 和 42257 的 TELNET 响应未连接(这可能解释了为什么虚拟机返回“pang”或不能连接)

[g@app-server1-east ~]$ erl -name ack1@10.33.0.2 -setcookie whale
Erlang/OTP 23 [erts-11.1.3] [source] [64-bit] [smp:2:2] [ds:2:2:10] [asy
nc-threads:1] [hipe]
Eshell V11.1.3  (abort with ^G)
(ack1@10.33.0.2)1> net_adm:ping('ack2@10.88.0.2').
pang
(ack1@10.33.0.2)2> 

[g@app-server1-east ~]$ ping 10.88.0.2
PING 10.88.0.2 (10.88.0.2) 56(84) bytes of data.
64 bytes from 10.88.0.2: icmp_seq=1 ttl=64 time=105 ms
64 bytes from 10.88.0.2: icmp_seq=2 ttl=64 time=103 ms
64 bytes from 10.88.0.2: icmp_seq=3 ttl=64 time=104 ms
64 bytes from 10.88.0.2: icmp_seq=4 ttl=64 time=103 ms
64 bytes from 10.88.0.2: icmp_seq=5 ttl=64 time=103 ms
^C
--- 10.88.0.2 ping statistics ---
6 packets transmitted, 5 received, 16.6667% packet loss, time 12ms
rtt min/avg/max/mdev = 103.290/103.749/105.243/0.754 ms
[g@app-server1-east ~]$ epmd -names
epmd: up and running on port 4369 with data:
name ack1 at port 35539
[gbaird@app-server1-east ~]$ telnet 10.88.0.2 4369
Trying 10.88.0.2...
Connected to 10.88.0.2.
Escape character is '^]'.
exit
Connection closed by foreign host.
[g@app-server1-east ~]$ telnet 10.88.0.2 42257
Trying 10.88.0.2...
telnet: connect to address 10.88.0.2: Connection timed out here

[g@app-server2-eur ~]$ erl -name ack2@10.88.0.2 -setcookie whale
Erlang/OTP 23 [erts-11.1.3] [source] [64-bit] [smp:2:2] [ds:2:2:10] [asyn
c-threads:1] [hipe]
Eshell V11.1.3  (abort with ^G)
(ack2@10.88.0.2)1> node 
(ack2@10.88.0.2)1> .
node
(ack2@10.88.0.2)2> 
  

g@app-server2-eur ~]$ ping 10.33.0.2
PING 10.33.0.2 (10.33.0.2) 56(84) bytes of data.
64 bytes from 10.33.0.2: icmp_seq=1 ttl=64 time=105 ms
64 bytes from 10.33.0.2: icmp_seq=2 ttl=64 time=103 ms
64 bytes from 10.33.0.2: icmp_seq=3 ttl=64 time=103 ms
64 bytes from 10.33.0.2: icmp_seq=4 ttl=64 time=103 ms
^C
--- 10.33.0.2 ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 10ms
rtt min/avg/max/mdev = 103.194/103.601/104.685/0.666 ms
[g@app-server2-eur ~]$ epmd -names
epmd: up and running on port 4369 with data:
name ack2 at port 42257
[gbaird@app-server2-eur ~]$ telnet 10.33.0.2 4369
Trying 10.33.0.2...
Connected to 10.33.0.2.
Escape character is '^]'.
exit
Connection closed by foreign host.
[g@app-server2-eur ~]$ telnet 10.33.0.2 35539
Trying 10.33.0.2...
telnet: connect to address 10.33.0.2: Connection timed out
[gbaird@app-server2-eur ~]$ 

在此处输入图像描述

在此处输入图像描述

Erlang's EPMD (Erlang Port Mapper Daemon) is the one listening in port 4369, but the node listens in a random port. Erlang 的 EPMD(Erlang Port Mapper Daemon)是监听 4369 端口的那个,但节点监听的是随机端口。

When setting up a cluster, the node registers it's port in the local host's EPMD and contacts the remote host's EPMD to query the actual port for the remote node, then the traffic goes directly to that port.建立集群时,节点在本地主机的 EPMD 中注册它的端口,并联系远程主机的 EPMD 以查询远程节点的实际端口,然后流量直接进入该端口。 EPMD is not a relay. EPMD 不是继电器。

You can control the range of ports for the nodes to listen through kernel configuration , particularly with inet_dist_listen_min and inet_dist_listen_max , allowing them in the FW您可以通过kernel 配置控制节点侦听的端口范围,特别是使用inet_dist_listen_mininet_dist_listen_max ,允许它们在 FW

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么VM无法使用VPC网络,static内部IP,连接到谷歌云平台ZC6E195553E6C7AC8592C389ACB9878A050AZ中的SSH? - Why can't VM with VPC networks, static internal IP, connect to SSH in Google Cloud Platform Web Console? 无法在 Google Cloud Platform 上创建 GPU 驱动的 VM 实例 - Can't create a GPU powered VM instance on Google Cloud Platform 在 Google Cloud Platform 上将 Python 与 MySQL 连接时出现问题 - Issue in connecting Python with MySQL on Google Cloud Platform 在Google Cloud Platform上使用Elixir - Using Elixir on Google Cloud Platform 通过 VPC 连接器连接 Google Cloud Platform 的计算引擎和应用引擎 - Connecting Google Cloud Platform's compute engine and app engine via VPC connector 权限被拒绝(公钥)。 -我无法在Google Cloud Platform上登录我的VM - Permission denied (publickey). - I can't login to my VM on Google Cloud Platform 即使配置VPC网络以监听端口8081,我也无法启动Google Cloud Platform数据实验室 - I can't initial Google Cloud Platform data lab even I config VPC network to listen in port 8081 如何将子域指向GCP单击以在Google Cloud Platform上部署VM? - How to point a subdomain to point to a GCP Click to Deploy VM on Google Cloud Platform? 将文件从主机树莓派复制到 GCP(谷歌云平台)VM 实例 - Copying files from host raspberry pi to GCP (Google Cloud Platform) VM instance 如何在 Google 云平台 gcp 上托管 python 脚本? - How can I host a python script on Google cloud platform gcp?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM