develooper Front page | perl.libwww | Postings from July 2015

Re: DNS lookup failures: (Bad hostname)

Thread Previous
From:
Bill Moseley
Date:
July 28, 2015 06:22
Subject:
Re: DNS lookup failures: (Bad hostname)
Message ID:
CAKhN_m7BJyx31G3nAebxUVg72i0fYV2=-PwDtZtWb5WvXm1iwA@mail.gmail.com
On Fri, Jan 9, 2015 at 7:27 AM, Bill Moseley <moseley@hank.org> wrote:

> On our production machines running LWP 6.04 and LWP::Protocol::https 6.03
> I see a few times a day messages like:
>
> 500 Can't connect to dl.dropboxusercontent.com:443 (Bad hostname)
>
>
> Yet, when I try fetching using lwp-request on the same machine the lookup
> works fine and I can fetch the content.
>
> I suspect an issue with our own DNS, but I'm only aware of these lookup
> failures reported by LWP (we have lots of other non-Perl code that is doing
> lookups all day long).
>
> Anyway, I just wanted to check here to see if anyone else has also seen
> hostname lookup failures for valid hostnames that might indicate a problem
> in the Perl libraries.
>
>
> I'll look at adding more debugging -- like running dig or hostname on LWP
> failures of this type and see if those also fail at the same time.    Any
> other ideas for debugging?
>


Would a timeout indicate that "Bad hostname" error?   Doesn't seem likely.

I continue to see these for the above and other hosts.  For example a few
from today for Paypal:

Can't connect to www.paypal.com:443 (Bad hostname)

LWP::Protocol::https::Socket: Bad hostname 'www.paypal.com' at
/usr/share/perl5/LWP/Protocol/http.pm line 51.


Whenever I ssh into the machine and do a lookup it works fine.   So, any
ideas what might be different?

$ time host www.paypal.com
www.paypal.com is an alias for www.paypal.com.akadns.net.
www.paypal.com.akadns.net is an alias for ppdirect.paypal.com.akadns.net.
ppdirect.paypal.com.akadns.net is an alias for wlb.paypal.com.akadns.net.
wlb.paypal.com.akadns.net is an alias for www.paypal.com.edgekey.net.
www.paypal.com.edgekey.net is an alias for e6166.a.akamaiedge.net.
e6166.a.akamaiedge.net has address 23.59.194.234

real 0m0.003s
user 0m0.000s
sys 0m0.002s




-- 
Bill Moseley
moseley@hank.org

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About