LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 12-04-2008, 09:24 PM   #1
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 402

Rep: Reputation: 51
Wget times out until i ping the host or click on link to file in firefox


I try to download some file with wget, but it always times out. But, if i then ping the host where file is or click on the link to this file in firefox (not doing anything in firefox after that), wget then downloads the file. Before time out wget waits very much time. This is how it looks like (i had to Ctrl+C when wget started to wait):

Code:
$ wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.0.tar.gz
--2008-12-05 04:34:52--  http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.0.tar.gz
Resolving libtorrent.rakshasa.no... 1.0.0.0
Connecting to libtorrent.rakshasa.no|1.0.0.0|:80...
$ ping libtorrent.rakshasa.no -c 1
PING libtorrent.rakshasa.no (66.220.1.220): 56 data bytes
64 bytes from 66.220.1.220: icmp_seq=0 ttl=56 time=217.885 ms
--- libtorrent.rakshasa.no ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 217.885/217.885/217.885/0.000 ms
$ wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.0.tar.gz
--2008-12-05 04:35:00--  http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.0.tar.gz
Resolving libtorrent.rakshasa.no... 66.220.1.220
Connecting to libtorrent.rakshasa.no|66.220.1.220|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 502896 (491K) [application/x-gzip]
Saving to: `rtorrent-0.8.0.tar.gz'

100%[==========...=========>] 502,896      249K/s   in 2.0s

2008-12-05 04:35:02 (249 KB/s) - `rtorrent-0.8.0.tar.gz' saved [502896/502896]
I have no firewalls, nothing like this. Some days ago everything worked perfectly, but from some time it started to work this way.
Why could this be so? How can i make wget work properly? (Of course, without having to make some script like "ping -c 1 $@; wget $@")

Last edited by 10110111; 12-07-2008 at 08:51 AM.
 
Old 12-07-2008, 07:46 AM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Works fine for me:
Code:
$ wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.0.tar.gz
--06:14:22--  http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.0.tar.gz
           => `rtorrent-0.8.0.tar.gz'
Resolving libtorrent.rakshasa.no... 66.220.1.220
Connecting to libtorrent.rakshasa.no|66.220.1.220|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 502,896 (491K) [application/x-gzip]

100%[======== ... =======>] 502,896      113.59K/s    ETA 00:00

06:14:30 (71.95 KB/s) - `rtorrent-0.8.0.tar.gz' saved [502896/502896]
What has changed, including w/ your ISP, since it worked for you?


Notice the subtle differences between our outputs, what ver. of wget are you using?
Code:
$ wget -V
GNU Wget 1.10.2

Copyright (C) 2005 Free Software Foundation, Inc.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
What about your distro, desktop, kernel, etc.?


BTW, you shouldn't use "Quote:" blocks (i.e. [QUOTE] tags) for code & command line output, that's what "Code:" blocks are for. Your links won't get abbreviated & the monospace font alignment will be preserved.

However your lines won't get folded so you should manually fold or abbreviate ones that are more than 80-90 columns -- see my line beginning "100%[=".

It would be nice, quite polite, if you would edit your post to fix these, esp. the line folding -- I can't easily read your post because it triggers horizontal scrolling in my browser.

Last edited by archtoad6; 12-07-2008 at 07:56 AM. Reason: Add edit request.
 
Old 12-07-2008, 08:46 AM   #3
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 402

Original Poster
Rep: Reputation: 51
Quote:
Works fine for me:
Yes, i know it should work. It works for me too, but only after i ping that host...

Quote:
What has changed, including w/ your ISP, since it worked for you?
I don't remember it very well, but it seems that i changed ISP just when the problems started.

Quote:
Notice the subtle differences between our outputs, what ver. of wget are you using?
I was using wget 1.10.2 when the problem started, and then tried to update to newer version, so the output is from wget-1.11.4. Anyway, updating didn't resolve the problem.

BTW, time out appears not only in wget, but also in other console programs like lynx and python easy_install, though everything is ok in firefox.

Quote:
What about your distro, desktop, kernel, etc.?
distro: LFS 6.3, desktop: KDE 3.5.9, kernel 2.6.22.5

Last edited by 10110111; 12-07-2008 at 09:12 AM.
 
Old 12-08-2008, 07:44 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Barring an LFS problem, I think your prime suspect is your new ISP. You mention problems in lynx & Python easy_install, what about w/ Konqueror, Opera, cURL, & your ftp client?

I hate to to give this advice, because I have RTF wget M, & I know what a pain that one can be -- it's my 1st nominee for the "Man Page Is Too Long" award. OTOH, since you've done LFS, the wget man page shouldn't be too difficult. So go "RTF" wget man page for how to change the user agent string, possibly your new ISP is using it to discriminate between browsing programs. It's the only explanation I can think of for some "browsers" working & some not.

HTH, & please report your results -- this is interesting & I'd like to know the answer.
 
Old 12-09-2008, 09:40 AM   #5
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 402

Original Poster
Rep: Reputation: 51
FTP client (ftp (GNU inetutils) 1.5) works normally, Konqueror also without problems. Lynx now works, too (although i didn't change anything)... But wget has the same problem. I tried 'wget -U "" prot://address/filename', 'wget -U "Firefox/2.0.0.14" ... ', it doesn't change anything, so problem is not in user agent.
 
Old 12-09-2008, 09:58 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
I think your choices are writing the script, asking tech support @ your ISP (good luck w/ that), or using something like wireshark to capture packets & compare a FF successful connection to a wget failure.
 
Old 12-09-2008, 03:38 PM   #7
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
Check your DNS settings, if you have several dns server entries make sure they're all valid functional dns servers.

Last edited by rweaver; 12-09-2008 at 03:41 PM.
 
Old 12-10-2008, 08:49 AM   #8
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 402

Original Poster
Rep: Reputation: 51
Solved

Today, my network (DNS in particular) was totally unusable... router replied to my pings, but google didn't. I tried to set ISP's DNS server address directly in resolv.conf in place of my ADSL router's address, and now the problem seems to have disappeared.
So, i think the real reason of all the troubles was not ISP, but my router.
Thank you all for your help.

Last edited by 10110111; 12-10-2008 at 08:52 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Large File via SSH/SFTP over WiFi link Always Stalls and Freezes Host Haz2a Linux - Wireless Networking 1 03-16-2007 04:35 PM
System hangs; Atheros Madwifi-ping times out every 15/16 times james 456 Linux - Networking 0 01-12-2006 07:55 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM
running wget multiple times quickk Linux - Newbie 1 09-16-2004 07:53 AM
Ping - Logging the times to a file. johnsont Programming 2 09-09-2003 02:09 PM


All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration