Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#863896: dnsmasq: systemd appends junk to the dnsmasq commandline

194 views
Skip to first unread message

Alexander Schier

unread,
Jun 1, 2017, 2:10:03 PM6/1/17
to
Package: dnsmasq
Version: 2.76-5
Severity: important

Dear Maintainer,
dnsmasq doesn't start anymore.

$ /etc/init.d/dnsmasq start
[....] Starting 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.

$ 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)
Active: failed (Result: exit-code) since Thu 2017-06-01 19:48:58
CEST; 9s ago
Process: 4488 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited,
status=1/FAILURE)
Process: 4485 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited,
status=0/SUCCESS)
CPU: 6ms

Jun 01 19:48:58 hostname systemd[1]: Starting dnsmasq - A lightweight
DHCP and caching DNS server...
Jun 01 19:48:58 hostname dnsmasq[4485]: dnsmasq: syntax check OK.
Jun 01 19:48:58 hostname dnsmasq[4488]: dnsmasq: junk found in command line
Jun 01 19:48:58 hostname systemd[1]: dnsmasq.service: Control process
exited, code=exited status=1
Jun 01 19:48:58 hostname systemd[1]: Failed to start dnsmasq - A
lightweight DHCP and caching DNS server.
Jun 01 19:48:58 hostname systemd[1]: dnsmasq.service: Unit entered
failed state.
Jun 01 19:48:58 hostname systemd[1]: dnsmasq.service: Failed with result
'exit-code'.

debugging the initscript with systemd-exec command (by prepending
"echo"), i found that systemd-exec tries to append dns records to the
command line:

exec /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7
/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service . 172800
IN DS
19036,8,2,49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
. 172800 IN DS
20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d

running dnsmasq or dnsmasq -d without appending such records works with
my config just fine.
I am not sure what it is appending there, but i do not see why i should
want it there anyway, even when it would have the correct syntax.
I think a initscript should start a service as vanilla as possible, i
have my own dnsmasq.conf and are a bit surprised that the initscript
wants to add stuff i did not add myself.


Alex


-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64
(x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dnsmasq depends on:
ii dnsmasq-base 2.76-5+b1
ii init-system-helpers 1.48
ii netbase 5.4

dnsmasq recommends no packages.

Versions of packages dnsmasq suggests:
pn resolvconf <none>

-- Configuration Files:
/etc/dnsmasq.conf changed [not included]
/etc/init.d/dnsmasq changed [not included]

-- no debconf information

jam...@hexhost.net

unread,
Jun 2, 2017, 3:20:03 AM6/2/17
to

This appears to be an issue when the ‘dns-root-data’ package is installed (In my case it was used by pdns). It’s by default in BIND zone-file format. Dnsmasq requires it to be reformatted into a format friendly to dnsmasq on the command line.

 

The /etc/init.d/dnsmasq file attempts to do this but does not do it correctly. I’m not exactly sure what the exact line change is that needs to be done. In my case I didn’t need the dns-root-data package since I was no longer using pdns and uninstalled it.

 

Package: dnsmasq

Status: install ok installed

Priority: optional

Section: net

Installed-Size: 71

Maintainer: Simon Kelley <si...@thekelleys.org.uk>

Architecture: all

Version: 2.76-5

Depends: netbase, dnsmasq-base (>= 2.76-5), init-system-helpers (>= 1.18~)

Suggests: resolvconf

Conflicts: resolvconf (<< 1.15)

Conffiles:

/etc/init.d/dnsmasq 619ec632736050c3f49e43ecf218efce

/etc/default/dnsmasq 8528b9b07acf4cbac231eb21dd3d262c

/etc/dnsmasq.conf bc949f5cad485a88b585271b933f0c05

/etc/resolvconf/update.d/dnsmasq 79d449fe3b873444952bc1192bb53f0c

/etc/insserv.conf.d/dnsmasq 530a424ac064ea9d86f235d12ecc227a

Description: Small caching DNS proxy and DHCP/TFTP server

Dnsmasq is a lightweight, easy to configure, DNS forwarder and DHCP

server. It is designed to provide DNS and optionally, DHCP, to a

small network. It can serve the names of local machines which are

not in the global DNS. The DHCP server integrates with the DNS

server and allows machines with DHCP-allocated addresses

to appear in the DNS with names configured either in each host or

in a central configuration file. Dnsmasq supports static and dynamic

DHCP leases and BOOTP/TFTP for network booting of diskless machines.

Rik Theys

unread,
Jun 2, 2017, 3:40:03 PM6/2/17
to
Package: dnsmasq
Version: 2.76-5
Followup-For: Bug #863896

This issue seems to be caused by the recent upgrade of the dns-root-data
package. The root.ds file in this new package contains two records where
the previous version (2015052300+h+1) only had one record.

The old version was also formatted with spaces, where the new one uses
tabs.

Downgrading dns-root-data to the previous version lets dnsmasq start
again.

This should be fixed in the dnsmasq init script where it parses
/usr/share/dns/root.ds

Regards,

Rik


-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64
(x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dnsmasq depends on:
ii dnsmasq-base 2.76-5+b1
ii init-system-helpers 1.48
ii netbase 5.4

dnsmasq recommends no packages.

Versions of packages dnsmasq suggests:
pn resolvconf <none>

-- Configuration Files:
/etc/default/dnsmasq changed [not included]
/etc/dnsmasq.conf changed [not included]

-- no debconf information

Robert Luberda

unread,
Jun 3, 2017, 6:20:03 AM6/3/17
to
Control: fixed -1 2.77-1

>
> This issue seems to be caused by the recent upgrade of the dns-root-data
> package. The root.ds file in this new package contains two records where
> the previous version (2015052300+h+1) only had one record.

It looks like the bug has been recently fixed in unstable.

Regards,
robert
0 new messages