ceph网关无法正常工作

时间:2015-04-22 23:52:18

标签: gateway ceph radosgw

我已经部署了6个节点的ceph存储集群+ 1个管理员& 1台显示器。一切似乎都很好。我刚刚创建了一个网关节点,当我启动ceph-radosgw进程时似乎很好:

[ceph@gwy001iad ~]$ sudo /etc/init.d/ceph-radosgw status
/bin/radosgw is running.

但是我无法使用任何rados或rados-admin cmd。

[ceph@gwy001iad ~]$ sudo radosgw-admin user create --uid="testuser" --display-name="First User"
2015-04-22 16:22:12.706227 7f6579876880 -1 monclient(hunting): ERROR: missing keyring, cannot use cephx for authentication
2015-04-22 16:22:12.706234 7f6579876880  0 librados: client.admin initialization error (2) No such file or directory
couldn't init storage provider

[ceph@gwy001iad ~]$ rados lspools
2015-04-22 16:37:57.504032 7fb5dcb837c0 -1 monclient(hunting): ERROR: missing keyring, cannot use cephx for authentication
2015-04-22 16:37:57.504038 7fb5dcb837c0  0 librados: client.admin initialization error (2) No such file or directory

无法连接到群集!错误-2

密钥环文件具有读取权限:

[ceph@gwy001iad ~]$ ls -l /etc/ceph/
total 16
-rw-r--r-- 1 root root 252 Apr 21 17:14 ceph.client.radosgw.keyring
-rw-r--r-- 1 root root 121 Apr 20 17:53 ceph.client.radosgw.keyring.bk
-rw-r--r-- 1 root root 814 Apr 21 17:30 ceph.conf
drwxr-xr-x 2 root root   6 Apr 21 12:31 radosgw-agent
-rwxr-xr-x 1 root root  92 Apr 10 12:42 rbdmap
-rw------- 1 root root   0 Apr 21 11:57 tmpavz_Y7

配置确实指示了环文件的正确路径:

[ceph@gwy001iad ~]$ cat /etc/ceph/ceph.conf
[global]
mon_initial_members = mondev001iad
mon_host = 10.96.40.98
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
filestore_xattr_use_omap = true
osd_pool_default_size = 2
osd pool default pg num = 100
osd pool default pgp num = 100
#debug ms = 1
#debug rgw = 20

[mon]
#        mon host = mondev001iad
#       mon addr = 10.96.40.98:6789
[mon.cldstoremondev001iad]
    host = mondev001iad
    mon addr = 10.96.40.98:6789


[client.radosgw.gwy001iad]
host = gwy001iad
keyring = /etc/ceph/ceph.client.radosgw.keyring
rgw socket path = ""
log file = /var/log/radosgw/client.radosgw.gateway.log
rgw frontends = fastcgi socket_port=9000 socket_host=0.0.0.0
rgw print continue = false

密钥环文件确实提供了写入权限。

[ceph@gwy001iad ~]$ cat /etc/ceph/ceph.client.radosgw.keyring
[client.radosgw.gwy001iad]
    key = AQCl5jZVVu6NEBAAR3xNNAbDK9m0cQnlCG/+1w==
    caps mon = "allow rwx"
    caps osd = "allow rwx"

网关主机上只安装了ceph-radosgw和radosgw-agent。我很感激,如果有人能提供我的故障排除技巧。最好的祝愿。

1 个答案:

答案 0 :(得分:0)

尝试使用radosgw-admin将管理密钥环复制(或使用ceph auth get-or-create创建一个)到节点。