Re: dhcp service problem on stretch
- Date: Thu, 6 Sep 2018 23:19:50 +0300
- From: Reco <recoverym4n@xxxxxxxxx>
- Subject: Re: dhcp service problem on stretch
On Thu, Sep 06, 2018 at 05:33:39PM +0000, Bonno Bloksma wrote:
> It seems the dhcp service does not want to start but I have no idea why.
> I have stripped my dhcpd.conf down to barely nothing and a regular test gives no errors but the service refuses to start, why?
> Also the logging is not very helpful
I always said that less is more.
You see, the trick with these logs is to know where to look, so ...
> linom1:~# systemctl status isc-dhcp-server.service
> ● isc-dhcp-server.service - LSB: DHCP server
> Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled)
> Active: failed (Result: exit-code) since Thu 2018-09-06 17:47:42 CEST; 12min ago
> Docs: man:systemd-sysv-generator(8)
> Process: 1668 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
> Tasks: 1 (limit: 4915)
> CGroup: /system.slice/isc-dhcp-server.service
> └─1409 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf
This is your usual systemd blurb, showing that you have dhcpd running
> Sep 06 17:47:42 linom1 systemd: Starting LSB: DHCP server...
> Sep 06 17:47:42 linom1 isc-dhcp-server: /etc/init.d/isc-dhcp-server: 50: /etc/init.d/isc-dhcp-server: cannot open /etc/dhcp/dhcpd6.conf: No
> Sep 06 17:47:42 linom1 isc-dhcp-server: Launching both IPv4 and IPv6 servers (please configure INTERFACES in /etc/default/isc-dhcp-server if
Scary, but they are warnings, not errors.
Yes, it takes reading initscript to understand that.
> Sep 06 17:47:42 linom1 isc-dhcp-server: Starting ISC DHCPv4 server: dhcpddhcpd service already running (pid file /var/run/dhcpd.pid currenty
And this shows us that you cannot start what's been started already
(another instance of dhcpcd is using a pidfile).
I assume that your dhcpd.conf is OK, so the problem should solve itself
service isc-dhcp-server stop
service isc-dhcp-server start
service isc-dhcp-server status