Ruediger Meier wrote:
On Friday 12 August 2016, Per Jessen wrote:
I have a cron job running every 20 minutes monitoring a temperature sensor for minor changes in trend up/down. This has been running for a few months.
Today at 1521 I got a warning that the trend dad changed to slightly upward. The next one failed on a DNS issue.
The puzzle:
wget -nd http://office20.local.net:4444/--slope--/1.2.3.4/0 --2016-08-12 20:38:24-- http://office20.local.net:4444/--slope--/1.2.3.4/0 Resolving office20.local.net (office20.local.net)... failed: Name or service not known. wget: unable to resolve host address ‘office20.local.net’
So clearly "office20.local.net" does not resolve. Except:
host office20.local.net
office20.local.net has address 192.168.3.20
ping office20.local.net
PING office20.local.net (192.168.3.20) 56(84) bytes of data. 64 bytes from office20.local.net (192.168.3.20): icmp_seq=1 ttl=64 time=0.029 ms 64 bytes from office20.local.net (192.168.3.20): icmp_seq=2 ttl=64 time=0.040 ms
dig office20.local.net a
; <<>> DiG 9.9.4-rpz2.13269.14-P2 <<>> office20.local.net a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30802 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 3
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;office20.local.net. IN A
;; ANSWER SECTION: office20.local.net. 86400 IN A 192.168.3.20
So clearly "office20.local.net" _does_ resolve. Except in wget.
No changes were applied to this system for at least a month, likely longer.
Why can't wget resolve the address when others have no problem?
office20.local.net
Do you really own 'local.net'?
Hehe, nono. That one is only used locally on 192.168.0.0/16.
Some programs may do the lookup manually without glibc, ignoring /etc/resolv.conf. I know that postfix does that by default.
Are you sure? At least it couldn't do it without /etc/resolv.conf, and I'm pretty certain my installations also use /etc/hosts (which is handy for overrides).
You should better not use domains which you don't own! Or at least a top level domain which does not exist (hard to find one nowadays.)
I agree completely, but 'local.net' has been used internally for maybe 15 years, and changing it to something truly local would mean a lot of checking and double-checking.
Could be that you are using another unwanted nameserver which you have not configured to serve your own local.net. (autoconfig/dhcp),
Check, /etc/resolv.conf is fine.
Some other possibilites: - nscd issues?
I did think of that one, and did "nscd -i hosts" - however, ping will also use nscd, and that works.
- Maybe wget handles ipv4/v6 stupidly? Try wget -4.
Ah, forgot about that one. Yes! that was it. What remains of the puzzle - why did this suddenly start yesterday at 15:21 after running fine since April? I swear that machine was not touched. I don't really want to add that '-4' as it shouldn't be necessary. Anyway, thanks for mentioning that. I'll have to look a little closer at wget. -- Per Jessen, Zürich (17.1°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org