Problem configuring dhcp server: Job failed to start

38,907

Solution 1

Seems like you need a space instead of dash,

You have:

option domain-name-servers-192.168.2.1;

But it should be:

option domain-name-servers 192.168.2.1;

Solution 2

Probably access to dbus is denied by apparmor. To bypass security on this please run: sudo aa-copmplain /usr/sbin/dhcpd then restart isc by use of: sudo service isc-dhcp-server start

You can check if it is running using: ps aux |grep dhcpd and see if it's listening by use of: netstat -ln |grep 67

Solution 3

I guess if you comment out these lines it should start fine.

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
{
range 192.168.1.20 192.168.1.30;
} 
Share:
38,907

Related videos on Youtube

avaj
Author by

avaj

Updated on September 18, 2022

Comments

  • avaj
    avaj over 1 year

    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
    {
    range 192.168.1.20 192.168.1.30;
    } 
    

    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.

    • Requist
      Requist over 10 years
      Let's start with asking if you really need / want to use isc? The new default for Ubuntu is dnsmasq. Deviating from this path is always asking for a lot of work and possible additional problems with upgrades. If you do not need to you are better of using the default.
    • avaj
      avaj over 10 years
      well the reason of using isc is just that it was one way mentioned in the tutorial that i went through. I am just trying to learn these things. I would try using dnsmasq(in some other vm) but on the other side i would like to solve these error. So please help me in solving these error.
    • Requist
      Requist over 10 years
      I don't know, maybe lesson number one is not to deviate unless you have a very good reason to do so. Step 1 which you did is to overrule network manager which is now the default to handle all network connections in Ubuntu, this in turn stopped the dbus which is at the core of the system. It is possible, I ran this config on 12.04 LTS server, but overly complex and unwise unless you really have to and know what you're doing. I'll have a look at why dbus stopped working, effectively killing your system, but I strongly recommend you to go back to nm and dnsmasq.
  • Requist
    Requist over 10 years
    That is strange, here I test-installed and it runs without problems (after aa-complain). I am sorry, but for me it feels a bit pointless to spend a lot of time getting this combination running. I'll say, purge isc, reconfig nm and use dnsmasq.