Re: DNS lookup failures: (Bad hostname)
Bill Moseley <[email protected]> Mon, 27 Jul 2015 23:21:29 -0700
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <CAKhN_m7BJyx31G3nAebxUVg72i0fYV2=-PwDtZtWb5WvXm1iwA@mail.gmail.com> |
--001a113ce924ca965a051be97c7a Content-Type: text/plain; charset=UTF-8 On Fri, Jan 9, 2015 at 7:27 AM, Bill Moseley <[email protected]> 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 [email protected] --001a113ce924ca965a051be97c7a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo= te">On Fri, Jan 9, 2015 at 7:27 AM, Bill Moseley <span dir=3D"ltr"><<a h= ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>><= /span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8= ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">On our pro= duction machines running LWP 6.04 and=C2=A0LWP::Protocol::https 6.03 I see = a few times a day messages like:<div><br></div><div><blockquote style=3D"ma= rgin:0px 0px 0px 40px;border:none;padding:0px"><div>500 Can't connect t= o <a href=3D"http://dl.dropboxusercontent.com:443" target=3D"_blank">dl.dro= pboxusercontent.com:443</a> (Bad hostname)<br clear=3D"all"></div></blockqu= ote><div><br></div>Yet, when I try fetching using lwp-request on the same m= achine the lookup works fine and I can fetch the content.</div><div><br></d= iv><div>I suspect an issue with our own DNS, but I'm only aware of thes= e lookup failures reported by LWP (we have lots of other non-Perl code that= is doing lookups all day long).</div><div><br></div><div>Anyway, I just wa= nted to check here to see if anyone else has also seen hostname lookup fail= ures for valid hostnames that might indicate a problem in the Perl librarie= s.</div><div><br></div><div><br></div><div>I'll look at adding more deb= ugging -- like running dig or hostname on LWP failures of this type and see= if those also fail at the same time. =C2=A0 =C2=A0Any other ideas for debu= gging?</div></div></blockquote><div><br></div><div><br></div><div>Would a t= imeout indicate that "Bad hostname" error? =C2=A0 Doesn't see= m likely.</div><div><br></div><div>I continue to see these for the above an= d other hosts.=C2=A0 For example a few from today for Paypal:</div><div><br= ></div></div></div><blockquote style=3D"margin:0 0 0 40px;border:none;paddi= ng:0px"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><div><span st= yle=3D"font-size:12.8000001907349px">Can't connect to=C2=A0</span><a hr= ef=3D"http://www.paypal.com:443/" rel=3D"noreferrer" target=3D"_blank" styl= e=3D"font-size:12.8000001907349px">www.paypal.com:443</a><span style=3D"fon= t-size:12.8000001907349px">=C2=A0(Bad hostname)</span></div></div></div><di= v class=3D"gmail_extra"><div class=3D"gmail_quote"><div><br style=3D"font-s= ize:12.8000001907349px"></div></div></div><div class=3D"gmail_extra"><div c= lass=3D"gmail_quote"><div><span style=3D"font-size:12.8000001907349px">LWP:= :Protocol::https::Socket: Bad hostname '</span><a href=3D"http://www.pa= ypal.com/" rel=3D"noreferrer" target=3D"_blank" style=3D"font-size:12.80000= 01907349px">www.paypal.com</a><span style=3D"font-size:12.8000001907349px">= ' at /usr/share/perl5/LWP/Protocol/</span><a href=3D"http://http.pm/" r= el=3D"noreferrer" target=3D"_blank" style=3D"font-size:12.8000001907349px">= http.pm</a><span style=3D"font-size:12.8000001907349px">=C2=A0line 51.</spa= n></div></div></div></blockquote><div><br></div><div><div>Whenever I ssh in= to the machine and do a lookup it works fine. =C2=A0 So, any ideas what mig= ht be different?</div><div><br></div></div><blockquote style=3D"margin:0 0 = 0 40px;border:none;padding:0px"><div><div>$ time host <a href=3D"http://www= .paypal.com">www.paypal.com</a></div></div><div><div><a href=3D"http://www.= paypal.com">www.paypal.com</a> is an alias for <a href=3D"http://www.paypal= .com.akadns.net">www.paypal.com.akadns.net</a>.</div></div><div><div><a hre= f=3D"http://www.paypal.com.akadns.net">www.paypal.com.akadns.net</a> is an = alias for <a href=3D"http://ppdirect.paypal.com.akadns.net">ppdirect.paypal= .com.akadns.net</a>.</div></div><div><div><a href=3D"http://ppdirect.paypal= .com.akadns.net">ppdirect.paypal.com.akadns.net</a> is an alias for <a href= =3D"http://wlb.paypal.com.akadns.net">wlb.paypal.com.akadns.net</a>.</div><= /div><div><div><a href=3D"http://wlb.paypal.com.akadns.net">wlb.paypal.com.= akadns.net</a> is an alias for <a href=3D"http://www.paypal.com.edgekey.net= ">www.paypal.com.edgekey.net</a>.</div></div><div><div><a href=3D"http://ww= w.paypal.com.edgekey.net">www.paypal.com.edgekey.net</a> is an alias for <a= href=3D"http://e6166.a.akamaiedge.net">e6166.a.akamaiedge.net</a>.</div></= div><div><div><a href=3D"http://e6166.a.akamaiedge.net">e6166.a.akamaiedge.= net</a> has address 23.59.194.234</div></div><div><br></div><div><div>real<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>0m0.003s</d= iv></div><div><div>user<span class=3D"Apple-tab-span" style=3D"white-space:= pre"> </span>0m0.000s</div></div><div><div>sys<span class=3D"Apple-tab-span= " style=3D"white-space:pre"> </span>0m0.002s</div></div></blockquote><br><b= lockquote style=3D"margin:0 0 0 40px;border:none;padding:0px"><div class=3D= "gmail_extra"><div class=3D"gmail_quote"><div><br></div></div></div></block= quote><div class=3D"gmail_extra"><div><br></div>-- <br><div class=3D"gmail_= signature">Bill Moseley<br><a href=3D"mailto:[email protected]" target=3D"_b= lank">[email protected]</a></div> </div></div> --001a113ce924ca965a051be97c7a--