我试图建立一个小型单节点 ceph 集群,用于 ceph fs 的一些概念验证工作。集群运行 centos 7 操作系统:
# ceph --version
ceph version 13.2.10 (564bdc4ae87418a232fc901524470e1a0f76d641) mimic (stable)
集群看起来很健康:
# ceph -s
cluster:
id: fa18d061-b6fd-4092-bbe3-31f4f8493360
health: HEALTH_OK
services:
mon: 1 daemons, quorum se-ceph1-dev
mgr: se-ceph1-dev(active)
mds: cephfs-1/1/1 up {0=se-ceph1-dev=up:active}
osd: 1 osds: 1 up, 1 in
data:
pools: 2 pools, 64 pgs
objects: 22 objects, 2.2 KiB
usage: 1.0 GiB used, 39 GiB / 40 GiB avail
pgs: 64 active+clean
所有 ceph 命令都可以在 OSD 节点(也是 mon、mgr、mds)上完美运行。但是,任何从另一台机器作为客户端(默认用户管理员)访问集群的尝试都将被完全忽略。例如:
cephcli$ ceph status
2020-07-08 08:12:58.358 7fa4c568e700 0 monclient(hunting): authenticate timed out after 300
2020-07-08 08:17:58.360 7fa4c568e700 0 monclient(hunting): authenticate timed out after 300
2020-07-08 08:22:58.362 7fa4c568e700 0 monclient(hunting): authenticate timed out after 300
2020-07-08 08:27:58.364 7fa4c568e700 0 monclient(hunting): authenticate timed out after 300
2020-07-08 08:32:58.363 7fa4c568e700 0 monclient(hunting): authenticate timed out after 300
客户端机器运行 OS 18.04.1-Ubuntu 并安装了与 osd 节点相同的 ceph 版本:
cephcli$ ceph --version
ceph version 13.2.10 (564bdc4ae87418a232fc901524470e1a0f76d641) mimic (stable)
我已经验证没有客户被列入黑名单:
# ceph osd blacklist ls
listed 0 entries
我已经验证了各种 ceph 代理正在侦听 OSD 节点上各自的端口:
# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:6800 0.0.0.0:* LISTEN 32591/ceph-osd
tcp 0 0 0.0.0.0:6801 0.0.0.0:* LISTEN 32591/ceph-osd
tcp 0 0 0.0.0.0:6802 0.0.0.0:* LISTEN 32591/ceph-osd
tcp 0 0 0.0.0.0:6803 0.0.0.0:* LISTEN 32591/ceph-osd
tcp 0 0 0.0.0.0:6804 0.0.0.0:* LISTEN 33279/ceph-mds
tcp 0 0 0.0.0.0:6805 0.0.0.0:* LISTEN 32579/ceph-mgr
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 13881/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14038/master
tcp 0 0 10.19.4.159:6789 0.0.0.0:* LISTEN 32580/ceph-mon
tcp6 0 0 :::22 :::* LISTEN 13881/sshd
我已经验证客户端确实使用端口 6789 上的 tcpdump 向 OSD 节点发送请求:
# tcpdump -i ens192 port 6789 -x -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens192, link-type EN10MB (Ethernet), capture size 262144 bytes
08:42:05.183071 IP 10.19.4.84.37170 > 10.19.4.159.smc-https: Flags [S], seq 4146143942, win 64240, options [mss 1460,sackOK,TS val 1566694440 ecr 0,nop,wscale 7], length 0
0x0000: 4500 003c c7d9 4000 4006 55ca 0a13 0454
0x0010: 0a13 049f 9132 1a85 f721 22c6 0000 0000
0x0020: a002 faf0 30cd 0000 0204 05b4 0402 080a
0x0030: 5d61 dc28 0000 0000 0103 0307
08:42:05.383784 IP 10.19.4.84.37172 > 10.19.4.159.smc
我已在客户端验证 /etc/ceph/ceph.client.admin.keyring 文件包含与 OSD 节点上相同的密钥。
当我在 OSD 节点上发出请求时,我检查了监控日志并查看了条目:
2020-07-08 10:17:12.414 7f06268a3700 0 log_channel(audit) log [DBG] : from='client.? 10.19.4.159:0/3709075926' entity='client.admin' cmd=[{"prefix": "status"}]: dispatch
但是,没有什么反映我从客户端节点发出的请求。
所以请求正在发送到 OSD 节点,但我没有得到任何响应。我哪里出错了?