Bug 1955888 - systemd-resolved takes over port 53 preventing dnsmasq to start
Summary: systemd-resolved takes over port 53 preventing dnsmasq to start
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 33
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-01 09:53 UTC by Adam Pribyl
Modified: 2021-05-15 16:50 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-15 10:33:32 UTC
Type: Bug


Attachments (Terms of Use)

Description Adam Pribyl 2021-05-01 09:53:53 UTC
Description of problem:
After upgrade of server from F32 to F33 my network remained dead, because systemd-resolved took over the port 53 - this prevented the dnsmasq to start and serve the DHCP requests from all over the network.

Version-Release number of selected component (if applicable):
systemd-246.13-1.fc33.x86_64

How reproducible:
On upgrade thru dnf system-upgrade

Actual results:
May 01 11:39:57 server systemd-resolved[1071]: Failed to emit notification about changed property CurrentDNSServer: Transport endpoint is not connected
May 01 11:39:05 server systemd[1]: Failed to start DNS caching server..
May 01 11:39:05 server systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
May 01 11:39:05 server dnsmasq[2841]: FAILED to start up
May 01 11:39:05 server dnsmasq[2841]: dnsmasq: failed to create listening socket for port 53: Address already in use
May 01 11:39:05 server systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
May 01 11:39:05 server dnsmasq[2841]: failed to create listening socket for port 53: Address already in use

Comment 1 Zbigniew Jędrzejewski-Szmek 2021-05-15 10:33:32 UTC
You'll need to disable the stub listener. Please create
/etc/systemd/resolved.conf.d/stub-listener.conf:
   [Resolve]
   DNSStubListener=no

I'll close the bug though: it's just something that will need to be handled through an explicit
configuration from the admin.

Comment 2 Adam Pribyl 2021-05-15 16:32:38 UTC
This is however a problem if you update a remote system, and whole network remains without DHCP due to that. I'd propose that this should be handled by package maintainer at last.
Either the systemd-resolved should be started after a dnsmasq or similar services, or it should not be configured for start if there is another resolver already configured.

Comment 3 Zbigniew Jędrzejewski-Szmek 2021-05-15 16:50:20 UTC
There is an unlimited number of other resolvers that may be running. There is no mechanism to ask
"will there be some precess listening on port 53?".

I added a section in the Change page to mention this more:
https://fedoraproject.org/wiki/Changes/systemd-resolved#Local_stub_resolver_on_port_53


Note You need to log in before you can comment on or make changes to this bug.