From: Hemanth M. C. on
Hi All,

I am facing a rather peculiar issue. I installed Debian 5.0.4 on my laptop. The basic network connectivity works fine, and the DHCP client daemon seems to have picked up the right config info from my DSL router. But, anything related to HTTP does not work - browser, WGET, etc.

This is what my output looks like:
----------------------------------------------------------------------
hchandra(a)hchandra-lap:~$ cat /etc/resolv.conf
### BEGIN INFO
#
# Modified_by: NetworkManager
# Process: /usr/bin/NetworkManager
# Process_id: 2988
#
### END INFO





nameserver 192.168.1.1
nameserver 192.168.1.1


hchandra(a)hchandra-lap:~$ ping ftp.debian.org
PING ftp.debian.org (130.89.149.226) 56(84) bytes of data.
64 bytes from ftp.debian.org (130.89.149.226): icmp_seq=1 ttl=50 time=213 ms
64 bytes from ftp.debian.org (130.89.149.226): icmp_seq=2 ttl=50 time=213 ms
64 bytes from ftp.debian.org (130.89.149.226): icmp_seq=3 ttl=50 time=212 ms
^C
--- ftp.debian.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 212.532/213.114/213.558/0.430 ms
hchandra(a)hchandra-lap:~$ ftp ftp.debian.org
Connected to ftp.debian.org.
220 ftp.debian.org FTP server
Name (ftp.debian.org:hchandra): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
hchandra(a)hchandra-lap:~$ wget http://www.debian.org
--2010-02-20 17:38:08-- http://www.debian.org/
Resolving www.debian.org... 1.0.0.0
Connecting to www.debian.org|1.0.0.0|:80... ^C
hchandra(a)hchandra-lap:~$ wget --no-dns-cache http://www.debian.org/
--2010-02-20 17:43:26-- http://www.debian.org/
Resolving www.debian.org... 1.0.0.0
Connecting to www.debian.org|1.0.0.0|:80... ^C
hchandra(a)hchandra-lap:~$

----------------------------------------------------------------------

>From this, it should be obvious that ping & ftp are able to resolve the DNS names correctly, but WGET and any browser resolve it to '1.0.0.0'.

Can anyone tell me what the problem could be? What is the difference between the way ping & ftp resolve names and the way wget and browsers do so?

Regards,
Hemanth






--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/502642.23771.qm(a)web112510.mail.gq1.yahoo.com
From: Camaleón on
On Tue, 23 Feb 2010 00:30:15 -0800, Hemanth M. C. wrote:

> I am facing a rather peculiar issue. I installed Debian 5.0.4 on my
> laptop. The basic network connectivity works fine, and the DHCP client
> daemon seems to have picked up the right config info from my DSL router.
> But, anything related to HTTP does not work - browser, WGET, etc.

Does this help?

WGET can't resolve host
http://serverfault.com/questions/76421/wget-cant-resolve-host

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.02.23.16.00.51(a)gmail.com
From: Hemanth M. C. on
Camaleón,

Thank you for replying to my mail. My replies inline...


On Tue, February 23, 2010 21:30:51 +0530, Camaleón wrote:

>
>On Tue, 23 Feb 2010 00:30:15 -0800, Hemanth M. C. wrote:
>
>> I am facing a rather peculiar issue. I installed Debian 5.0.4 on my
>> laptop. The basic network connectivity works fine, and the DHCP client
>> daemon seems to have picked up the right config info from my DSL router.
>> But, anything related to HTTP does not work - browser, WGET, etc.
>
>Does this help?
>
>WGET can’t resolve host
>http://serverfault..com/questions/76421/wget-cant-resolve-host

The solution mentioned in the link does not work for me, since my installation is a new installation - I did not touch the nsswitch.conf file. However, the answer seems to lie somewhere there. I played around with the nsswitch.conf file, but was unable to make it resolve correctly. This is the file:
--------------------------------------------------------------------------------
# /etc/nsswitch..conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file..

passwd: compat
group: compat
shadow: compat

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
--------------------------------------------------------------------------------
I learnt a lot about this file from the man pages, but was unable to figure out what mdns4 and mdns4_minimal are. I will try to play around with this for some more time, but would appreciate any input on this issue from anybody.

