Hi again,

> So, does anyone have any thoughts on where this reference to localhost
> could be creeping in? Is the "baseURL" taken from config somewhere
> (where?), or assumed from the URL used to access the OAI interface (which
> Apache may be mangling)?

Just for the record/mail archives - I looked into this in a bit more depth, and 
it looked to me from examining the code in DSpaceIdentify.java that the OAI 
baseURL is indeed determined by picking apart the request URL rather than 
pulling it from config:

    public String getBaseUrl()
    {
        if (_baseUrl == null)
        {
            _baseUrl = _request.getRequestURL().toString()
                    .replace(_request.getPathInfo(), "");
        }
        return _baseUrl + _request.getPathInfo();
    }

- so if the hostname of the request URL that was being picked apart was 
"localhost:8080",  this did point to an issue with the request that Apache was 
passing on to Tomcat . . .

Once I'd convinced myself of that fact and conveyed all that to my sys admin 
colleague, he hacked about with the Apache and connector configurations (we're 
using mod_proxy I believe) and we finally got it working, so the OAI base URL 
that appears in the Identify response for our repository is now correct :-).

Cheers,

Mike

Michael White 
eLearning Liaison and Development (eLD)
Information Services
S8, Library
University of Stirling 
Stirling SCOTLAND 
FK9 4LA 
Email: michael.wh...@stir.ac.uk 
Tel: +44 (0) 1786 466877 
Fax: +44 (0) 1786 466880
http://www.stir.ac.uk/is/staff/about/teams/aldt/#eld


> -----Original Message-----
> From: Michael White
> Sent: 02 September 2014 15:14
> To: dspace-tech@lists.sourceforge.net
> Subject: OAI baseURL "incorrect" . . .
> 
> Hi,
> 
> I was just checking the OAI-PMH output of my new DSpace v4.1 PROD system
> against the OAI-PMH validator and was surprised to find the validation had
> failed due to a "baseURL mismatch", even though it had all been lovely when I
> tested it previously on my DEV system.
> 
> [FAIL] baseURL supplied 'http://dspace.stir.ac.uk/oai/request' does not match
> the baseURL in the Identify response 'http://localhost:8080/oai/request'.
> 
> - and they are quite right (obviously!) - when accessing
> http://dspace.stir.ac.uk/oai/request?verb=Identify, I see :
> 
>     <request verb="Identify">http://localhost:8080/oai/request</request>
>     <Identify>
>         <repositoryName>STORRE</repositoryName>
>         <baseURL>http://localhost:8080/oai/request</baseURL>
> ...
> 
> But this all looks OK in my DEV system
> (http://dspace4dev.stir.ac.uk:8080/oai/request?verb=Identify):
> 
>     <request
> verb="Identify">http://dspace4dev.stir.ac.uk:8080/oai/request</request>
>     <Identify>
>         <repositoryName>STORRE (v4 DEV)</repositoryName>
>         <baseURL>http://dspace4dev.stir.ac.uk:8080/oai/request</baseURL>
> 
> I've checked through the various config files, and I can't see any difference
> (or any unexpected references to localhost) - the main difference between
> the systems is that I'm going straight to Tomcat on port 8080 in my DEV
> environment and my sys admin colleague has stuck Apache in front of Tomcat
> for our PROD system - I'll also add that, in order to validate our DEV system,
> my sys admin colleague installed the reverse proxy "pound" so that we could
> make the DEV system visible from off campus on port 80, and the OAI-PMH
> output of my DEV system also validated correctly through that route.
> 
> I've tried clearing the OAI cache and rebuilding the index, but no joy so far 
> . . .
> 
> I also did a search for "localhost" in all the config files to see if I could 
> see
> where this might be creeping in, but, again, no joy . . .
> 
> So, does anyone have any thoughts on where this reference to localhost
> could be creeping in? Is the "baseURL" taken from config somewhere
> (where?), or assumed from the URL used to access the OAI interface (which
> Apache may be mangling)? Any suggestions of anything else to
> change/investigate?
> 
> Given this works OK in DEV and the configs appear to be the same (or
> equivalent) in all the key places (as far as I can tell), I'm wondering if 
> Apache is
> to blame for this? But I'd obviously like to eliminate DSpace config as a 
> suspect
> before I go back to my sys admin colleague . . .
> 
> Any thoughts, insights or pointers would be welcome :-)
> 
> Cheers,
> 
> Mike
> 
> Michael White
> eLearning Liaison and Development (eLD)
> Information Services
> S8, Library
> University of Stirling
> Stirling SCOTLAND
> FK9 4LA
> Email: michael.wh...@stir.ac.uk
> Tel: +44 (0) 1786 466877
> Fax: +44 (0) 1786 466880
> http://www.stir.ac.uk/is/staff/about/teams/aldt/#eld
> 


-- 
The University of Stirling has been ranked in the top 12 of UK universities for 
graduate employment*.
94% of our 2012 graduates were in work and/or further study within six months 
of graduation.
*The Telegraph
The University of Stirling is a charity registered in Scotland, number SC 
011159.


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to