I know there's lots of posts out on the net about similar issues, I've tried to follow the various bits of advice I picked up while searching (gai.conf/nsswitch.conf/hosts etc).
I've recently upgraded from 1.8 to 2.2 and I've just noticed an issue with name resolution for certain programs under squeeze. I think it must be related to some software preferring IPv6 over IPv4. I can ping, nslookup, dig and host any domain name so my DNS seems to be working. However when I try to use wget or elinks I get:
however if I host or nslookup its fine:
So far I've checked my nsswitch.conf is:
my gai.conf is preferring IPv4 over IPv6
wget will work with the -4 switch, however if I try to force this with edits to the wgetrc it doesn't pick those up.
elinks doesn't seem to work no matter what. All I ever get is "unable to retrieve http://yahoo.com/: Host not found" errors. Even if I try to force IPv4 with the http4:// prefix in URLs. I've added the options set connection.try_ipv4 = 1 and set connection.try_ipv6 = 0 in the elinks.conf with no effect.
Has anyone else had similar problems with IPv4/IPv6 and name resolution with wget and elinks? Do you always have to use the -4 switch in wget or can you configure it to remember it?
I've recently upgraded from 1.8 to 2.2 and I've just noticed an issue with name resolution for certain programs under squeeze. I think it must be related to some software preferring IPv6 over IPv4. I can ping, nslookup, dig and host any domain name so my DNS seems to be working. However when I try to use wget or elinks I get:
Code:
wget yahoo.com--2013-01-11 10:22:11-- http://yahoo.com/
Resolving yahoo.com... failed: Name or service not known.
wget: unable to resolve host address `yahoo.com'
Code:
host yahoo.comyahoo.com has address 72.30.38.140
yahoo.com has address 98.139.183.24
yahoo.com has address 98.138.253.109
yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.
Code:
nslookup yahoo.comServer: 192.168.0.12
Address: 192.168.0.12#53
Non-authoritative answer:
Name: yahoo.com
Address: 98.139.183.24
Name: yahoo.com
Address: 98.138.253.109
Name: yahoo.com
Address: 72.30.38.140
Code:
hosts: files dns
Code:
precedence ::ffff:0:0/96 100
Code:
wget -4 yahoo.com--2013-01-11 10:29:58-- http://yahoo.com/
Resolving yahoo.com... 72.30.38.140, 98.139.183.24, 98.138.253.109
Connecting to yahoo.com|72.30.38.140|:80... connected.
HTTP request sent, awaiting response... 301 Redirect
Location: http://www.yahoo.com/ [following]
--2013-01-11 10:29:58-- http://www.yahoo.com/
Resolving www.yahoo.com... 203.84.216.121
Connecting to www.yahoo.com|203.84.216.121|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://au.yahoo.com/?p=us [following]
--2013-01-11 10:29:59-- http://au.yahoo.com/?p=us
Resolving au.yahoo.com... 203.84.217.47
Connecting to au.yahoo.com|203.84.217.47|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Has anyone else had similar problems with IPv4/IPv6 and name resolution with wget and elinks? Do you always have to use the -4 switch in wget or can you configure it to remember it?
Code:
# pveversion -vpve-manager: 2.2-32 (pve-manager/2.2/3089a616)
running kernel: 2.6.32-17-pve
proxmox-ve-2.6.32: 2.2-83
pve-kernel-2.6.32-16-pve: 2.6.32-82
pve-kernel-2.6.32-17-pve: 2.6.32-83
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.4-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.93-2
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.9-1
pve-cluster: 1.0-34
qemu-server: 2.0-71
pve-firmware: 1.0-21
libpve-common-perl: 1.0-41
libpve-access-control: 1.0-25
libpve-storage-perl: 2.0-36
vncterm: 1.0-3
vzctl: 4.0-1pve2
vzprocps: 2.0.11-2
vzquota: 3.1-1
pve-qemu-kvm: 1.3-10
ksm-control-daemon: 1.1-1
Last edited: