Failed to join the cluster: #{in_cluster => false,is_running => true,reason => illegal_target,target_node => ‘emqx@10.20.4.187’,target_role => {‘EXIT’,{{case_clause,{badrpc,ehostunreach}},[{mria_rlog,role,1,[{file,“mria_rlog.erl”},{line,116}]},{mria,join1,2,[{file,“mria.erl”},{line,571}]},{global,trans,4,[{file,“global.erl”},{line,477}]},{emqx_mgmt_cli,cluster,1,[{file,“emqx_mgmt_cli.erl”},{line,113}]},{emqx_ctl,run_command,2,[{file,“emqx_ctl.erl”},{line,122}]},{erpc,execute_call,4,[{file,“erpc.erl”},{line,589}]}]}}}
节点1配置
node {
name = “emqx@10.20.4.184”
cookie = “WOBpdFygOmQIDAQAB”
data_dir = “data”
}
cluster {
## 可选 manual | static | dns | etcd | K8s
discovery_strategy = manual
}
dashboard {
listeners.http {
bind = 18083
}
}
节点2配置
node {
name = “emqx@10.20.4.187”
cookie = “WOBpdFygOmQIDAQAB”
data_dir = “data”
}
cluster {
## 可选 manual | static | dns | etcd | K8s
discovery_strategy = manual
}
dashboard {
listeners.http {
bind = 18083
}
}
到这个IP的网络不通。
网络不通的原因是啥呢?内网可以ping通的
保证2台机器的5370 4370 端口是互通的。
netstat -anpt |grep emqx
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:5370 0.0.0.0:* LISTEN 1418111/emqx
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 1418111/emqx
tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN 1418111/emqx
tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN 1418111/emqx
tcp 0 0 0.0.0.0:18083 0.0.0.0:* LISTEN 1418111/emqx
tcp 0 0 0.0.0.0:4370 0.0.0.0:* LISTEN 1418111/emqx
tcp 0 0 0.0.0.0:8883 0.0.0.0:* LISTEN 1418111/emqx