From: "Zachary P. Landau" Date: 2004-06-09T21:56:28+09:00 Subject: Weird DNS problem with net/http --tEFtbjk+mNEviIIX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I'm running into a very strange problem with net/http. Or I should say, someone using my software is. My program downloads information from webpages using net/http. The person running into the problem is able to get information from most pages. One of those places is 'allmusic.com'. But when the program tries to download from 'image.allmusic.com', net/http always times out. He investigated further and found that it was failing on the DNS lookup. But if he runs nslookup on image.allmusic.com from the same machine, he gets the correct response. =20 I am completely at a loss as to why net/http would be able to connect to every site except this one. It can even connect to the parent domain, but not the subdomain. Normally I would think this would be a problem with the person's machine, but he can connect to image.allmusic.com normally, just not through net/http. Here is the script I had him test with: require 'net/http' response =3D nil Net::HTTP.start("image.allmusic.com") do |http| response =3D http.get('/00/amg/pic200_web/drp000/p012/p01265m82m9.jpg') end if response.body.nil? puts "no " else puts "data received (saved as test.img)" File.open('test.img', 'w') { |f| f.write(response.body) } end And here is the output he gets: >ruby -w test_images2.rb /usr/local/lib/ruby/1.8/timeout.rb:42:in `new': execution expired (Timeout::Error) from /usr/local/lib/ruby/1.8/net/protocol.rb:83:in `connect' from /usr/local/lib/ruby/1.8/net/protocol.rb:82:in `timeout' from /usr/local/lib/ruby/1.8/timeout.rb:55:in `timeout' from /usr/local/lib/ruby/1.8/net/protocol.rb:82:in `connect' from /usr/local/lib/ruby/1.8/net/protocol.rb:64:in `initialize' from /usr/local/lib/ruby/1.8/net/http.rb:430:in `open' from /usr/local/lib/ruby/1.8/net/http.rb:430:in `do_start' from /usr/local/lib/ruby/1.8/net/http.rb:419:in `start' from /usr/local/lib/ruby/1.8/net/http.rb:324:in `start' =20 Here's the information he gave me which may or may not be relevant: ruby 1.8.1 (2003-12-25) [i686-linux] Glibc 2.1.3 Linux kernel 2.6.5 No distribution (built machine from source) I realize this may be difficult for people to help with, since it will probably be hard to reproduce, but if you have any ideas, let me know. -- Zachary P. Landau GPG: gpg --recv-key 0x24E5AD99 | http://kapheine.hypa.net/kapheine.asc --tEFtbjk+mNEviIIX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAxwjaCwWyMCTlrZkRAr88AJ445PA8KtDKjREzuBGZG3ncafZqyACdG+KJ zaYYLFpv3JMCxf1Rcxm8N54= =8D+v -----END PGP SIGNATURE----- --tEFtbjk+mNEviIIX--