Bug#923082: can't disable systemd-resolved
toni at debian.org
Sun Feb 24 11:49:00 GMT 2019
On Sun, Feb 24, 2019 at 08:03:38AM +0100, Martin Pitt wrote:
> Toni [2019-02-23 23:05 +0000]:
> > I can't disable systemd-resolved, which prevents me from running my own
> > DNS setup:
> systemd-resolved.service is not enabled by default in Debian. If you enabled
> it, what prevents you from disabling it again? (systemctl disable
I really can't remember having enabled it - and I also don't know why I
would have done it, having my own setup in several of the areas that
systemd is encroaching on. But what prevents me from disabling systemd,
is quite simple: It just does not work:
# systemctl stop systemd-resolved
# lsof -i udp at 0.0.0.0:53
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd 1 root 113u IPv4 10583 0t0 UDP localhost:domain
That's why I filed a bug report - it really should be possible to
disable this service.
> resolved doesn't run in pid 1 (that would be a really bad architecture!). This
> just means that pid 1 connected to localhost's name server to resolve a name
> (i. e. a DNS client). A better command to find out which processes are
> *listening* on UDP ports is "ss -ulpen", or for port 53 specifically,
> "ss -ulpen 'sport = 53'".
# ss -ulpen 'sport = 53'
State Recv-Q Send-Q Local Address:Port Peer Address:Port
UNCONN 0 0 192.168.122.1:53 0.0.0.0:* users:(("dnsmasq",pid=13861,fd=5)) ino:5159825 sk:a1 <->
UNCONN 0 0 127.0.0.1:53 0.0.0.0:* users:(("systemd",pid=1,fd=113)) ino:10583 sk:a2 <->
UNCONN 0 0 [::1]:53 [::]:* users:(("systemd",pid=1,fd=111)) ino:362 sk:a3 v6only:1 <->
This I took after trying to stop systemd-resolved.
Other things I tried:
* setting DNSStubListener=no in /etc/systemd/resovled.conf, followed by
* systemctl daemon-reload, followed by
* systemctl daemon-reexec
But it was all for naught.
More information about the Pkg-systemd-maintainers