Systemd: [resolved] status: resolve call failed: All attempts to contact name servers or networks failed

Created on 5 Apr 2018  ·  3Comments  ·  Source: systemd/systemd

Submission type

  • Bug report

systemd version the issue has been seen with

systemd 238.0
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid

Used distribution

Arch Linux

In case of bug report: Expected behaviour you didn't see

I should be able to call systemd-resolve status.

In case of bug report: Unexpected behaviour you saw

When I call systemd-resolve status I just get:
status: resolve call failed: All attempts to contact name servers or networks failed

The network is definitly working. Here is my /etc/systemd/resolved.conf:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
DNS=139.174.2.5 139.174.2.6
FallbackDNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
#Domains=
#LLMNR=yes
#MulticastDNS=yes
DNSSEC=no
Cache=yes
#DNSStubListener=udp

and my interface file /etc/systemd/network/enp0s31f6.network:

[Match]
Name=enp0s31f6

[Network]
Address=139.174.4.9/24
Gateway=139.174.4.254
DNS=139.174.2.5
DNS=139.174.2.6

It is possible to resolve Domains as normally and systemd-resolved status says it's running:

● systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-05 17:27:57 CEST; 5min ago
     Docs: man:systemd-resolved.service(8)
           https://www.freedesktop.org/wiki/Software/systemd/resolved
           https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
           https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
 Main PID: 9695 (systemd-resolve)
   Status: "Processing requests..."
    Tasks: 1 (limit: 4915)
   Memory: 1.1M
   CGroup: /system.slice/systemd-resolved.service
           └─9695 /usr/lib/systemd/systemd-resolved

Apr 05 17:27:56 akira.rz.tu-clausthal.de systemd[1]: Starting Network Name Resolution...
Apr 05 17:27:57 akira.rz.tu-clausthal.de systemd-resolved[9695]: Positive Trust Anchors:
Apr 05 17:27:57 akira.rz.tu-clausthal.de systemd-resolved[9695]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
Apr 05 17:27:57 akira.rz.tu-clausthal.de systemd-resolved[9695]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Apr 05 17:27:57 akira.rz.tu-clausthal.de systemd-resolved[9695]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in->
Apr 05 17:27:57 akira.rz.tu-clausthal.de systemd-resolved[9695]: Using system hostname 'akira.rz.tu-clausthal.de'.
Apr 05 17:27:57 akira.rz.tu-clausthal.de systemd[1]: Started Network Name Resolution.

Problems I see when I check the logs:

[...]

Apr 03 08:57:48 akira.rz.tu-clausthal.de systemd-resolved[13255]: Using degraded feature set (UDP) for DNS server 2001:638:605:18::1.
Apr 03 08:58:10 akira.rz.tu-clausthal.de systemd-resolved[13255]: Using degraded feature set (TCP) for DNS server 2001:638:605:18::1.
Apr 03 08:58:16 akira.rz.tu-clausthal.de systemd-resolved[13255]: Using degraded feature set (UDP) for DNS server 2001:638:605:18::1.
Apr 03 08:58:26 akira.rz.tu-clausthal.de systemd-resolved[13255]: Using degraded feature set (TCP) for DNS server 2001:638:605:18::1.
Apr 03 08:58:32 akira.rz.tu-clausthal.de systemd-resolved[13255]: Using degraded feature set (UDP) for DNS server 2001:638:605:18::1.
Apr 03 08:58:42 akira.rz.tu-clausthal.de systemd[1]: Stopping Network Name Resolution...
Apr 03 08:58:42 akira.rz.tu-clausthal.de systemd-resolved[13255]: Failed to send hostname reply: Transport endpoint is not connected
Apr 03 08:58:42 akira.rz.tu-clausthal.de systemd[1]: Stopped Network Name Resolution.
Apr 03 08:59:25 akira.rz.tu-clausthal.de systemd[1]: Starting Network Name Resolution...
[...]
Apr 04 15:22:20 akira.rz.tu-clausthal.de systemd-resolved[349]: Using degraded feature set (UDP) for DNS server 139.174.2.5.
Apr 04 15:22:20 akira.rz.tu-clausthal.de systemd-resolved[349]: Using degraded feature set (UDP) for DNS server 139.174.2.5.
Apr 04 15:30:43 akira.rz.tu-clausthal.de systemd-resolved[349]: Grace period over, resuming full feature set (UDP+EDNS0) for DNS server 139.174.2.5.
Apr 04 15:30:43 akira.rz.tu-clausthal.de systemd-resolved[349]: Grace period over, resuming full feature set (UDP+EDNS0) for DNS server 139.174.2.5.
[...]

How I found this issue:
I encountered problems with the python call: socket.gethostbyaddr('139.174.16.248') it works fine on my other machine but runs in an error on this machine although I can resolve the hostname of the address without problem on both machines. Then I have checked systemd-resolved and it seems like it's some issue with DNS

Most helpful comment

Please use systemd-resolve --status, as currently systemd-resolve does not use any 'verbs'. Note that now I am preparing #8623.

All 3 comments

Please use systemd-resolve --status, as currently systemd-resolve does not use any 'verbs'. Note that now I am preparing #8623.

@yuwata Ahh ok. The error message is a little bit misleading. Will resolvectl support 'verbs'?

@shibumi the "--help" text of the current tool should be pretty explanatory...

But yeah, "resolvectl" is supposed to have verbs.

Anyway, I think we can close this, as the current tool, and documentation is pretty consistent and comprehensive on this. One can argue here that the current tool contradicts the rule of "least surprise", but on that level the fact that the current tool isn't called "resolvctl" is already an issue. Either way, the work in #8623 is working on fixing both, hence let's close this one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nontrinaryalternativeblackmale picture nontrinaryalternativeblackmale  ·  3Comments

anitazha picture anitazha  ·  3Comments

carloabelli picture carloabelli  ·  3Comments

Stebalien picture Stebalien  ·  3Comments

ph448 picture ph448  ·  3Comments