On 9/3/2015 8:59 PM, Fernando Rodriguez wrote:
On Thursday, September 03, 2015 8:09:02 PM Mike Edenfield wrote:

What makes rc-status think something is crashed, and how can I fix this?

basement log # rc-status -v | grep crashed
   dhcpd [  crashed  ]
basement log # ps aux | grep dhcpd
root      2214  0.0  0.0   8268   876 pts/0    S+   19:47   0:00 grep
--colour=auto dhcpd
dhcp      2648  0.0  0.6  30028 12136 ?        Ss   Aug29   0:00
/usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf -q -pf /var/run/dhcp/dhcpd.pid
-lf /var/lib/dhcp/dhcpd.leases -user dhcp -group dhcp -chroot
/chroot/dhcp enp0s7



This is just a guess but it could be the permissions on the pid file on
/chroot/dhcp/var/run/dhcp/. So stop the daemon, delete the file, check that the
directory is owned by dhcp:dhcp and start the daemon again.


That was a good guess -- I did find something else unrelated wrong with the log file permissions :) But it didn't help here.

The directory is owned by dhcp:dhcp, and when I stop the service, the pid file is deleted automatically, which I assume means the permissions are correct:

basement log # dir /chroot/dhcp/var/run/dhcp
total 8
drwxr-xr-x 2 dhcp dhcp 4096 Sep  4 07:21 ./
drwxr-xr-x 3 root root 4096 Oct  4  2009 ../
basement log # /etc/init.d/dhcpd start
* Starting chrooted dhcpd ... [ ok ]
basement log # dir /chroot/dhcp/var/run/dhcp
total 12
drwxr-xr-x 2 dhcp dhcp 4096 Sep  4 07:21 ./
drwxr-xr-x 3 root root 4096 Oct  4  2009 ../
-rw-r--r-- 1 root root    6 Sep  4 07:21 dhcpd.pid
basement log # rc-status -v | grep crashed
 dhcpd       [ crashed  ]

Also, just for reference, I already tried "zap"; that didn't help because "stop" puts it correctly into the stopped state anyway.

--Mike


Reply via email to