0
votes

I am building a DSpace repository on Ubuntu 16.04 LTS. I have installed all the prerequisite softwares according to the manual over here: https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace. The build is successful, I can deploy the webapps. But when I try to add[screen after clicking search link][1]

[1]: https://i.stack.imgur.com/nlDDT.png click the search link this error comes up. Bellow is the error details

Expected mime type application/octet-stream but got text/html. Apache Tomcat/8.0.39 - Error reportH1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}

HTTP Status 403 -

type Status report

message

description Access to the specified resource has been forbidden.

Apache Tomcat/8.0.39

How can I bypass through this error. Please help.

1

1 Answers

0
votes

It sounds like your Solr webapp is rejecting the HTTP request from the DSpace Discovery module. By default, the 'solr' WAR comes configured with a LocalHostRestrictionFilter which ensures that only the local machine can communicate directly with the solr cores like search, statistics, etc.

Make sure that in your $dspace/config/dspace.cfg configuration, your "solr.server" parameter is set correctly. If you're running everything on the same machine with default values, this should be something like

solr.server = http://localhost:8080/solr

And your $dspace/config/modules/discovery.cfg should say

discovery.search.server = ${solr.server}/search

If your solr instance is deployed to a different machine than the one running your XMLUI application / main DSpace instance, this would be expected behaviour. Even if it's all running on the same machine, perhaps solr is seeing an IP other than '127.0.0.1' (eg. ipv6 local address, or an address changed by SNAT, proxy address).

Your Tomcat access logs should give you an idea of which IP it's seeing (search for the entries with a 403 HTTP response code). If the IP you looks good but just happens not to match 127.0.0.1 (ipv6, a rewritten or proxied address) then you can alter the LocalHostRestrictionFilter valve to also allow that address. (just be careful not to open up access to more than you want!) There is a guide on how to do this at https://wiki.duraspace.org/display/DSPACE/Solr#Solr-Bypassinglocalhostrestrictionpermanently