Linux dhcp server start fail

isc-dhcp-server can’t start

i installed dhcp3-server , now i want to start its service and it said : [FAIL] Starting ISC DHCP server: dhcpd[. ] check syslog for diagnostics. . failed! failed! i check ps aux | grep dhcp shows : root 6178 0.0 0.0 9956 3708 ? S 23:06 0:00 /sbin/dhclient -d -4 -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /var/run/dhclient-wlan0.pid -lf /var/lib/dhcp/dhclient-eee3fc61-32c1-4aa7-b189-94556369eac2-wlan0.lease -cf /var/run/nm-dhclient-wlan0.conf wlan0 root 6418 0.0 0.0 7764 860 pts/0 R+ 23:13 0:00 grep dhcp dhcpd.conft is like default , before that i tried to implement a dhcp server on my at0 but i couldn’t . if need a details just said . `i tried to remove it but : [FAIL] Stopping ISC DHCP server: dhcpd failed! i don know what can i do now ?! how can i fix it ? or delete it ?

1 Answer 1

What does the file /var/log/syslog show? That’s where the diagnostic information will be.

If I had to guess, I’d say you don’t have a static IP address configured for your interface that you have dhcpd set to run on. You need to add one in /etc/network/interfaces

i config static ip to my at0 ; and this is the last ten line of syslog : ` No subnet declaration for wlan0 (192.168.1.3). Jun 25 23:21:20 bahram dhcpd: ** Ignoring requests on wlan0. If this is not what Jun 25 23:21:20 bahram dhcpd: you want, please write a subnet declaration Jun 25 23:21:20 bahram dhcpd: in your dhcpd.conf file for the network segment Jun 25 23:21:20 bahram dhcpd: to which interface wlan0 is attached. ** ` i think you right ; i clean my dhcp and my at0 and tried to start service dhcpd maybe you right, tnq

Источник

Problem configuring dhcp server: Job failed to start

I m trying to configure dhcp server in ubtuntu onto my virtual box and connecting other virtual instance of ubuntu to this dhcp sever i have installed dhcp server using sudo apt-get isc-dhcp-server then i went to /etc/networks/interfaces and wrote this

auto eth0 iface eth0 inet static address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254 broadcast 192.168.1.255 dns-nameserver 192.168.1.254 dns-search lan 

i then restarted networking service using sudo service networking restart suddenly my GUI crashed and hanged and all that stuff, which forced me to reboot the system. i checked for ip which showed me that i had got it. then i went to /etc/default/isc-dhcp-server and made this change INTERFACES=»eth0″ then i went to /etc/dhcp/dhcpd.conf and wrote the following lines

ddns-update-style none; default-lease-time 600; max-lease-time 7200; authoritative; log-facility local7; option broadcast-address 192.168.1.255; option routers 192.168.1.254; option domain-name-servers-192.168.2.1; option domain-name "ttc.com"; subnet 192.168.1.0 netmask 255.255.255.0

i restarted the service using sudo services isc-dhcp-server but it says: stop: unknown instance: start: Job failed to start i also tried to start dhcp server using the command sudo service isc-dhcp-server start but when i tried sudo start isc-dhcp-server or sudo status isc-dhcp-server it shows me an error of iscinitctl: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket. No such file or directory. i don’t know what to do now so please give me some guidence solving this error. I would like to provide more details i needed.

Читайте также:  Типы сетевых интерфейсов linux

Источник

Debian User Forums

Debian 8 DHCP Server error «Failed to start LSB: DHCP Server

Debian 8 DHCP Server error «Failed to start LSB: DHCP Server

#1 Post by BorrowedByte » 2017-10-23 09:06

I installed Debian 8 on Virtual Box and also updated and upgraded, but when I install DHCP and edited the files with my config, when i try to do a «service isc-dhcp-server restart» i got this message «Failed to start LSB: DHCP Server».
I had tried my config and also diferent ones from tutorials on youtube, and keeps doing the same.

What could be the problem please? Thanks in advance for your help.

reinob Posts: 1144 Joined: 2014-06-30 11:42 Has thanked: 80 times Been thanked: 41 times

Re: Debian 8 DHCP Server error «Failed to start LSB: DHCP Se

#2 Post by reinob » 2017-10-23 11:26

I installed Debian 8 on Virtual Box and also updated and upgraded, but when I install DHCP and edited the files with my config, when i try to do a «service isc-dhcp-server restart» i got this message «Failed to start LSB: DHCP Server».
I had tried my config and also diferent ones from tutorials on youtube, and keeps doing the same.

What could be the problem please? Thanks in advance for your help.

Well, for starters, check the relevant logs and post here whatever may look relevant.
Then we take it from there..

Re: Debian 8 DHCP Server error «Failed to start LSB: DHCP Se

#3 Post by BorrowedByte » 2017-10-23 12:36

Image

Image

Image

Image

So far this is my config, but still not working
Any help will be great, its driving me mad allready.

Re: Debian 8 DHCP Server error «Failed to start LSB: DHCP Se

#4 Post by Woefdram » 2017-10-24 03:19

It seems to me that you’re trying to run a DHCP server on an interface that is configurerd with DHCP. You have mixed up the configuration of your network card, as defined in /etc/network/interfaces.

iface eth0 inet dhcp address .. netmask ..

You should replace the «dhcp» with «static» (and restart the interface).

My guess is that the dhcp-client takes the interface, so that the dhcp-server can not.

Источник

Service isc-dhcp-server fails to start

I’m currently working on a project of making an highly secured router with my RaspberryPi to navigate anonymously on the net. Yet, I’m not able to correctly configurate the daemon to finalise the wifi the Internet connection to the new server: Indeed, when I do:

:~ $ sudo service isc-dhcp-server start 
Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details. 
authoritative; #added subnet 192.168.42.0 netmask 255.255.255.0
source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet manual allow-hotplug wlan0 iface wlan0 inet static adress 192.168.42.1 netmask 255.255.255.0 iface wlan0 inet dhcp iface eth0 inet manual allow-hotplug wlan0 iface wlan0 inet static adress 192.168.42.1 netmask 255.255.255.0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf up iptables-restore < /etc/iptables.ipv4.nat 

My RaspberryPi is wirely connected but has a wifi dongle Here is the systemctl status isc-dhcp-server.service

:~ $ systemctl status isc-dhcp-server.service ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server) Active: failed (Result: exit-code) since Tue 2016-06-07 00:13:45 CEST; 53s ago Process: 18098 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE) 
-- Logs begin at Mon 2016-06-06 21:17:01 CEST, end at Tue 2016-06-07 00:18:32 CEST. -- Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: than a configuration issue please read the section on submitting Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: bugs on either our web page at www.isc.org or in the README file Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: before submitting a bug. These pages explain the proper Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: process and the information we find helpful for debugging.. Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: exiting. Jun 07 00:17:01 raspberrypi CRON[18118]: pam_unix(cron:session): session opened for user root by (uid=0) Jun 07 00:17:01 raspberrypi CRON[18122]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Jun 07 00:17:01 raspberrypi CRON[18118]: pam_unix(cron:session): session closed for user root Jun 07 00:18:32 raspberrypi sudo[18139]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn Jun 07 00:18:32 raspberrypi sudo[18139]: pam_unix(sudo:session): session opened for user root by pi(uid=0) 

2 Answers 2

The most obvious one was to write address with two "d" here:

subnet 192.168.42.0 netmask 255.255.255.0

The second one was to start the wireless network by running:

Читайте также:  Kali linux network adapters

And I would have been able to start service isc-dhcp-server I made it thanks to this raspberrypihq tutorial to turn a RPi into a routeur.

Yet, I now have issues to run sudo update-rc.d isc-dhcpd-server enable . Any help would be warmly welcomed!

@muru I did: :~ $ sudo systemctl enable isc-dhcpd-server Failed to execute operation: No such file or directory hummm.

IN CASE IT HELPS ANYONE I've just been right through this exasperating issue, on DietPi (Debian Buster) on a Pi Zero W and HAVE BOTTOMED THE PROBLEM.

isc-dhcp-server is excellent but DOES HAVE this quirk, as noted by the original enquirer above. I've bottomed the problem - it's not a bug - and this is the detail of the reason:

isc-dhcp-server refuses (throws an error) if it cannot see an UP ethernet network subnet at launch time; it DOESN'T (contrary to some commentators) require an actual connection TO the ethernet port to which it is associated. When developing a WiFi Hotspot device, its normally a case of using hostapd as the AP server function (which re-configures the WiFi hardware to switch to AP mode) and alongside hostapd, you need a dhcp server like isc-dhcp-server to provide the IP address leasing service. SO: normally the start point, is a WiFi device which at boot, was configured as a CLIENT device, but needs to be switched to HOST mode to act as hotspot. So an early step is to set wlan0 (or whatever) DOWN, prior to launching hostapd. 

BUT that situation, is immediately one of those which isc-dhcp-server does not like: if you try to start it before hostapd, it will fail, complaining that there is no subnet for it to listen on.

So you may innocently then try, adding a new IP address (for the host) to your wlan0 (or equiv) and re-trying: THAT WON'T WORK EITHER, because although you now have a new IP attached to the Ethernet port, you will also find you cannot set it 'UP' (ip link set wlan0 up will FAIL). This is because the port is 'tainted' by the still-active stale address and the wpa-supplicant process which was using it. LONG STORY SHORT: you need to kill wpa-supplicant, to "free" the old address / FLUSH the ip settings for the port / THEN add the new IP address for host ; EVEN THEN, you'll find isc-dhcp-server STILL won't start, because you can't set the interface up - yet. Finally - run hostapd now, before isc, and IT will (in reconfiguring the chipset) also SET the wlan0 interface, to UP. So now - finally - you CAN run isc-dhcp-server, and it will start cleanly, and your hotspot will be up. 

It's taken me about five hours, I hope this saves someone some time. My distilled note:

Читайте также:  Lenovo yoga linux mint

SORTING ISC-DHCP-SERVER alongside HOSTAPD: THE SOLUTION

YOU HAVE TO follow THIS SEQUENCE:

KILL the wpa-supplicant process (that's sustaining the client conn) this way: kill -2 $( cat /run/wpa_supplicant.wlan0.pid ) sleep 1 kill -9 $( cat /run/wpa_supplicant.wlan0.pid ) FLUSH the WLAN IP setup, using: ip addr flush dev wlan0 ADD the new host IP ADDRESS, using: ip addr add 10.1.1.1/24 dev wlan0 START hostapd, which will also put wlan0 UP: /usr/sbin/hostapd /etc/hostapd/hostapd.conf & START isc-dhcp-server ( WLAN is up, as host now ): sudo service isc-dhcp-server restart 

THEN the Access Point should be UP and ready to accept clients.

Those are my addresses of course / edit to suit your need.

TWO MORE TIPS: Config files hostapd.conf and dhcp.conf can drive you mad also: -here are working samples. IMPORTANT: do not sweat the 'drivername' in hostapd.conf: it's not needed. 'Commented out' is fine:

Источник

Оцените статью
Adblock
detector