Are you trying to fix 'isc-dhcp-server: Job failed to start' error?
This guide is for you.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve DHCP related errors.
In this context, you will see how to fix the error 'isc-dhcp-server Job failed to start'.
Recently, we had a customer who has eth0 and eth1. His eth0 has dynamic IP-address and eth1 has static IP-address.
After installing isc-dhcp-server, he went to this one /etc/dhcpd.conf with the following command:
default-lease-time 650;
max-lease-time 79520;
option subnet-mask 255.0.0.0;
option broadcast-address 10.10.0.255;
option routers 10.10.0.2;
subnet 10.10.0.0 netmask 255.0.0.0
{
range 10.10.0.10 10.10.0.250;
}
Then he tried to start the server by running the below command:
sudo /etc/init.d/isc-dhcp-server start
As a result, he received the below error message:
start: Job failed to start
Now let's take a look at the solution our Support Experts provide to resolve this error.
Here, we found that the customer was using 8 bit subnet mask.
So it is not possible to use 10.10.0.0 with 8 bit subnet mask.
So we suggested either to change it to 10.0.0.0 or change the mask to 255.255.0.0.
Finally, it must be as below:
subnet 10.0.0.0 netmask 255.0.0.0
We can also run the DHCP daemon directly to get more information because the startup scripts will eat the error messages:
sudo /usr/sbin/dhcpd -df
This will display the specific complaints it has with the configuration file.
Also, we can see the manual page for the details of -d and -f:
$ man dhcpd
This article covers method to resolve DHCP 'isc-dhcp-server: Job failed to start' error. Basically, 'isc-dhcp-server: Job failed to start' error can happen if there is any issues with the commands that we run.
You can try to restart the service; if it really is an issue with the service starting before the network is up restarting it once the network is up should work:
$ sudo systemctl start restart isc-dhcp-server.service
If that doesn't work then try and investigate further why it's not starting by first getting the current status of the service:
$ sudo systemctl status isc-dhcp-server.service
That should also give you a PID for which you can further investigate with journaltctl where XXXX is the PID of the service:
$ journalctl _PID=XXXXX
Also, what caused/led you to do the following? Perhaps try undoing those changes as I'm not sure if that's helping or hurting. Was the /etc/init/isc-dhcp-server.conf file already there or did you manually create it?
So add a "Sleep 30" to the /etc/init/isc-dhcp-server.conf file. Also add " up service dhcp3-server restart " to my /etc/network/interfaces file.