Meanwhile, I got some more details on the quirky behaviour:
--------------------------------------------------------------------------------
hchandra(a)hchandra-lap:~$ wget http://www.ibm.com/
--2010-02-24 08:48:43-- http://www.ibm.com/
Resolving www.ibm.com... 1.0.0.0
Connecting to www.ibm.com|1.0.0.0|:80... ^C
hchandra(a)hchandra-lap:~$ getent hosts www.ibm.com
1.0.0.0 www.ibm.com
hchandra(a)hchandra-lap:~$ ping www.ibm.com
PING www.ibm.com.cs186.net (129.42.56.216) 56(84) bytes of data.
^C
--- www.ibm.com.cs186.net ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1013ms

hchandra(a)hchandra-lap:~$ getent hosts www.ibm.com
129.42.56.216 www.ibm.com
hchandra(a)hchandra-lap:~$ wget http://www.ibm.com/
--2010-02-24 08:49:19-- http://www.ibm.com/
Resolving www.ibm.com... 129.42.56.216
Connecting to www.ibm.com|129.42.56.216|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.ibm.com/in/ [following]
--2010-02-24 08:49:20-- http://www.ibm.com/in/
Reusing existing connection to www.ibm.com:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.ibm.com/in/en/ [following]
--2010-02-24 08:49:20-- http://www.ibm.com/in/en/
Reusing existing connection to www.ibm.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 31696 (31K) [text/html]
Saving to: `index.html.2'

100%[======================================>] 31,696 46.1K/s in 0.7s

2010-02-24 08:49:22 (46.1 KB/s) - `index.html.2' saved [31696/31696]
--------------------------------------------------------------------------------
In short, pinging a certain destination helps the getent and wget commands resolve the name correctly. Why is this so? Are the DNS lookups cached somewhere? Does this cache have to be cleared?

Thank you,

Regards,
Hemanth





--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/71826.14560.qm(a)web112514.mail.gq1.yahoo.com
From: Celejar on
On Tue, 23 Feb 2010 19:58:07 -0800 (PST)
"Hemanth M. C." <mchemanth(a)yahoo.com> wrote:

....

> In short, pinging a certain destination helps the getent and wget commands resolve the name correctly. Why is this so? Are the DNS lookups cached somewhere? Does this cache have to be cleared?

I don't know the solution to your overall problem, but IIUC, DNS
results are not cached by a basic linux system, unless you're running a
caching DNS application, such as dnsmasq. To see if caching is
happening, one runs 'dig some_site' twice in a row. If caching is
happening, the second "Query time:" should be 0, while the first will
be some number of milliseconds (unless, of course, the domain is already
in the cache). Without caching, all queries should have a non-zero
query time. Of course, there could be caching taking place somewhere
upstream of your box.

Celejar
--
foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/20100223234011.54301823.celejar(a)gmail.com
From: Camaleón on
On Tue, 23 Feb 2010 19:58:07 -0800, Hemanth M. C. wrote:

> On Tue, February 23, 2010 21:30:51 +0530, Camaleón wrote:
>
>
>>Does this help?
>>
>>WGET can't resolve host
>>http://serverfault.com/questions/76421/wget-cant-resolve-host
>
> The solution mentioned in the link does not work for me, since my
> installation is a new installation - I did not touch the nsswitch.conf
> file. However, the answer seems to lie somewhere there. I played around
> with the nsswitch.conf file, but was unable to make it resolve
> correctly. This is the file:

(...)

--------------------------------------------------------------------------------
> # /etc/nsswitch.conf
>
> hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
--------------------------------------------------------------------------------
> I learnt a lot about this file from the man pages, but was unable to
> figure out what mdns4 and mdns4_minimal are. I will try to play around
> with this for some more time, but would appreciate any input on this
> issue from anybody.

In fact, it seems those values are the cause of some resolution slowness:

***
mdns listed in nsswitch.conf causes excessive time for dns lookups
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/94940
***

You can try the suggested steps, just to check if the situation improves.

(...)

> In short, pinging a certain destination helps the getent and wget
> commands resolve the name correctly. Why is this so? Are the DNS lookups
> cached somewhere? Does this cache have to be cleared?

As you are using the router's DNS facility, is up to the device
performing such operation. Another thing you can try is by using your
ISP's own DNS servers, instead the router's ones and see if you get
different results.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.02.24.08.29.48(a)gmail.com
 |  Next  |  Last
Pages: 1 2
Prev: Squeeze Frozen
Next: Gridengine installation