Troubleshooting Installation

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

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

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/

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

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

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 opening or lstat'ing the files it can’t find:

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:

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

Alternately, it may be like:

[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:

[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.