ISC-DHCP-SERVER erro Failed to start LSB: DHCP server. [RESOLVIDO]

1. ISC-DHCP-SERVER erro Failed to start LSB: DHCP server. [RESOLVIDO]

adam
adamfingol

(usa Debian)

Enviado em 23/01/2020 - 01:29h

estou tentando criar um servidor de dhcp para teste. no virtual box. porem ao tentar levandor o servidor dhcp ele da um erro que nao consigo resolver


root@servidor:~# /sbin/service isc-dhcp-server restart
Job for isc-dhcp-server.service failed because the control process exited with e rror code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
root@servidor:~# journalctl -xe
jan 23 01:06:28 servidor dhcpd[981]: bugs on either our web page at www.isc.org or in the README file
jan 23 01:06:28 servidor dhcpd[981]: before submitting a bug. These pages explain the proper
jan 23 01:06:28 servidor dhcpd[981]: process and the information we find helpful for debugging.
jan 23 01:06:28 servidor dhcpd[981]:
jan 23 01:06:28 servidor isc-dhcp-server[972]: dhcpd self-test failed. Please fix /etc/dhcp/dhcpd.conf.
jan 23 01:06:28 servidor isc-dhcp-server[972]: The error was:
jan 23 01:06:28 servidor dhcpd[981]: exiting.
jan 23 01:06:28 servidor dhcpd[982]: Internet Systems Consortium DHCP Server 4.4.1
jan 23 01:06:28 servidor isc-dhcp-server[972]: Internet Systems Consortium DHCP Server 4.4.1
jan 23 01:06:28 servidor dhcpd[982]: Copyright 2004-2018 Internet Systems Consortium.
jan 23 01:06:28 servidor isc-dhcp-server[972]: Copyright 2004-2018 Internet Systems Consortium.
jan 23 01:06:28 servidor dhcpd[982]: All rights reserved.
jan 23 01:06:28 servidor isc-dhcp-server[972]: All rights reserved.
jan 23 01:06:28 servidor isc-dhcp-server[972]: For info, please visit https://www.isc.org/software/dhcp/
jan 23 01:06:28 servidor dhcpd[982]: For info, please visit https://www.isc.org/software/dhcp/
jan 23 01:06:28 servidor dhcpd[982]: /etc/dhcp/dhcpd.conf line 30: unknown option dhcp.domain-name-server
jan 23 01:06:28 servidor dhcpd[982]: option domain-name-server 8.
jan 23 01:06:28 servidor dhcpd[982]: ^
jan 23 01:06:28 servidor isc-dhcp-server[972]: /etc/dhcp/dhcpd.conf line 30: unknown option dhcp.domain-name-server
jan 23 01:06:28 servidor isc-dhcp-server[972]: option domain-name-server 8.
jan 23 01:06:28 servidor isc-dhcp-server[972]: ^
jan 23 01:06:28 servidor dhcpd[982]: Configuration file errors encountered -- exiting
jan 23 01:06:28 servidor isc-dhcp-server[972]: Configuration file errors encountered -- exiting
jan 23 01:06:28 servidor dhcpd[982]:
jan 23 01:06:28 servidor systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit isc-dhcp-server.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
jan 23 01:06:28 servidor isc-dhcp-server[972]: If you think you have received this message due to a bug rather
jan 23 01:06:28 servidor isc-dhcp-server[972]: than a configuration issue please read the section on submitting
jan 23 01:06:28 servidor isc-dhcp-server[972]: bugs on either our web page at www.isc.org or in the README file
jan 23 01:06:28 servidor isc-dhcp-server[972]: before submitting a bug. These pages explain the proper
jan 23 01:06:28 servidor isc-dhcp-server[972]: process and the information we find helpful for debugging.
jan 23 01:06:28 servidor isc-dhcp-server[972]: exiting.
jan 23 01:06:28 servidor dhcpd[982]: If you think you have received this message due to a bug rather
jan 23 01:06:28 servidor systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit isc-dhcp-server.service has entered the 'failed' state with result 'exit-code'.
jan 23 01:06:28 servidor dhcpd[982]: than a configuration issue please read the section on submitting
jan 23 01:06:28 servidor systemd[1]: Failed to start LSB: DHCP server.
-- Subject: A unidade isc-dhcp-server.service falhou
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A unidade isc-dhcp-server.service falhou.
--
-- O resultado é failed.
jan 23 01:06:28 servidor dhcpd[982]: bugs on either our web page at www.isc.org or in the README file
jan 23 01:06:28 servidor dhcpd[982]: before submitting a bug. These pages explain the proper
jan 23 01:06:28 servidor dhcpd[982]: process and the information we find helpful for debugging.
jan 23 01:06:28 servidor dhcpd[982]:
jan 23 01:06:28 servidor dhcpd[982]: exiting.

