Ceph:Rados Gateway Web 端点无响应

Ceph:Rados Gateway Web 端点无响应

我正在创建一个简单的 Ceph 集群并尝试连接到 Ceph 网关。

这是我的 Ceph 集群的 ceph 状态输出:

  cluster:
    id:     a7f64266-0894-4f1e-a635-d0aeaca0e993
    health: HEALTH_WARN
            mon is allowing insecure global_id reclaim
            1 monitors have not enabled msgr2
            5 pool(s) have no replicas configured

  services:
    mon: 1 daemons, quorum rhcsa (age 4h)
    mgr: rhcsa(active, since 8s)
    osd: 1 osds: 1 up (since 4h), 1 in (since 4h)

  data:
    pools:   5 pools, 129 pgs
    objects: 27 objects, 453 KiB
    usage:   22 MiB used, 20 GiB / 20 GiB avail
    pgs:     129 active+clean

这是我的 Ceph 配置在 /etc/ceph/ceph.conf 下:

[global]
fsid = a7f64266-0894-4f1e-a635-d0aeaca0e993
mon_initial_members = rhcsa
mon_host = 192.168.122.61
public_network = 192.168.122.0/24
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
osd_pool_default_size = 1
osd_pool_default_min_size = 1
osd_pool_default_pg_num = 333
osd_crush_chooseleaf_type = 1


[client.rgw.rhcsa]
host = rhcsa
rgw dns name = rhcsa
log file = /var/log/ceph/client.rgw.rhcsa.log
keyring = /var/lib/ceph/radosgw/ceph-rgw.rhcsa/keyring
rgw frontends = "beast port=8080"

我为 rgw 创建了以下目录: /var/lib/ceph/radosgw/ceph-rgw.rhcsa

然后是钥匙圈:

sudo ceph-authtool --create-keyring /var/lib/ceph/radosgw/ceph-rgw.rhcsa/keyring
sudo chmod +r /var/lib/ceph/radosgw/ceph-rgw.rhcsa/keyring
sudo ceph-authtool /var/lib/ceph/radosgw/ceph-rgw.rhcsa/keyring -n client.rgw.rhcsa --gen-key   
sudo ceph-authtool -n client.rgw.rhcsa --cap osd 'allow rwx' --cap mon 'allow rwx' /var/lib/ceph/radosgw/ceph-rgw.rhcsa/keyring

然后启动Ceph的RadosGW服务:

sudo systemctl restart [email protected]

RadosGW 服务似乎运行良好:

[root@rhcsa ~]# systemctl status [email protected][email protected] - Ceph rados gateway
     Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; preset: disabled)
     Active: active (running) 
   Main PID: 18501 (radosgw)
      Tasks: 9
     Memory: 6.5M
        CPU: 39ms
     CGroup: /system.slice/system-ceph\x2dradosgw.slice/[email protected]
             └─18501 /usr/bin/radosgw -f --cluster ceph --name client.rgw --setuser ceph --setgroup ceph

rhcsa systemd[1]: Started Ceph rados gateway.

但是,当我尝试从 8080 获取响应时,却什么也没得到:

[root@rhcsa ~]# curl http://localhost:8080
curl: (7) Failed to connect to localhost port 8080: Connection refused

我正在使用 Rocky Linux 9.2,和 Ceph 版本 17.2.6 quincy/stable。

答案1

重新创建并重新激活 ceph-mgr 守护进程刚刚解决了这个问题,现在我可以从我的 RadosGW 端点获得响应。

相关内容