Hi Andy,
It looks like the request to get current items from the OAI solr core /
index is failing, perhaps because Solr isn't available at that address, the
index doesn't exist yet, or the core hasn't deployed properly.
Are you able to check that your "solr" webapp is deployed and working by
checking Tomcat logs and if possible, from your server, visiting the main
solr dashboard on {hostname:port}/solr, and check DSpace logs for any other
OAI or Solr related errors?
If your solr search and statistics are working OK, one possibility is that
the base Solr URL for 'oai' doesn't match the others, and is point to eg.
an incorrect port for Solr... perhaps you run solr on a different port
(like 80), hostname or webapp name and so the base URL of
localhost:8080/solr/oai needs changing
One trick re: visiting the solr dashboard from your own browser without the
LocalHostRestrictionFilter getting in the way is to make an SSH tunnel into
your server and forward the port so you appear as though you're visiting
from localhost.
Once you've confirmed the port you're running solr on (let's say it is
8080), you can do something like:
"ssh -L8888:localhost:8080 {username}@{serveraddress}" (where {username}
and {serveraddress} are the username and hostname you use to SSH in)
(If you're using something like Putty or another non-CLI ssh client to
connect, it will have instructions on how to do local port forwarding.)
And then when you visit http://localhost:8888/solr in your browser on your
own computer, you'll end up at :8080 on the server as though you were
visiting locally.
The Solr dashboard is really useful for seeing error logs, state of your
cores and indexes, analysing terms and trying out queries etc. so I think
it'll help debugging a lot of you can get in there to start tinkering.
There *may* be something as simple as an extra command or flag to "oai
import" that needs to be run to initialise the OAI index, but my memory is
failing me if so -- I'm sure someone will chip in if that's the case ;)
One final tip... I'd recommend doing any DSpace admin commands like this in
the context of the user that owns/runs Tomcat and DSpace, not as root --
doing things as root can be a bit dangerous sometimes and it's likely to
create new logs, files etc that aren't writeable by Tomcat/DSpace.
Hope this helps! Let me know how you get on.
Cheers
Kim
On Wednesday, January 11, 2017 at 4:48:37 AM UTC+13, Andy Tang wrote:
>
> I recently want to run ./dspace oai import. However I get the error
> message of "org.apache.solr.common.SolrException: not found "
>
> My Dspace version is 3.1. Our OS is redhat linux 6.4
>
> The detailed error message is as below.
>
> -----------------------------------------------------------------------------
> [root@library bin]# ./dspace oai import
> INFO [main] (DSpaceKernelInit.java:52) - Created new kernel:
> DSpaceKernel:org.dspace:name=f7509cea-eda0-4ab4-9f08-949471b22aaf,type=DSpaceKernel:lastLoad=null:loadTime=0:running=false:kernel=null
> INFO [main] (ConfigurationManager.java:1224) - Loading from classloader:
> file:/usr/local/dspace/config/dspace.cfg
> INFO [main] (ConfigurationManager.java:1224) - Using dspace provided log
> configuration (log.init.config)
> INFO [main] (ConfigurationManager.java:1224) - Loading:
> /usr/local/dspace/config/log4j.properties
> OAI 2.0 manager action started
> org.dspace.xoai.solr.exceptions.DSpaceSolrIndexerException: Error
> executing query
> at org.dspace.xoai.app.XOAI.index(XOAI.java:160)
> at org.dspace.xoai.app.XOAI.main(XOAI.java:439)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
> Caused by: org.dspace.xoai.solr.exceptions.DSpaceSolrException: Error
> executing query
> at
> org.dspace.xoai.solr.DSpaceSolrSearch.query(DSpaceSolrSearch.java:39)
> at org.dspace.xoai.app.XOAI.index(XOAI.java:134)
> ... 6 more
> Caused by: org.apache.solr.client.solrj.SolrServerException: Error
> executing query
> at
> org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
> at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
> at
> org.dspace.xoai.solr.DSpaceSolrSearch.query(DSpaceSolrSearch.java:34)
> ... 7 more
> Caused by: org.apache.solr.common.SolrException: Not Found
>
> Not Found
>
> request:
> http://localhost:8080/solr/oai/select?q=*:*&fl=item.lastmodified&sort=item.lastmodified
>
> desc,item.id asc&rows=1&wt=javabin&version=2
> at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
> at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
> at
> org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
> ... 9 more
> [root@library bin]#
>
> Any help is appreciated!
>
--
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.