[Bioperl-l] Problem with : EUtilities - Proxy
cjfields at uiuc.edu
Wed Dec 20 13:28:09 EST 2006
> First, I got a $http_proxy env. variable automatically
> defined by the BioPerl installation (I don't define and
> export it in my .bash_profile).
> So when I'm logging in, $http_proxy=http://ip_adress:port/
BioPerl can't permanently set any env. variables out of the box since that
would mean modifying your local .bash_profile or the system profile. If
you're a user on a system where you're not the sysadmin, then it's more
likely the sysadmin has set up user accounts with an already-defined
$http_proxy variable in the system .bash_profile (which is passed on to all
The problem I can see (going by what you have above) is there is no
username/password defined, only the address (IP:Port). I am assuming LWP is
expecting some form of authentication when a proxy is env. defined w/o
username/password included. If so, you'll have to supply those yourself,
either by redefining $http_proxy to include it in your local .bash_profile,
by using $agent->proxy() for including all proxy information, or by using
$agent->authentication() so that a proxy can authorize any outgoing/incoming
requests. The first may be preferrable if you are able to do so since you
wouldn't have to authenticate every agent.
Note that this would also explain why you had an LWP problem with an
undefined array ref: the LWP agent is likely expecting some form of
authentication, probably in the form [username, password], if a proxy env.
variable is found.
> Next step : two solutions :
> 1) defining an $no_proxy env.variable in my .bash_profile.
> It can be set to 'whatever'.
> 2) If I do not define '$no_proxy'; to make it work, I must call the
> no_proxy() method on each Bio::DB::EUtilities object I create
> before I can call the get_response() method on it.
> (The bug is in the 'get_response' call)
If you mean when the request is calling proxy_authorization_basic(), that's
not a bug. If we didn't authorize then it likely wouldn't work for properly
set up proxies (Torsten's worked). Note that it's supposed to be passing a
username/password from $self->authentication().
The fact that you can set $no_proxy to anything suggests there is no proxy
> And finally without 1) or 2) it doesn't work.
We can't guarantee that defining no_proxy will always work on your system,
either. It's possible a proxy was added systemwide but a firewall hasn't
been put in place yet; once it goes up and all requests need to be
authorized, then you'll run into problems again. Conversely, maybe this was
defined at some point systemwide in the .bash_profile but wasn't removed.
The only one who would know is the sysadmin.
If you aren't the sysadmin, you can contact them to find out about how to
properly set up your proxy, or whether it is even necessary (maybe they
neglected to remove the proxy definition from the system .bash_profile).
More information about the Bioperl-l