[ensembl-dev] Proxying GeneTree

Dan Sheppard ds23 at sanger.ac.uk
Wed Dec 19 10:37:14 GMT 2012


Hi Ken,

It's quite hard to tell with a setup with so many components that we 
can't directly see, but my first two guesses would be that External URL 
/ Real URL are not correct (displayed on startup to the console) 
(ENSEMBL_BASEURL, ENSEMBL_SERVER etc) or that the proxy is stripping the 
"referer" line (which is used by the AJAX request to localise the 
context where it is called).[1]

Probably the thing to do if you get stuck is to somehow sniff the 
proxy-passed request and see if it's what you would expect from a 
Firebug sniffed version of doing it direct to 8887 via a browser (eg 
same parameters, URL, etc).

It's probably worth double checking that the requests for 
/Multi/Component/GeneTree/Web/ComparaTree are being proxy-passed in 
their entirety as well, (eg by the access log on the EnsEMBL server) as 
you'd also get a response like this if the proxy is accidentally 
mangling or truncating those URLs.

Maybe someone else will have an idea?

Dan.

   [1] Getting the URLs in the config correct is important because they 
are used to interpret the Referer line (there's a complexity for EnsEMBL 
sites referring to each other, which they do, which makes all this 
deeply painful in the code).

On 18/12/12 21:57, Youens-Clark, Ken wrote:
> At Gramene, we are having a problem with using a ProxyPass directive to view our gene trees.  We have our own Apache server in front of our Ensembl server, and I am sending "/Multi/GeneTree(.*)" => "http://brie.cshl.org:8887/Multi/GeneTree".
>
> I'm afraid you won't be able to view the 8887 server because of our firewall, but it works just fine.  However, this URL:
>
> 	http://dev.gramene.org/Multi/GeneTree?gt=EGGT00050000018973
>
> Fails with the error:
>
> 	Sorry, the page request "/Multi/Component/GeneTree/Web/ComparaTree?gt=EGGT00050000018973;time=1355866894798.798" failed to load.
>
> I've been hacking on the "EnsEMBL::Web::Controller" module to see if I can figure anything out.  What I notice is that there are two requests made for the GeneTree, once for the page and another for the Ajax call for the tree itself (?).  When it works (via 8887), I see this in the logs:
>
>> page_type (Dynamic) hub (EnsEMBL::Web::Hub) type (GeneTree)
>> hub type(GeneTree)
>> module_name = EnsEMBL::Web::Configuration::GeneTree
>> configuration=EnsEMBL::Web::Configuration::GeneTree
>> error ()
>> config = (EnsEMBL::Web::Configuration::GeneTree)
>>
>> page_type (Component) hub (EnsEMBL::Web::Hub) type (GeneTree)
>> hub type(GeneTree)
>> module_name = EnsEMBL::Web::Configuration::GeneTree
>> configuration=EnsEMBL::Web::Configuration::GeneTree
>> error ()
>> config = (EnsEMBL::Web::Configuration::GeneTree)
>
> But when it fails, I see this:
>
>> page_type (Dynamic) hub (EnsEMBL::Web::Hub) type (GeneTree)
>> hub type(GeneTree)
>> module_name = EnsEMBL::Web::Configuration::GeneTree
>> configuration=EnsEMBL::Web::Configuration::GeneTree
>> error ()
>> config = (EnsEMBL::Web::Configuration::GeneTree)
>>
>> page_type (Component) hub (EnsEMBL::Web::Hub) type ()
>> config = ()
>> [Tue Dec 18 16:52:40 2012] [error] [client 143.48.220.82] Can't call method "get_valid_action" on an undefined value at /usr/local/ensembl-live/modules/EnsEMBL/Web/Controller.pm line 201.\n, referer: http://dev.gramene.org/Multi/GeneTree?gt=EGGT00050000018973
>
> On the 2nd request (the 2nd occurrence of "page_type"), there's no hub type, no config, etc., so the "get_valid_action" method fails here:
>
> 188 sub configure {
> 189   my $self          = shift;
> 190   my $hub           = $self->hub;
> 191   my $configuration = $self->configuration;
> 192   my $node          = $configuration->get_node($configuration->get_valid_action($self->action, $self->function));
>
> Any suggestions on how to fix this?
>




More information about the Dev mailing list