wget doesn't redo DNS lookup
Bug #84104 reported by
nrdb
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wget |
Unknown
|
Unknown
|
|||
wget (Ubuntu) |
Fix Released
|
Wishlist
|
Micah Cowan |
Bug Description
Version GNU Wget 1.10.2
When downloading a big file from a website that is using a dynamic DNS service, if the IP changes, the connection is broken to the server. When trying to reconnect wget isn't doing a DNS lookup, and keeps trying the old IP address.
1) start a big download from a site using a dynamic DNS
2) cause the sites IP address to change (i.e. reset ADSL modem)
Wget will try to reconnect
3) note that "$ dig <host name>" reports new IP address of host
4) note that wget is still trying to contact old IP address
I interpret the --no-dns-cache man documentation to suggest this behavior is intentional. Here's the relevant excerpt.
--no-dns-cache
Turn off caching of DNS lookups. Normally, Wget remembers the IP addresses it
looked up from DNS so it doesn’t have to repeatedly contact the DNS server for
the same (typically small) set of hosts it retrieves from. This cache exists
in memory only; a new Wget run will contact DNS again.
However, it has been reported that in some situations it is not desirable to
cache host names, even for the duration of a short-running application like
Wget. With this option Wget issues a new DNS lookup (more precisely, a new
call to "gethostbyname" or "getaddrinfo") each time it makes a new connection.
[snip]