![操作系统升级后自动启动后 dnsmasq 停止](https://linux22.com/image/113170/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%8D%87%E7%BA%A7%E5%90%8E%E8%87%AA%E5%8A%A8%E5%90%AF%E5%8A%A8%E5%90%8E%20dnsmasq%20%E5%81%9C%E6%AD%A2%20.png)
我已经将我的 rPi2 从 Wheezy 升级到 Jessie...它可以启动并且看起来不错,除了 dnsmasq 在启动后失败:
sudo service dnsmasq status
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
└─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: failed (Result: timeout) since Wed 2017-06-07 19:55:39 AEST; 24min ago
Process: 1526 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=killed, signal=TERM)
Process: 626 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 558 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 634 (code=exited, status=0/SUCCESS)
Jun 07 19:52:22 rpiserver dnsmasq[558]: dnsmasq: syntax check OK.
Jun 07 19:52:22 rpiserver dnsmasq[634]: started, version 2.72 cachesize 150
Jun 07 19:52:22 rpiserver dnsmasq[634]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP con...detect
Jun 07 19:52:22 rpiserver dnsmasq[634]: using nameserver 180.181.127.4#53
Jun 07 19:52:22 rpiserver dnsmasq[634]: using nameserver 180.181.127.3#53
Jun 07 19:52:22 rpiserver dnsmasq[634]: using local addresses only for domain localnet.beta.net
Jun 07 19:52:22 rpiserver dnsmasq[634]: no servers found in /var/run/dnsmasq/resolv.conf, will retry
Jun 07 19:52:22 rpiserver dnsmasq[634]: read /etc/hosts - 7 addresses
Jun 07 19:54:09 rpiserver systemd[1]: dnsmasq.service start-post operation timed out. Stopping.
Jun 07 19:55:39 rpiserver systemd[1]: dnsmasq.service stopping timed out. Terminating.
Jun 07 19:55:39 rpiserver systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jun 07 19:55:39 rpiserver systemd[1]: Unit dnsmasq.service entered failed state.
我可以使用 sudo dnsmasq 启动 dnsmasq 并且它可以工作。 (背景:我正在使用 isc-DHCP 服务;后来在安装 dnsmasq 时需要 DNS 代理。)
关于去哪里看有什么想法吗?
配置是:
grep -E -v '(^$)|(^#)' /etc/dnsmasq.conf
domain-needed
bogus-priv
local=/localnet.beta.net/
server=180.181.12.3
server=180.181.12.4
interface=eth0
listen-address=127.0.0.1
no-dhcp-interface=
expand-hosts
domain=alpha.org
答案1
抱歉...这个问题可以删除...因为我不再运行 dnsmasq。出于沮丧和更好的解决方案的想法,我安装了bind9。与 isc-dhcp 一起,它现在具有比 dnsmasq 所能提供的更强大的功能......并且它正在工作:) 谢谢。