# Watcher Exception without using Watcher

**URL:** <https://discuss.elastic.co/t/watcher-exception-without-using-watcher/81753>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [April 10, 2017, 7:04am UTC](https://discuss.elastic.co/t/watcher-exception-without-using-watcher/81753 "2017-04-10T07:04:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zpp](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@zpp](https://discuss.elastic.co/u/zpp)\
**Post date:** [April 10, 2017, 7:04am UTC](https://discuss.elastic.co/t/watcher-exception-without-using-watcher/81753/1 "2017-04-10T07:04:33Z")

</div>

HI, I'm having below exception in elasticsearch, of course, problems goes away once I grant permission to elasticsearch account. But since I'm not using Watcher, and I didn't install the plugin, why is watcher throwing exceptions? and the script folder is empty. Thanks.  
I'm using ElasticSearch 2.4, with Marvel installed.

failed to run scheduled task [org.elasticsearch.watcher.ResourceWatcherService$ResourceMonitor@4e287f0c] on thread pool [same]  
java.security.AccessControlException: access denied ("java.io.FilePermission" "/etc/elasticsearch/scripts" "read")  
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)  
at java.security.AccessController.checkPermission(AccessController.java:559)  
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)  
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)  
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:2328)  
at org.elasticsearch.watcher.FileWatcher$FileObserver.checkAndNotify(FileWatcher.java:93)  
at org.elasticsearch.watcher.FileWatcher.doCheckAndNotify(FileWatcher.java:70)  
at org.elasticsearch.watcher.AbstractResourceWatcher.checkAndNotify(AbstractResourceWatcher.java:44)  
at org.elasticsearch.watcher.ResourceWatcherService$ResourceMonitor.run(ResourceWatcherService.java:187)  
at org.elasticsearch.threadpool.ThreadPool$ReschedulingRunnable.doRun(ThreadPool.java:1057)  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
at org.elasticsearch.threadpool.ThreadPool$LoggingRunnable.run(ThreadPool.java:668)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)  
at java.util.concurrent.FutureTask.run(FutureTask.java:262)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:745

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 10, 2017, 7:20am UTC](https://discuss.elastic.co/t/watcher-exception-without-using-watcher/81753/2 "2017-04-10T07:20:47Z")

</div>

Hey,

the `ResourceWatcherService` is not a component from watcher, but an Elasticsearch component that watches resources (as in files and directories) to trigger reloading, if on-disk information has changed. This service needs to have read access to the directories it is monitoring. The scripts directory is one of those.

Hope this helps!

--Alex

---

<div class="post-metadata">

**Author:** ![zpp](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@zpp](https://discuss.elastic.co/u/zpp)\
**Post date:** [April 10, 2017, 9:03am UTC](https://discuss.elastic.co/t/watcher-exception-without-using-watcher/81753/3 "2017-04-10T09:03:57Z")

</div>

got it! thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 8, 2017, 9:06am UTC](https://discuss.elastic.co/t/watcher-exception-without-using-watcher/81753/4 "2017-05-08T09:06:22Z")

</div>

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