root@servidor:~# ^C
root@servidor:~# Failed to start LSB: DHCP server.^C
root@servidor:~# systemctl status isc-dhcp-server.service
● isc-dhcp-server.service - LSB: DHCP server
Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
Active: failed (Result: exit-code) since Thu 2020-01-23 01:06:28 -03; 1min 21s ago
Docs: man:systemd-sysv-generator(8)
Process: 972 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

jan 23 01:06:28 servidor isc-dhcp-server[972]: exiting.
jan 23 01:06:28 servidor dhcpd[982]: If you think you have received this message due to a bug rather
jan 23 01:06:28 servidor systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
jan 23 01:06:28 servidor dhcpd[982]: than a configuration issue please read the section on submitting
jan 23 01:06:28 servidor systemd[1]: Failed to start LSB: DHCP server.
jan 23 01:06:28 servidor dhcpd[982]: bugs on either our web page at www.isc.org or in the README file
jan 23 01:06:28 servidor dhcpd[982]: before submitting a bug. These pages explain the proper
jan 23 01:06:28 servidor dhcpd[982]: process and the information we find helpful for debugging.
jan 23 01:06:28 servidor dhcpd[982]:
jan 23 01:06:28 servidor dhcpd[982]: exiting.
root@servidor:~#


root@servidor:~# vim /etc/dhcp/dhcpd.conf

vim /etc/dhcp/dhcpd.conf
root@servidor:/home/user# /sbin/service isc-dhcp-server restart
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.
root@servidor:/home/user# vim /etc/dhcp/dhcpd.conf
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.10 192.168.10.150;
option routers 192.168.10.1;
option domain-name-server 8.8.8.8;
option broadcast-address 192.168.10.255;
}



root@servidor:~# vim /etc/default/isc-dhcp-server

# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid

# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="enp0s8 enp0s9"
INTERFACESv6=""


root@servidor:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:ed:7c:8d brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
valid_lft 84728sec preferred_lft 84728sec
inet6 fe80::a00:27ff:feed:7c8d/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:f6:6c:8a brd ff:ff:ff:ff:ff:ff
inet 192.168.10.1/24 brd 192.168.10.255 scope global enp0s8
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fef6:6c8a/64 scope link
valid_lft forever preferred_lft forever
4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:75:b9:59 brd ff:ff:ff:ff:ff:ff
inet 192.168.20.1/24 brd 192.168.20.255 scope global enp0s9
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe75:b959/64 scope link
valid_lft forever preferred_lft forever
5: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:c8:7e:d9 brd ff:ff:ff:ff:ff:ff
inet 192.168.15.18/24 brd 192.168.15.255 scope global dynamic enp0s10
valid_lft 41738sec preferred_lft 41738sec
inet6 2804:431:c7cf:1ff4:a00:27ff:fec8:7ed9/64 scope global dynamic mngtmpaddr
valid_lft 259177sec preferred_lft 172777sec
inet6 fe80::a00:27ff:fec8:7ed9/64 scope link
valid_lft forever preferred_lft forever
root@servidor:~#



  


2. Re: ISC-DHCP-SERVER erro Failed to start LSB: DHCP server. [RESOLVIDO]

Daniel Lara Souza
danniel-lara

(usa Fedora)

Enviado em 23/01/2020 - 10:48h


deixo seu option domain-name-servers assim e testa


option domain-name-servers 208.67.222.222, 208.67.220.220;




3. Re: ISC-DHCP-SERVER erro Failed to start LSB: DHCP server. [RESOLVIDO]

adam
adamfingol

(usa Debian)

Enviado em 23/01/2020 - 12:41h

danniel-lara escreveu:


deixo seu option domain-name-servers assim e testa


option domain-name-servers 208.67.222.222, 208.67.220.220;



Consegui resolver:::
o código estava escrito errado domain-name-servers estava escrito sem o s do servers. Mas valeu a ajuda, e depois tive que configurar no arquivo /etc/network/interfaces configurar a rede






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts