0
votes

HTTP ERROR 500

Problem accessing /solr/. Reason:

Severe errors in solr configuration.

Check your log files for more detailed information on what may be wrong.

If you want solr to continue after configuration errors, change:

false

in null


java.lang.RuntimeException: Cannot create directory: /var/lib/solr/data/index at org.apache.lucene.store.NativeFSLockFactory.acquireTestLock(NativeFSLockFactory.java:74) at org.apache.lucene.store.NativeFSLockFactory.makeLock(NativeFSLockFactory.java:126) at org.apache.lucene.store.Directory.makeLock(Directory.java:131) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1549) at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1407) at org.apache.solr.update.SolrIndexWriter.(SolrIndexWriter.java:190) at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:393) at org.apache.solr.core.SolrCore.(SolrCore.java:546) at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137) at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:622) at org.mortbay.start.Main.invokeMain(Main.java:194) at org.mortbay.start.Main.start(Main.java:534) at org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:622) at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)

2
Please explain what you did instead of just posting some errors. Also try to come up with a meaningful title. stackoverflow.com/help/how-to-askChris

2 Answers

2
votes

If you install solr-jetty on ubuntu 18.04, the jetty service has not permission on /var/lib/solr/data/ path.

check this link: https://github.com/ckan/ckan/issues/4762#issuecomment-489658465

shot summary as bellow..

sudo mkdir /etc/systemd/system/jetty9.service.d
vi /etc/systemd/system/jetty9.service.d/solr.conf

solr.conf is new file. add ReadWritePaths config.

[Service]
ReadWritePaths=/var/lib/solr

save file, and

systemctl daemon-reload
sudo service jetty9 restart 
1
votes

It is hard to debug this without knowing which operating system and installation instructions did you use.

Looking at the traceback it looks like there are permissions problems on the Solr data directory:

java.lang.RuntimeException: Cannot create directory: /var/lib/solr/data/index at 

A normal package install would have take care of this, but you can try the following to see if it helps:

sudo chown -R jetty.root /var/lib/solr/data
sudo service jetty restart