From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5BD8D1385DD for ; Fri, 4 Sep 2015 19:29:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39DD1142BD; Fri, 4 Sep 2015 19:29:40 +0000 (UTC) Received: from BLU004-OMC1S22.hotmail.com (blu004-omc1s22.hotmail.com [65.55.116.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 13CCB141E5 for ; Fri, 4 Sep 2015 19:29:39 +0000 (UTC) Received: from BLU436-SMTP109 ([65.55.116.7]) by BLU004-OMC1S22.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 4 Sep 2015 12:29:38 -0700 X-TMN: [hUD5wexgvnZJKFsAlHc5Shug9nKGO0xA] X-Originating-Email: [frodriguez.developer@outlook.com] Message-ID: From: Fernando Rodriguez To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] dhcpd always shows "crashed" even though it's running Date: Fri, 4 Sep 2015 15:28:56 -0400 User-Agent: KMail/4.14.8 (Linux/3.18.20; KDE/4.14.8; x86_64; ; ) In-Reply-To: <55E97FAB.7040700@kutulu.org> References: <55E8E11E.5030103@kutulu.org> <55E97FAB.7040700@kutulu.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-OriginalArrivalTime: 04 Sep 2015 19:29:38.0094 (UTC) FILETIME=[09BF54E0:01D0E748] X-Archives-Salt: 4cf670cf-284d-4ae1-9a25-05eebfd3c1db X-Archives-Hash: db4e673836418ab5e0e3766baa6db54f On Friday, September 04, 2015 7:25:31 AM Mike Edenfield wrote: > 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 ] > After doing that again cat the pid file and compare it to the PID for dhcpd. If it looks right you can try copying to /var/run/dhcp/ and run rc-status again, if it works this time then portage is looking for the pid file outside the chroot. You set it up using the DHCPD_CHROOT in /etc/conf.d/dhcpd right? I don't use that option since I use apparmor but it looks like the init script will do the right thing in traccking the pid file if setup correctly. Are you using the latest version (may need to run etc-update)? -- Fernando Rodriguez