Discussion:
[Bug-wget] strange behaviour
Darshit Shah
2018-05-11 12:50:31 UTC
Permalink
This is very strange behavior. It seems like the name resolution works only
from the second time onwards. I've never seen anything like that before.

In any case, I see that you're using a very old version of Wget. The current
version is 1.19.5. Could you please update your version of Wget and try again
to see if the problem persists?
*[~]$ wget hello google.com <http://google.com> --no-proxy -d*
DEBUG output created by Wget 1.14 on linux-gnu.
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:28:04-- http://hello/
Resolving hello (hello)... failed: Name or service not known.
wget: unable to resolve host address ‘hello’
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:28:04-- http://google.com/
Resolving google.com (google.com)... 74.125.24.102, 74.125.24.101,
74.125.24.100, ...
Caching google.com => 74.125.24.102 74.125.24.101 74.125.24.100
74.125.24.138 74.125.24.113 74.125.24.139 2404:6800:4003:c03::71
Connecting to google.com (google.com)|74.125.24.102|:80... ^C
[~]$ wget google.com --no-proxy -d
DEBUG output created by Wget 1.14 on linux-gnu.
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:28:14-- http://google.com/
Resolving google.com (google.com)... failed: Name or service not known.
wget: unable to resolve host address ‘google.com’
~]$ wget hell google.com --no-proxy -d
DEBUG output created by Wget 1.14 on linux-gnu.
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:28:21-- http://hell/
Resolving hell (hell)... failed: Name or service not known.
wget: unable to resolve host address ‘hell’
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:28:21-- http://google.com/
Resolving google.com (google.com)... 74.125.24.101, 74.125.24.100,
74.125.24.138, ...
Caching google.com => 74.125.24.101 74.125.24.100 74.125.24.138
74.125.24.113 74.125.24.139 74.125.24.102 2404:6800:4003:c03::71
Connecting to google.com (google.com)|74.125.24.101|:80... ^C
[ ~]$
Hello Team ,
My server is behind a firewall and a proxy, but when i give 2 "wget" in
command gives me a DNS resolution but not with the single wget !
*************************************************************************************************************
*************************************************************************************************************
[~]$ nslookup google.com
Name: google.com
Address: 74.125.24.102
Name: google.com
Address: 74.125.24.101
Name: google.com
Address: 74.125.24.139
Name: google.com
Address: 74.125.24.113
Name: google.com
Address: 74.125.24.138
Name: google.com
Address: 74.125.24.100
[~]$ wget google.com --no-proxy -d
DEBUG output created by Wget 1.14 on linux-gnu.
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:24:33-- http://google.com/
Resolving google.com (google.com)... failed: Name or service not known.
wget: unable to resolve host address ‘google.com’
[ ~]$ wget wget google.com --no-proxy -d
DEBUG output created by Wget 1.14 on linux-gnu.
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:24:40-- http://wget/
Resolving wget (wget)... failed: Name or service not known.
wget: unable to resolve host address ‘wget’
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:24:40-- http://google.com/
Resolving google.com (google.com)... 74.125.24.101, 74.125.24.139,
74.125.24.113, ...
Caching google.com => 74.125.24.101 74.125.24.139 74.125.24.113
74.125.24.138 74.125.24.100 74.125.24.102 2404:6800:4003:c03::71
Connecting to google.com (google.com)|74.125.24.101|:80... ^C
[ ~]$
--
Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6
Petr Pisar
2018-05-20 14:36:31 UTC
Permalink
My server is behind a firewall and a proxy, but when i give 2 "wget" in
command gives me a DNS resolution but not with the single wget !
[...]
[~]$ nslookup google.com
Name: google.com
Address: 74.125.24.102
Name: google.com
Address: 74.125.24.101
Name: google.com
Address: 74.125.24.139
Name: google.com
Address: 74.125.24.113
Name: google.com
Address: 74.125.24.138
Name: google.com
Address: 74.125.24.100
[~]$ wget google.com --no-proxy -d
DEBUG output created by Wget 1.14 on linux-gnu.
URI encoding = ‘UTF-8’
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
Converted file name 'index.html' (UTF-8) -> 'index.html' (UTF-8)
--2018-05-10 06:24:33-- http://google.com/
Resolving google.com (google.com)... failed: Name or service not known.
nslookup bypasses system domain name resolver and querries DNS servers
directly comparing to wget or most of the other programs.

Do you experience the same issue with other programs that use system
resolver? E.g. "getent host google.com"? Maybe one of your name servers
misbehaves and only the second query to the second one succeeds. Maybe your
system resolved validates DNSSEC signatures and your network or name servers
block EDNS packets. What's your system resolver (/etc/nsswitch.conf), do you
use nscd or sssd caching deamons? If you do, what does happen if you flush
their caches (e.g. nscd --invalidate hosts). Capturing and studying network
packets while experiencing the issue would also help.

-- Petr

Loading...