You are not logged in.

#1 2015-07-20 01:52:45

nachopro
Member
Registered: 2013-08-23
Posts: 89

[SOLVED] dnsmasq doesn't start on boot

Hi, I'm using Arch as internet router (firehol & fireqos). I got two NICs net0 -> internet and net1 -> lan. The two NICs are running with netctl-ifplug@NIC.service.
All works ok except dnsmasq when try to starts on boot:

-- Reboot --
Jul 19 22:39:30 kraftig systemd[1]: Starting A lightweight DHCP and caching DNS server...
Jul 19 22:39:32 kraftig dnsmasq[312]: dnsmasq: syntax check OK.
Jul 19 22:39:32 kraftig systemd[1]: dnsmasq.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 19 22:39:32 kraftig systemd[1]: Failed to start A lightweight DHCP and caching DNS server.
Jul 19 22:39:32 kraftig systemd[1]: dnsmasq.service: Unit entered failed state.
Jul 19 22:39:32 kraftig systemd[1]: dnsmasq.service: Failed with result 'exit-code'.

Via SSH I can start dnsmasq manually, but not at boot.

what can I do?

Thanks!

Last edited by nachopro (2015-07-24 17:30:33)

Offline

#2 2015-07-20 08:30:16

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] dnsmasq doesn't start on boot

nachopro wrote:
...
Jul 19 22:39:32 kraftig systemd[1]: dnsmasq.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
...
man dnsmasq wrote:

EXIT CODES

[...]

2 - A problem with network access occurred (address in use, attempt  to use privileged ports without permission).

dnsmasq.service probably starts before the network is up. If you want to keep using netctl-ifplugd, you probably have to disable dnsmasq.service and then start it from an ifplugd hook or something like that, to ensure it gets started after the network comes up.

Using netctl@.service or dhcpcd@.service should work better (and some other network managers support network-online.target for things like this).

Offline

#3 2015-07-24 17:30:18

nachopro
Member
Registered: 2013-08-23
Posts: 89

Re: [SOLVED] dnsmasq doesn't start on boot

Thanks!

Offline

Board footer

Powered by FluxBB