-2

Whenever I want to restart dnsmasq service, I receive this error

root@ipm:/tftpboot# /etc/init.d/dnsmasq restart
[....] Restarting dnsmasq (via systemctl): dnsmasq.serviceJob for
dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
 failed!

There is no useful information in those commands as stated in the error message.

# systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/dnsmasq.service.d             └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.con 
   Active: failed (Result: exit-code) since  2016-03-4 11:04:42 IRST; 3min 53s ago
  Process: 18806 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=1/FAILURE)

 14 11:04:42  systemd[1]: Starting dnsmasq - A lightweight DHCP .....
 14 11:04:42  dnsmasq[18806]: dnsmasq: bad dhcp-range at line 4 o...f
 14 11:04:42  systemd[1]: dnsmasq.service: Control process exite...=1
 14 11:04:42  systemd[1]: Failed to start dnsmasq - A lightweigh...r.
 14 11:04:42  systemd[1]: dnsmasq.service: Unit entered failed state.
 14 11:04:42  systemd[1]: dnsmasq.service: Failed with result 'e...'.
Hint: Some lines were ellipsized, use -l to show in full.

The content of the dnsmasq.conf is

 # cat /etc/dnsmasq.conf
 interface=enp3s0
 domain=hpclab
 expand-hosts
 dhcp-range=192.168.1.1,192.168.1.20,static
 dhcp-option=42,0.0.0.0
 dhcp-boot=pxelinux.0
 enable-tftp
 tftp-root=/tftpboot
 dhcp-host=00:e0:81:c5:19:64,ws01,192.168.1.1

So, line 4 is dhcp-range=192.168.1.1,192.168.1.20,static. I used the same content with ubuntu-12.04.

UPDATE:

Anyway, the correct syntax is dhcp-range=192.168.1.0,static. I don't know how that was working with 12.04!

mahmood
  • 1,022
  • 7
  • 20
  • 33

1 Answers1

4

4 11:04:42 dnsmasq[18806]: dnsmasq: bad dhcp-range at line 4 o...f

That looks useful to me - did you read it? It kind of seems like there is a problem with your config.

Hint: Some lines were ellipsized, use -l to show in full.

that's useful information too - what happens when you use it ?

systemctl status -l dnsmasq.service 

Seriously, please read the information you are presented with, we're not an error message reading service.

user9517
  • 115,471
  • 20
  • 215
  • 297