Solved due to permisson on /var/run,could not start ceph on freebsd

SamMa

New Member


Messages: 5

I got an error when try to start ceph monitor,the start command is :

service ceph start

and the error message is blow:
Code:
=== mon.nas ===

Starting Ceph mon.nas on nas...

2019-07-18 07:26:43.465 1410480 -1 open: failed to open pid file '/var/run/ceph/mon.nas.pid': (13) Permission denied

failed: 'ulimit -n 32768;   /usr/local/bin/ceph-mon -i nas --pid-file /var/run/ceph/mon.nas.pid -c /usr/local/etc/ceph/ceph.conf --cluster ceph  --setuser ceph --setgroup ceph '

/usr/local/lib/python2.7/site-packages/ceph_disk/main.py:5689: UserWarning:
here is my ceph configuration (/etc/ceph/ceph.conf):
Code:
[global]
fsid = bcc107da-a2f7-11e9-82e0-00e0b41c4980
public network = 192.168.122.0/24

osd pool default size      = 1
osd pool default min size  = 1
osd pool default pg num    = 128
osd pool default pgp num   = 128
osd journal size             = 2048     ; journal size, in megabytes

[mon]
mon initial members        = nas
mon host                   = nas
mon addr                   = 192.168.122.12
[mon.nas]
    host                       = nas
    mon addr                   = 192.168.122.12
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,678
Messages: 30,594

Check the ownership and permissions on /var/run/ceph/: ls -ld /var/run/ceph. It should be owned by ceph:ceph.

And this is not correct, /etc/ceph/ceph.conf. It should be /usr/local/etc/ceph/ceph.conf.
 
OP
OP
S

SamMa

New Member


Messages: 5

Check the ownership and permissions on /var/run/ceph/: ls -ld /var/run/ceph. It should be owned by ceph:ceph.

And this is not correct, /etc/ceph/ceph.conf. It should be /usr/local/etc/ceph/ceph.conf.
i create a link /etc/ceph and point to /usr/local/etc/ceph
and the /var/run/ceph permission setting will be destroy after the system reboot?
 
OP
OP
S

SamMa

New Member


Messages: 5

Why? What does that accomplish? Ceph is a package, therefore it should be able to run with all of its parts in /usr/local/...
because the ceph will try find cluster configure file in /etc/ceph, so i create a soft link point to /usr/local/etc
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,678
Messages: 30,594

because the ceph will try find cluster configure file in /etc/ceph
As you can see by the executed command it's configured to look for /usr/local/etc/ceph/ceph.conf. So there is no need for the symlink in /etc/.

Code:
ulimit -n 32768;   /usr/local/bin/ceph-mon -i nas --pid-file /var/run/ceph/mon.nas.pid -c /usr/local/etc/ceph/ceph.conf --cluster ceph  --setuser ceph --setgroup ceph
 
OP
OP
S

SamMa

New Member


Messages: 5

As you can see by the executed command it's configured to look for /usr/local/etc/ceph/ceph.conf. So there is no need for the symlink in /etc/.

Code:
ulimit -n 32768;   /usr/local/bin/ceph-mon -i nas --pid-file /var/run/ceph/mon.nas.pid -c /usr/local/etc/ceph/ceph.conf --cluster ceph  --setuser ceph --setgroup ceph
ok, i just follow this document to deploy the ceph:
but i do not want to create the /etc/ceph directory ,so i just create the link directory instead.
 
Top