ResourceWatcherService Exception even on changing the permissions

I have changed permission for the scripts directory to "drwxrwxr-x". But still getting the following exception:

failed to run scheduled task [org.elasticsearch.watcher.ResourceWatcherService$ResourceMonitor@3f813572] on thread pool [same]
java.security.AccessControlException: access denied ("java.io.FilePermission" "" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_66]
at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_66]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_66]
at java.lang.SecurityManager.checkRead(SecurityManager.java:888) ~[?:1.8.0_66]
at sun.nio.fs.UnixPath.checkRead(UnixPath.java:795) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.checkAccess(UnixFileSystemProvider.java:290) ~[?:?]
at java.nio.file.Files.exists(Files.java:2385) ~[?:1.8.0_66]
at org.elasticsearch.watcher.FileWatcher$FileObserver.checkAndNotify(FileWatcher.java:93) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.watcher.FileWatcher.doCheckAndNotify(FileWatcher.java:70) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.watcher.AbstractResourceWatcher.checkAndNotify(AbstractResourceWatcher.java:44) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.watcher.ResourceWatcherService$ResourceMonitor.run(ResourceWatcherService.java:197) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.threadpool.ThreadPool$ReschedulingRunnable.doRun(ThreadPool.java:811) [elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.threadpool.ThreadPool$LoggingRunnable.run(ThreadPool.java:436) [elasticsearch-5.6.8.jar:5.6.8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_66]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_66]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_66]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_66]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]

If you are going to open duplicate issues in the forums and github (but really, please don't), then can you at least link them so we don't try and answer them twice.

What do the permissions look like on the hierachy of that scripts directory?

Try

#!/bin/bash

Dir="/apps/IRDuatrun/rsu/ldn/uat/elasticsearch/bin/scripts"

while [ -n "$Dir" -a "$Dir" != "/" -a -d "$Dir" ]
do
    ls -ld $Dir
    Dir=$(dirname $Dir)
done

Apologies for not linking the issue....but my intention was to get help from where ever I could.
Yes the issue is resolved now as I updated the scripts location to be within the config directory.
Just one question why path.scripts variable is provided if we have to keep scripts inside the CONFIG DIRECTORY?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.