[Bioperl-l] 500 Can't connect to www.ncbi.nlm.nih.gov:80 (Bad hostname)

Fields, Christopher J cjfields at illinois.edu
Mon Aug 11 15:17:09 UTC 2014


According to your script you aren’t using BioPerl but straight LWP::Simple. If you are retrieving data using NCBI eutils I suggest reading up on their documentation (which includes simple scripts to get raw data):

http://www.ncbi.nlm.nih.gov/books/NBK25500/

NCBI also allows queries via a REST API but very little of it is documented (BLAST and PubChem have some info).  I don’t suggest using that route unless you can find concrete docs describing how to query properly for your database of interest.

chris

On Aug 11, 2014, at 8:31 AM, RB <sosippus at gmail.com> wrote:

> Hello!
> 
> I'm trying to connect to a NCBI page and retrieve some information.
> Basically I want to retrieve what is under "Representative" in 
> http://www.ncbi.nlm.nih.gov/genome/?term=Xylella_fastidiosa
> <http://www.ncbi.nlm.nih.gov/genome/?term=Xylella_fastidiosa>  . For this
> I'm trying to use LWP::Simple or LWP::UserAgent, but in no way am I able to
> retrieve the HTML.
> 
> Here is my code:
> -------------------------------------------------------
> #!/usr/local/bin/perl
> use strict;
> use warnings;
> use autodie;
> use Data::Dump;
> use LWP::Simple qw(get);
> 
> my
> $content=get('http://www.ncbi.nlm.nih.gov/genome/?term=Xylella_fastidiosa');
> 
> dd $content;
> -------------------------------------------------------
> 
> But I get an undef from this code. I read through  this post
> <http://bioperl.996286.n3.nabble.com/Bio-Tools-Run-RemoteBlast-error-500-Can-t-connect-to-www-ncbi-nlm-nih-gov-80-td10210.html>  
> and here is the result of two different pings:
> -------------------------------------------------------
> Pinging www.wip.ncbi.nlm.nih.gov [130.14.29.110] with 32 bytes of data:
> Request timed out.
> Request timed out.
> Request timed out.
> Request timed out.
> 
> Ping statistics for 130.14.29.110:
>    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
> 
> -------------------------------------------------------
> Pinging www.google.com [173.194.112.240] with 32 bytes of data:
> Reply from 173.194.112.240: bytes=32 time=46ms TTL=53
> Reply from 173.194.112.240: bytes=32 time=46ms TTL=52
> Reply from 173.194.112.240: bytes=32 time=45ms TTL=53
> Reply from 173.194.112.240: bytes=32 time=45ms TTL=53
> 
> Ping statistics for 173.194.112.240:
>    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
> Approximate round trip times in milli-seconds:
>    Minimum = 45ms, Maximum = 46ms, Average = 45ms
> -------------------------------------------------------
> 
> So I guess this means there is something wrong on my side? What am I doing
> wrong? Thanks for all the help
> 
> 
> 
> 
> --
> View this message in context: http://bioperl.996286.n3.nabble.com/500-Can-t-connect-to-www-ncbi-nlm-nih-gov-80-Bad-hostname-tp17624.html
> Sent from the Bioperl-L mailing list archive at Nabble.com.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list