# Facing no permission error in plugin

**URL:** <https://discuss.elastic.co/t/facing-no-permission-error-in-plugin/132778>\
**Category:** Elasticsearch\
**Created:** [May 22, 2018, 10:10am UTC](https://discuss.elastic.co/t/facing-no-permission-error-in-plugin/132778 "2018-05-22T10:10:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fhalde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fhalde/32/21419_2.png) [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Post date:** [May 22, 2018, 10:10am UTC](https://discuss.elastic.co/t/facing-no-permission-error-in-plugin/132778/1 "2018-05-22T10:10:31Z")

</div>

We have a home grown plugin that collects ES metrics. Things were working fine until our plugin was installed in a cluster with x-pack. We are facing the below exception while collecting node stats

```auto
org.elasticsearch.ElasticsearchSecurityException: no indices permissions found
	at org.elasticsearch.xpack.core.security.support.Exceptions.authorizationError(Exceptions.java:42) ~[?:?]
	at org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexSearcherWrapper.getIndicesAccessControl(SecurityIndexSearcherWrapper.java:306) ~[?:?]
	at org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexSearcherWrapper.wrap(SecurityIndexSearcherWrapper.java:127) ~[?:?]
	at org.elasticsearch.index.shard.IndexSearcherWrapper.wrap(IndexSearcherWrapper.java:76) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.index.shard.IndexShard.acquireSearcher(IndexShard.java:1172) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.index.shard.IndexShard.docStats(IndexShard.java:893) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.action.admin.indices.stats.CommonStats.<init>(CommonStats.java:175) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.indices.IndicesService.indexShardStats(IndicesService.java:330) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.indices.IndicesService.statsByShard(IndicesService.java:300) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.indices.IndicesService.stats(IndicesService.java:291) ~[elasticsearch-6.2.3.jar:6.2.3]
	at org.elasticsearch.node.NodeService.stats(NodeService.java:112) ~[elasticsearch-6.2.3.jar:6.2.3]
	at com.paypal.elasticsearch.sherlock.service.SherlockStats$1.run(SherlockStats.java:90) ~[sherlock-plugin-6.2.3.jar:?]
	at com.paypal.elasticsearch.sherlock.service.SherlockStats$1.run(SherlockStats.java:87) ~[sherlock-plugin-6.2.3.jar:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_131]
	at com.paypal.elasticsearch.sherlock.service.SherlockStats.publishNodeStats(SherlockStats.java:87) ~[sherlock-plugin-6.2.3.jar:?]
	at com.paypal.elasticsearch.sherlock.service.SherlockPublisher.publishStats(SherlockPublisher.java:85) ~[sherlock-plugin-6.2.3.jar:?]
	at com.paypal.elasticsearch.sherlock.service.SherlockServiceInitializer$MetricPublisher.run(SherlockServiceInitializer.java:103) [sherlock-plugin-6.2.3.jar:?]
	at java.util.TimerThread.mainLoop(Timer.java:555) [?:1.8.0_131]
	at java.util.TimerThread.run(Timer.java:505) [?:1.8.0_131]

```

---

<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:** [June 19, 2018, 10:10am UTC](https://discuss.elastic.co/t/facing-no-permission-error-in-plugin/132778/2 "2018-06-19T10:10:34Z")

</div>

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