Tag Archives: Debian learning road

Solutions to problems encountered when installing isc-dhcp-server on debian9.6

To set up a DHCP server, I encountered a problem during the installation:

guoyanzhang@bogon:~$ sudo apt-get install isc-dhcp-server-ldap
Reading the package list... Finished.
Dependency tree of the package being analyzed       
Reading status information... Done.       
The following software will be installed at the same time.
  isc-dhcp-server
The following [new] packages will be installed.
  isc-dhcp-server isc-dhcp-server-ldap
0 packages upgraded, 2 new packages installed, 0 packages to uninstall, 7 packages not upgraded.
0 B/955 kB of archives to download.
Decompression consumes 2,366 kB of extra space.
Do you wish to proceed? [Y/n] y
Predefined packages ...
Unselected package isc-dhcp-server is being selected.
(Reading the database ... The system currently has 169038 files and directories installed.)
Preparing to unpack ... /isc-dhcp-server_4.3.5-3+deb9u1_amd64.deb ...
Unpacking isc-dhcp-server (4.3.5-3+deb9u1) ...
Unselected package isc-dhcp-server-ldap is being selected.
Preparing to unpack ... /isc-dhcp-server-ldap_4.3.5-3+deb9u1_amd64.deb ...
isc-dhcp-server-ldap being added causes /usr/sbin/dhcpd to move to /usr/sbin/dhcpd-noldap
Unpacking isc-dhcp-server-ldap (4.3.5-3+deb9u1) ...
Working with triggers for systemd (232-25+deb9u6) ...
Processing triggers for man-db (2.7.6.1-2) ...
isc-dhcp-server (4.3.5-3+deb9u1) is being set up ...
Generating /etc/default/isc-dhcp-server...
Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
● 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 Wed 2019-01-09 11:52:37 CST; 12ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2169 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

1月 09 11:52:35 bogon dhcpd[2180]: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
1月 09 11:52:35 bogon dhcpd[2180]: irs_resconf_load failed: 59.
1月 09 11:52:35 bogon dhcpd[2180]: Unable to set resolver from resolv.conf; startup continuing but DDNS support may be affected
1月 09 11:52:35 bogon dhcpd[2180]: Wrote 0 leases to leases file.
1月 09 11:52:37 bogon isc-dhcp-server[2169]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
1月 09 11:52:37 bogon isc-dhcp-server[2169]:  failed!
1月 09 11:52:37 bogon systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
1月 09 11:52:37 bogon systemd[1]: Failed to start LSB: DHCP server.
1月 09 11:52:37 bogon systemd[1]: isc-dhcp-server.service: Unit entered failed state.
1月 09 11:52:37 bogon systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
isc-dhcp-server-ldap (4.3.5-3+deb9u1) is being set up ...
Processing triggers for systemd (232-25+deb9u6) ...

Key words:
irs_resconf_load failed: 59.
Unable to set resolver from resolv.conf; startup
Check out my resolv.conf and find:

guoyanzhang@bogon:/etc/network$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver fe80::1%wlp8s0
nameserver 192.168.1.1

The first nameserver looks like a nameserver and has been modified as follows:

guoyanzhang@bogon:/etc/network$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4

The reason is that this file was not configured in debian system at the beginning. This file was generated after I successfully installed it on the Internet. Now delete ISC-DHCP-Server and install it like this:

guoyanzhang@bogon:~$ sudo apt-get install isc-dhcp-server
Reading the package list... Finished.
Dependency tree of the package being analyzed       
Reading status information... Done.       
Recommended installation.
  isc-dhcp-server-ldap
The following [new] packages will be installed.
  isc-dhcp-server
0 packages upgraded, 1 new package installed, 0 packages to uninstall, 7 packages not upgraded.
An archive of 0 B/526 kB needs to be downloaded.
Unpacking consumes 1,425 kB of extra space.
Package is being preset ...
The unselected package isc-dhcp-server is being selected.
(Reading the database ... The system currently has 169038 files and directories installed.)
Preparing to unpack ... /isc-dhcp-server_4.3.5-3+deb9u1_amd64.deb ...
Unpacking isc-dhcp-server (4.3.5-3+deb9u1) ...
Working on a trigger for systemd (232-25+deb9u6) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up isc-dhcp-server (4.3.5-3+deb9u1) ...
Generating /etc/default/isc-dhcp-server ...
Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
● 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 Wed 2019-01-09 12:45:19 CST; 5ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6137 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Jan 09 12:45:17 bogon systemd[1]: Starting LSB: DHCP server...
Jan 09 12:45:17 bogon isc-dhcp-server[6137]: Launching both IPv4 and IPv6 servers (please configure…her).
Jan 09 12:45:17 bogon dhcpd[6148]: Wrote 0 leases to leases file.
Jan 09 12:45:19 bogon isc-dhcp-server[6137]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diag…iled!
Jan 09 12:45:19 bogon isc-dhcp-server[6137]:  failed!
Jan 09 12:45:19 bogon systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
Jan 09 12:45:19 bogon systemd[1]: Failed to start LSB: DHCP server.
Jan 09 12:45:19 bogon systemd[1]: isc-dhcp-server.service: Unit entered failed state.
Jan 09 12:45:19 bogon systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
Processing triggers for systemd (232-25+deb9u6) ...