My setup is two solr nodes running on separate Azure Ubuntu 18.04 LTS vms using 
an external zookeeper assembly.
I installed Solr 6.6.6 using the install file and then followed the steps for 
enabling ssl. I am able to start solr, add collections and the like using 
bin/solr script.

Example:
/opt/solr$ sudo bin/solr start -cloud -s cloud/test2 -force

However, if I restart the machine or attempt to start solr using the installed 
service, it naturally goes back to the default SOLR_HOME in the 
/etc/default/solr.in.sh script: "/var/solr/data"

I've tried updating SOLR_HOME to "/opt/solr/cloud/test2" but then when I start 
the service I see the following error on the Admin Dashboard:
SolrCore Initialization Failures
mycollection_shard1_replica1: 
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: 
/opt/solr-6.6.6/cloud/test2/mycollection_shard1_replica1/data/index/write.lock
Please check your logs for more information

[cid:image001.png@01D68C18.8565BFB0]

I'm including what I believe to be the pertinent information from the logs 
below:
I suspect this is a permission issue because the solr user created by the 
install script isn't allowed access to  /opt/solr but I'm new to Linux and 
haven't completely wrapped my head around the way permissions work with it. Am 
I correct in guessing the cause of the error and, if so, how do I correct this 
so that the service can be used to run my instances?

java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: 
Unable to create core [mycollection_shard1_replica1]
              at java.util.concurrent.FutureTask.report(FutureTask.java:122)
              at java.util.concurrent.FutureTask.get(FutureTask.java:192)
              at 
org.apache.solr.core.CoreContainer.lambda$load$6(CoreContainer.java:594)
              at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
              at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at 
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
              at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.solr.common.SolrException: Unable to create core 
[mycollection_shard1_replica1]
              at 
org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:966)
              at 
org.apache.solr.core.CoreContainer.lambda$load$5(CoreContainer.java:565)
              at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
              ... 5 more
Caused by: org.apache.solr.common.SolrException: 
/opt/solr-6.6.6/cloud/test2/mycollection_shard1_replica1/data/index/write.lock
              at org.apache.solr.core.SolrCore.<init>(SolrCore.java:977)
              at org.apache.solr.core.SolrCore.<init>(SolrCore.java:830)
              at 
org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:950)
              ... 7 more
Caused by: java.nio.file.AccessDeniedException: 
/opt/solr-6.6.6/cloud/test2/mycollection_shard1_replica1/data/index/write.lock
              at 
sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
              at 
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
              at 
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
              at 
sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
              at java.nio.channels.FileChannel.open(FileChannel.java:287)
              at java.nio.channels.FileChannel.open(FileChannel.java:335)
              at 
org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:113)
              at 
org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41)
              at 
org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45)
              at 
org.apache.lucene.store.FilterDirectory.obtainLock(FilterDirectory.java:104)
              at 
org.apache.lucene.index.IndexWriter.isLocked(IndexWriter.java:4776)
              at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:709)
              at org.apache.solr.core.SolrCore.<init>(SolrCore.java:923)


Thanks for the help,
Victor

Reply via email to