Friday, April 8, 2022

[SOLVED] ceph mds service fails to start centos 7

Issue

I'm trying to create ceph-mds manually on Centos 7 on Ceph Nautilus 14.2.19. first i created a folder inside /var/lib/ceph/mds in the format of <clusterid>-mds.<hostid> then ran the following commands:

ceph-authtool --create-keyring /var/lib/ceph/mds/ceph-mds.<hostid>/keyring --gen-key -n mds.<hostid>
ceph auth add mds.<hostid> osd "allow rwx" mds "allow *" mon "allow profile mds" -i /var/lib/ceph/mds/ceph-mds.<hostid>/keyring

Then i changed user permissions of contents of /var/lib/ceph/mds/ to ceph:ceph. When i check the keyring and the keyring added on ceph auth list for mds i can confirm they are matching. However when I run systemctl start ceph-mds@mds. the daemon doesnt start and on journalctl i get the following error output:

Apr 20 11:38:14 <hostid> ceph-mds[44742]: 2021-04-20 11:38:14.592 7f53bcaef700 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2]
Apr 20 11:38:14 <hostid> ceph-mds[44742]: failed to fetch mon config (--no-mon-config to skip).

The entire output of systemctl status ceph-mds@mds.:

● ceph-mds@mds.<hostid>.service - Ceph metadata server daemon
   Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Tue 2021-04-20 12:28:15 +03; 11min ago
  Process: 15564 ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph (code=exited, status=1/FAILURE)
 Main PID: 15564 (code=exited, status=1/FAILURE)

Apr 20 12:28:15 <hostid> systemd[1]: Unit ceph-mds@mds.<hostid>.service entered failed state.
Apr 20 12:28:15 <hostid> systemd[1]: ceph-mds@mds.<hostid>.service failed.
Apr 20 12:28:15 <hostid> systemd[1]: ceph-mds@mds.<hostid>.service holdoff time over, scheduling restart.
Apr 20 12:28:15 <hostid> systemd[1]: Stopped Ceph metadata server daemon.
Apr 20 12:28:15 <hostid> systemd[1]: start request repeated too quickly for ceph-mds@mds.<hostid>.service
Apr 20 12:28:15 <hostid> systemd[1]: Failed to start Ceph metadata server daemon.
Apr 20 12:28:15 <hostid> systemd[1]: Unit ceph-mds@mds.<hostid>.service entered failed state.
Apr 20 12:28:15 <hostid> systemd[1]: ceph-mds@mds.<hostid>.service failed.

What might be the reason for this?


Solution

Resolved. Apparently the problem was because of wrong directory naming inside /var/lib/ceph/mds . After changing that and restarting the service it was fixed.



Answered By - Nyquillus
Answer Checked By - Marilyn (WPSolving Volunteer)