Bug#1097699: systemd-resolved defaulting to hostname 'linux' on trixie
Luca Boccassi
bluca at debian.org
Mon Feb 17 18:24:49 GMT 2025
Control: tags -1 upstream
Control: close -1
On Mon, 17 Feb 2025 17:47:25 +0000 Philip Stewart
<philip.stewart.public at gmail.com> wrote:
> Package: systemd-resolved
> Version: 257.3-1
>
> Hello,
>
> On trixie, during the startup of systemd-resolved I observe the info
> message: "Defaulting to hostname 'linux'."
>
> /etc/hostname is populated and the correct hostname is returned by
> hostnamectl and hostname
>
> Attempting to set the hostname (with either hostnamectl or hostname)
> results in systemd-resolved emitting the warning message: "Failed to
> determine the local hostname and LLMNR/mDNS names, ignoring: Invalid
> argument"
>
> I prefer to set ReadEtcHosts=no, but observe the behaviour above with
> ReadEtcHosts set to either yes or no. However, without suitable
> entries for the local hostname in /etc/hosts, or if ReadEtcHosts=no,
> systemd-resolved does not synthesize records for the local hostname,
> and so queries for the local hostname are not found, oddly (to me at
> least!) causing sudo to emit a warning upon use that it is unable to
> resolve the host.
>
> I do not observe the same behaviour on any of my bookworm machines
> using systemd-resolved.
There are no patches or specific configuration settings for this, so as
per the reportbug template please re-run it after setting
SYSTEMD_LOG_LEVEL=debug in resolved and open a bug upstream on Github
with the full logs and all the details, and it will be handled:
https://github.com/systemd/systemd/issues/new?template=bug_report.yml
More information about the Pkg-systemd-maintainers
mailing list