AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 763541
Accepted
mahmood
mahmood
Asked: 2016-03-14 23:41:29 +0800 CST2016-03-14 23:41:29 +0800 CST 2016-03-14 23:41:29 +0800 CST

dnsmasq 重启失败

  • 772

每当我想重新启动dnsmasq服务时,我都会收到此错误

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!

如错误消息中所述,这些命令中没有有用的信息。

# 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.

的内容dnsmasq.conf是

 # 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

所以,第 4 行是dhcp-range=192.168.1.1,192.168.1.20,static. 我在 ubuntu-12.04 中使用了相同的内容。

更新:

无论如何,正确的语法是dhcp-range=192.168.1.0,static. 我不知道 12.04 是如何工作的!

dnsmasq
  • 1 1 个回答
  • 16433 Views

1 个回答

  • Voted
  1. Best Answer
    user9517
    2016-03-15T00:00:23+08:002016-03-15T00:00:23+08:00

    4 11:04:42 dnsmasq [18806]:dnsmasq:第 4 行 o...f 的 dhcp 范围错误

    这对我来说看起来很有用——你读过吗?好像你的配置有问题。

    提示:有些线条是椭圆的,使用 -l 来完整显示。

    这也是有用的信息——当你使用它时会发生什么?

    systemctl status -l dnsmasq.service 
    

    说真的,请阅读您提供的信息,我们不是错误消息阅读服务。

    • 4

相关问题

  • 如何使用 dnsmasq 配置静态通配符子域

  • 如何覆盖 Internet 地址的 TTL?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve