找回密码
 注册
查看: 1472|回复: 0

ceph -s :[errno 2] error connecting to the cluster

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-2-8 10:16:26 | 显示全部楼层 |阅读模式
当普通用户执行这条命令的时候,出现问题:
: [4 \3 a2 }, d  c[cephuser@compute01 ~]$ ceph -s / @# ?- e: ~) ^  \4 |& u" P
[errno 2] error connecting to the cluster
, B. G. |/ \. \* W. e# r: g
- R1 R; \( c/ h0 z- p/ z2 T0 N3 I4 d1 r+ x6 \

( T6 H6 m+ u. u( T$ r分析9 ]3 u/ z$ j0 e  n- z
使用root用户执行没有问题,但普通用户出现这样的问题,应该是权限的关系。' x, p  z6 M6 y2 ]1 c- A
[root@compute01 ceph]# ll
  f3 w$ m/ x, Ftotal 12
! H8 X8 S" r/ V' [  S-rw------- 1 root root 151 Dec  3 18:37 ceph.client.admin.keyring" W/ ^" S+ a$ u8 `: D! o
-rw-r--r-- 1 root root 640 Dec  3 18:39 ceph.conf; {' h4 _9 g0 ?0 D5 H& j6 v
-rw-r--r-- 1 root root  92 Oct 30  2020 rbdmap- n7 _+ D) K5 p9 k8 M
-rw------- 1 root root   0 Dec  3 18:37 tmpaLsN3g
- X) ?; t/ ?6 O% H  [-rw------- 1 root root   0 Dec  3 18:34 tmpJw8Z3i6 |1 `+ N. D1 u& o/ y) [7 W1 ]) K
# ?( ]0 |  b. M3 o- M! K0 x
' S( A4 E9 d9 W" ^! M
看出来这个client.admin这个keyring文件的权限只有root用户有读写  而其他用户无法读写。9 V- ]+ W6 f& a
解决办法:  u' `8 I" r( k$ ]3 @3 ^2 [
/ {0 m0 O& e- y4 g8 n
给文件赋予权限吧:" j' H9 n3 Q) ?
[root@compute01 ceph]# chmod +r ceph.client.admin.keyring $ L% y' a3 T0 [( t2 K8 a
权限给了之后,正常访问:: f- a8 r+ y! r
[cephuser@compute01 ~]$ ceph -s2 c( M. G, q( n9 o( Q# S% O
  cluster:6 `. J8 Q( J; r: ~3 p4 ?* b! c
    id:     a6d0359e-8295-4e62-8620-54273462e79f  ~: J$ |) d( \7 m5 M9 O
    health: HEALTH_OK
$ b. l* S0 O. J4 f6 p
: D9 c6 W5 A: G7 T( S  services:8 u. k  a9 F9 u* x3 t4 v
    mon: 3 daemons, quorum compute01,compute02,compute03 (age 11d)( j* u6 s# z, L+ [! s
    mgr: compute03(active, since 3w), standbys: compute01, compute02  K( a6 l) R0 T
    osd: 6 osds: 6 up (since 11d), 6 in (since 3w)5 V9 U" Q( M& t4 [+ t$ ~

) m" u5 `' G- P$ b" y2 Z" V" h  data:
. x& ^1 O7 e% b7 w    pools:   5 pools, 1408 pgs1 @/ y' M$ ~# j
    objects: 62.69k objects, 249 GiB  V$ C2 ]/ g9 Z
    usage:   727 GiB used, 4.5 TiB / 5.2 TiB avail7 {# c, D3 E2 u, ^3 I: r
    pgs:     1408 active+clean
  S! }# R! e1 z$ N1 |; [1 R
. O; H( I( I* a* ~  io:9 r' A' G' X% q. L0 g# _. V1 l0 F
    client:   29 KiB/s rd, 15 MiB/s wr, 44 op/s rd, 37 op/s wr
. e6 A* g  p% s) v$ ?8 A+ i4 {. g' U, G7 E6 o9 }6 X

) E  P5 Y7 y8 A* m1 p$ q+ q1 I. Z& D& O! C* n" D8 h* t
问题解决。4 \1 Z" a- q/ K" ~/ F
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:07 , Processed in 0.024475 second(s), 25 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表