You are not logged in.

#1 2021-10-28 11:17:59

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,152
Website

[NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

I have this issue:

$ LANG=C ping nextcloud.homeinfo.de
ping: nextcloud.homeinfo.de: Name or service not known
$ dig nextcloud.homeinfo.de

; <<>> DiG 9.16.22 <<>> nextcloud.homeinfo.de
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65082
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;nextcloud.homeinfo.de.		IN	A

;; ANSWER SECTION:
nextcloud.homeinfo.de.	3543	IN	A	91.213.21.16

;; AUTHORITY SECTION:
homeinfo.de.		72423	IN	NS	ns1.s-dns.de.
homeinfo.de.		72423	IN	NS	ns2.s-dns.de.

;; ADDITIONAL SECTION:
ns1.s-dns.de.		2028	IN	A	185.136.96.195
ns2.s-dns.de.		10028	IN	A	185.136.97.195

;; Query time: 3 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Thu Oct 28 13:13:05 CEST 2021
;; MSG SIZE  rcvd: 140

$ sudo systemd-resolve --flush-caches
$ sudo resolvectl flush-caches
$ ping nextcloud.homeinfo.de
$ LANG=C ping nextcloud.homeinfo.de
ping: nextcloud.homeinfo.de: Name or service not known
$ LANG=C curl https://nextcloud.homeinfo.de
curl: (6) Could not resolve host: nextcloud.homeinfo.de

How can I update my system's DNS cache to resolve for the address as provided by dig?
One possibility is to wait, but time is money...

Last edited by schard (2022-02-17 23:38:48)


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#2 2021-10-28 13:21:06

seth
Member
Registered: 2012-09-03
Posts: 60,922

Re: [NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

resolvectl query nextcloud.homeinfo.de
resolvectl status

Did you try restarting resolved?

Offline

#3 2021-10-28 17:02:42

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,152
Website

Re: [NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

Unfortunately meanwhile I could resolve the domain due to timeout. But yes, I also tried to restart systemd-resolved to no avail. I can provide the output of the status queries tomorrow, when I can set up a new testing subdomain in the office.

Last edited by schard (2021-10-28 17:02:57)


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#4 2021-10-28 17:03:35

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: [NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

schard wrote:

Unfortunately meanwhile I could resolve the domain due to timeout. But yes, I also tried to restart systemd-resolved to no avail. I can provide the output of the status queries tomorrow, when I can set up a new testing subdomain in the office.

systemctl restart nscd

Offline

#5 2021-10-28 20:18:55

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,152
Website

Re: [NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

I don't use nscd. I.e. it is disabled.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#6 2021-10-28 22:52:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,356

Re: [NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

So you're using resolved, did you set up /etc/resolv.conf for that?

Online

#7 2021-10-28 23:12:06

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,152
Website

Re: [NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

I am using systemd-resolved, yes.
And if you ask whether I symlinked /etc/resolv.conf according to the Wiki, then yes:

$ ls -l /etc/resolv.conf 
lrwxrwxrwx 1 root root 32  4. Mai 19:50 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf

Update
And there might be the issue.
It's supposed to link to /run/systemd/resolve/stub-resolv.conf, not /run/systemd/resolve/resolv.conf.
I'll provide updates tomorrow, since it's 1:17 am here now. yikes

Last edited by schard (2021-10-28 23:18:14)


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#8 2021-10-28 23:21:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,356

Re: [NOT REPRODUCIBLE] Update DNS cache - Can dig, but not ping host

Using /run/systemd/resolve/resolv.conf instead of /run/systemd/resolve/stub-resolv.conf would just bypass systemd-resolved for anything using /etc/resolv.conf. I wonder if that's what's making the difference.

Online

Board footer

Powered by FluxBB