1

I'm creating a simple Ceph cluster and trying to connect to Ceph Gateway.

This is ceph status output of my Ceph cluster:

  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

And this is my Ceph config under /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"

I've created following directories for rgw: /var/lib/ceph/radosgw/ceph-rgw.rhcsa

Then the keyring:

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

Then started the Ceph's RadosGW service:

sudo systemctl restart ceph-radosgw@rgw.rhcsa

RadosGW service seems running fine:

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

rhcsa systemd[1]: Started Ceph rados gateway.

However, when I try to get a response from 8080, I get nothing:

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

I'm using Rocky Linux 9.2, with Ceph version 17.2.6 quincy/stable.

1 Answers1

0

Recreation & reactivating ceph-mgr daemon just solved the problem, now I can get responds from my RadosGW endpoint.