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 open
ing 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.