# Troubleshooting Installation

**URL:** https://discourse.project-emerse.org/t/troubleshooting-installation/30
**Category:** Uncategorized
**Created:** [October 15, 2019, 8:14pm UTC](https://discourse.project-emerse.org/t/troubleshooting-installation/30 "2019-10-15T20:14:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bront](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bront](https://discourse.project-emerse.org/u/bront)
#### Post date: [October 15, 2019, 8:14pm UTC](https://discourse.project-emerse.org/t/troubleshooting-installation/30/1 "2019-10-15T20:14:25Z")

</div>

Hi,

I recently installed Emerse and had things working with the sample indexes. Then I tried to move the sample indexes out of the solr directory and into a different directory (still on the same machine) per the following:

"For the demonstration installation the Solr indexes are placed in the default Solr directory. However, for a full production installation we would recommend that these indexes are located outside the Solr installation directory, perhaps on externally connected storage. To specify a directory outside of the default location, open the `solr.in.sh` file (located in `/solr-7.3.1/bin/` ) and edit the `SOLR_HOME` property. For example: `SOLR_HOME=/app/data/SOLR_DATA_DIR`"

–[http://project-emerse.org/documentation/install\_guide.html#trueemerse-install-and-initial-configuration](http://project-emerse.org/documentation/install_guide.html#trueemerse-install-and-initial-configuration)

Now, when I run the diagnostics, I get:  
LUCENE ERRORED Could not find index files in the Lucene directory path specified.

This appears to be caused by a NullPointer here:  
edu.umich.med.emerse.service.search.LuceneSearcher.acquireSearcher

I tried different settings for the Solr\_Home in solr.in.sh, and the lucene.indexPath in /tomcat/…/conf/emerse.properties, but nothing is working.

Currently, I have tried to re-deploy the sample indexes inside of the solr directory (from the initial installation docs), re-installed Solr, and I am still getting this error message.

I think I have gone slightly code blind over the last couple days and fear I am making a very obvious mistake, but any help would be greatly appreciated.

Many thanks,

bront  
University of Kentucky - Markey Cancer Center

---

<div class="post-metadata">

### Author: ![jlaw](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jlaw](https://discourse.project-emerse.org/u/jlaw)
#### Post date: [October 15, 2019, 8:39pm UTC](https://discourse.project-emerse.org/t/troubleshooting-installation/30/2 "2019-10-15T20:39:31Z")

</div>

Bront, This is most likely the path in emerse.properties is not setup correctly. The SOLR\_HOME is only read by the solr server, where as the EMERSE tomcat webapp uses the lucene.indexPath in emerse.properties.  
What value do you have in emerse.properties? Ours is something like  
lucene.indexPath=/app/data/solr7/

---

<div class="post-metadata">

### Author: ![bront](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bront](https://discourse.project-emerse.org/u/bront)
#### Post date: [November 4, 2019, 5:20pm UTC](https://discourse.project-emerse.org/t/troubleshooting-installation/30/5 "2019-11-04T17:20:49Z")

</div>

Hi,

I am sorry to say that I have not been able to solve this issue. I have tried starting over, re-installing the software in a new directory. I have dropped the database and re-imported it numerous times.

Yet still in the diagnostics panel, I get Lucene, Errored, Could not find index files in the Lucene directory path specified:

_Failed to find index data directory: **/app/data/solr7/documents/data** _  
_lucene.indexPath=/app/data/solr7/_  
_SOLR\_INDEX id: documents_

Yet, in the Solr admin:

_CWD: /app/solr-7.3.1/server_  
_Instance: /app/solr-7.3.1/server/solr/documents_  
_Data: **/app/data/solr7/documents/data** _  
_Index: /app/data/solr7/documents/data/index_

**Emerse.properties : lucene.indexPath=/app/data/solr7**

I am at a loss as to understand why this is happening? I have tried different permissions settings on the /app/data/solr7/\*. I noted that in the web app deployed on the virtual box emerse provides, all/most of the emerse files belong to the emerse user. Right now I am running the app as a combination of my own user and tomcat. Should I create an emerse user?

I feel like I am missing something very simple, but can’t see it.

Any help would be appreciated.

thanks,

bront

---

<div class="post-metadata">

### Author: ![mcclaink](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.project-emerse.org/mcclaink/32/8_2.png) [@mcclaink](https://discourse.project-emerse.org/u/mcclaink)
#### Post date: [November 4, 2019, 6:28pm UTC](https://discourse.project-emerse.org/t/troubleshooting-installation/30/6 "2019-11-04T18:28:06Z")

</div>

You shouldn’t have to make a EMERSE user. I’d double check to make sure the permissions are set right. You may also have issues with selinux. You can check the selinux audit files to see if there’s been any denials from that. You can check if selinux is on with `sestatus` and temporarily disable (until next reboot) it with `setenforce 0`, but these commands require root access. You can view the selinux security context on the files by passing `-Z` to `ls`, but that doesn’t necessarily tell you much unless you know a lot about selinux, and I don’t.

Also, be sure to check the permissions all the way up the directory tree. If the permissions on `/app` don’t work, I think the kernel will deny access to any file underneath it, even if those files have the correct permissions, but I’m not 100% on that.

But, one thing you can do to double-check why it may not be able to open that file is run java with `strace`. Just shut tomcat down, and then run

```auto
strace -f YOUR_STARTUP_COMMAND_HERE 2> strace_output.txt &

```

where `YOUR_STARTUP_COMMAND_HERE` is whatever command you run to start tomcat up normally. This will start tomcat, but all the kernel calls (or anything on standard error) will go to `./strace_output.txt`. Give it an extra minute or two to start up, then search the `strace_output.txt` file for a line talking about `open`ing or `lstat`'ing the files it can’t find:

```auto
grep /app/data/solr7/documents strace_output.txt 

```

The number on the right of the will tell you the error or if it’s a success. If it’s a permission error, it’ll look like this:

```auto
[pid XXXXX] open("/app/data/solr7/documents", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 EACCES (Permission denied)

```

Alternately, it may be like:

```auto
[pid XXXXX] open("/app/data/solr7/documents", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

```

But the output should look more like this:

```auto
[pid XXXXX] open("/app/data/solr7/documents/data", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC <unfinished ...>
[pid XXXXX] stat("/app/data/solr7/documents/data/index", <unfinished ...>
[pid XXXXX] stat("/app/data/solr7/documents/data/index", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
[pid XXXXX] lstat("/app/data/solr7/documents", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid XXXXX] lstat("/app/data/solr7/documents/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid XXXXX] lstat("/app/data/solr7/documents/data/index", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
[pid XXXXX] open("/app/data/solr7/documents/data/index", O_RDONLY) = 246
[pid XXXXX] open("/app/data/solr7/documents/data/index", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/segments_76a", O_RDONLY) = 246
[pid XXXXX] open("/app/data/solr7/documents/data/index/_3lop.si", O_RDONLY) = 246
[pid XXXXX] open("/app/data/solr7/documents/data/index/_3q24.si", O_RDONLY) = 246
[pid XXXXX] open("/app/data/solr7/documents/data/index/_3nwh.si", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/_2vud.si", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/_3q25.si", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/_22pe.si", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/_3mif.si", O_RDONLY) = 246
[pid XXXXX] open("/app/data/solr7/documents/data/index/_3p2m.si", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/_1c3h.si", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/_2pya.si", O_RDONLY <unfinished ...>
[pid XXXXX] open("/app/data/solr7/documents/data/index/_3k2g.si", O_RDONLY <unfinished ...>

```

As you can see, it goes through and accesses all the files in those directories. If any of them have any kind of error, that might tell you what’s going on.
