erlang 为什么在测试Riak节点时"riak-admin测试"失败而"curl-v"成功

bakd9h0s  于 2022-12-08  发布在  Erlang
关注(0)|答案(1)|浏览(126)

我正在设置一个包含五个物理节点的riak群集。除一个节点未通过admin-riak测试之外,其他四个节点的所有测试都正常。下面显示了几个riak-admin命令的群集状态

do-admin@DBNode1:~$ sudo riak-admin member-status  
=============== Membership ============================
Status     Ring    Pending    Node
-------------------------------------------------------------------------------
valid      20.3%      --      'riak@dbnode1.do.ug'
valid      20.3%      --      'riak@dbnode2.do.ug'
valid      20.3%      --      'riak@dbnode3.do.ug'
valid      20.3%      --      'riak@dbnode4.do.ug'
valid      18.8%      --      'riak@dbnode5.do.ug'
-------------------------------------------------------------------------------
Valid:5 / Leaving:0 / Exiting:0 / Joining:0 / Down:0

dot-admin@DBNode1:~$ sudo riak-admin ring-status
================================== Claimant ===================================
Claimant:  'riak@dbnode2.do.ug'
Status:     up
Ring Ready: true

============================== Ownership Handoff ==============================
No pending changes.

============================== Unreachable Nodes ==============================
All nodes are up and reachable

do-admin@DBNode1:~$ sudo riak-admin cluster status
---- Cluster Status ----
Ring ready: true

+------------------------+------+-------+-----+-------+
|       node             |status| avail |ring |pending|
+------------------------+------+-------+-----+-------+
|     riak@dbnode1.do.ug |valid |  up   | 20.3|  --   |
| (C) riak@dbnode2.do.ug |valid |  up   | 20.3|  --   |
|     riak@dbnode3.do.ug |valid |  up   | 20.3|  --   |
|     riak@dbnode4.do.ug |valid |  up   | 20.3|  --   |
|     riak@dbnode5.do.ug |valid |  up   | 18.8|  --   |
+------------------------+------+-------+-----+-------+

Key: (C) = Claimant; availability marked with '!' is unexpected

do-admin@DBNode1:~$ curl -v http://dbnode1.dot.ug:8098/types/default/props
* Hostname was NOT found in DNS cache
*   Trying 192.168.172.38...
* Connected to dbnode1.dot.ug (192.168.172.38) port 8098 (#0)
> GET /types/default/props HTTP/1.1
> User-Agent: curl/7.35.0
> Host: dbnode1.dotshule.ug:8098
> Accept: */*
> 
< HTTP/1.1 200 OK
< Vary: Accept-Encoding
* Server MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained) is not blacklisted
< Server: MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained)
< Date: Sat, 17 Jan 2015 21:05:22 GMT
< Content-Type: application/json
< Content-Length: 428
< 
* Connection #0 to host dbnode1.dotshule.ug left intact
{"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[],"pw":0,"r":"quorum","rw":"quorum","small_vclock":50,"w":"quorum","young_vclock":20}}

dot-admin@DBNode1:~$ sudo riak-admin test
Node 'riak@dbnode1.dot.ug ' is not reachable from 'riak_test@dbnode1.dot.ug'.

在所有节点上执行所有这些测试后,除了riak-admin测试之外,所有其他节点上的结果都相同。对于节点3

dot-admin@DBNode3:~$ sudo riak-admin test
Successfully completed 1 read/write cycle to 'riak@dbnode3.dotshule.ug'

我怀疑这个集群是否可以用来存储数据,因为在这个Basho website resource上,他们说你可以使用任何一种方法来测试节点是否准备好了。他们没有说如果一种方法成功而另一种失败,节点仍然很好。所以我被困在是否继续使用集群上。令人惊讶的是,这个节点在所有将其加入集群的操作中都成功了!!我已经尝试重新创建此节点,但没有帮助!
对于任何帮助,我都将很高兴。

nfs0ujit

nfs0ujit1#

错误Node <targetnode> is not reachable from <sourcenode>.表示net_adm:ping(<targetnode>)返回pang而不是pong。
检查:

  • epmd进程正在运行
  • /usr/lib/riak/erts-5.10.3/epmd -names显示节点已注册(调整路径以匹配您的安装)
  • selinx、iptables或其他安全软件没有阻塞临时端口或epmd端口4369

net_adm模块将尝试解析目标节点名的主机部分(即'@'后面的部分),在该IP地址的端口4369上联系epmd以获取指定节点的端口,然后在该端口建立到该节点的TCP连接。此过程中的某些部分未完成。

相关问题