# Getting java.net.NetPermission with xpack.monitoring.exporters (elasticsearch-6.0.0-beta2)

**URL:** <https://discuss.elastic.co/t/getting-java-net-netpermission-with-xpack-monitoring-exporters-elasticsearch-6-0-0-beta2/100607>\
**Category:** Elasticsearch\
**Created:** [September 14, 2017, 8:48pm UTC](https://discuss.elastic.co/t/getting-java-net-netpermission-with-xpack-monitoring-exporters-elasticsearch-6-0-0-beta2/100607 "2017-09-14T20:48:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayme](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jayme/32/6008_2.png) [@Jayme](https://discuss.elastic.co/u/Jayme)\
**Post date:** [September 14, 2017, 8:48pm UTC](https://discuss.elastic.co/t/getting-java-net-netpermission-with-xpack-monitoring-exporters-elasticsearch-6-0-0-beta2/100607/1 "2017-09-14T20:48:18Z")

</div>

When I add

```auto
xpack.monitoring.exporters:
  id1:
    type: http
    host: ["http://192.168.14.53:9200", "http://192.168.14.54:9200"]

```

to my elastic config, I get a `java.net.NetPermission` error..  
`xpack.security.enabled: false` is disabled on the server where I setup the config  
and on the receiving elastic search servers (also running elasticsearch-6.0.0-beta2) ..

Could it be that I need to enable / disable something to avoid these security errors?  
Couldn't not find anything related on google that could pinpoint to a certain setting.. so reporting it here.

**Elasticsearch version** (`bin/elasticsearch --version`):  
elasticsearch-6.0.0-beta2

**Plugins installed** : []  
x-pack

**JVM version** (`java -version`):  
Java(TM) SE Runtime Environment (build 1.8.0\_131-b11)  
No LSB modules are available.

**OS version** (`uname -a` if on a Unix-like system):  
Distributor ID: Ubuntu  
Description: Ubuntu 14.04.5 LTS  
Release: 14.04  
Codename: trusty  
Linux elastic30 3.13.0-119-generic # 166-Ubuntu

**Description of the problem including expected versus actual behavior** :

**Steps to reproduce** :  
Add xpack exporters to the config

```auto
xpack.monitoring.exporters:
  id1:
    type: http
    host: ["http://192.168.14.53:9200", "http://192.168.14.54:9200"]

```

**Provide logs (if relevant)**:

```auto
[2017-09-14T19:55:28,430][ERROR][o.e.b.Bootstrap] [elastic30] Exception
java.security.AccessControlException: access denied ("java.net.NetPermission" "getProxySelector")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_131]
	at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_131]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_131]
	at java.net.ProxySelector.getDefault(ProxySelector.java:94) ~[?:1.8.0_131]
	at org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(HttpAsyncClientBuilder.java:793) ~[?:?]
	at org.elasticsearch.client.RestClientBuilder$2.run(RestClientBuilder.java:214) ~[?:?]
	at org.elasticsearch.client.RestClientBuilder$2.run(RestClientBuilder.java:211) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_131]
	at org.elasticsearch.client.RestClientBuilder.createHttpClient(RestClientBuilder.java:211) ~[?:?]
	at org.elasticsearch.client.RestClientBuilder.access$000(RestClientBuilder.java:40) ~[?:?]
	at org.elasticsearch.client.RestClientBuilder$1.run(RestClientBuilder.java:185) ~[?:?]
	at org.elasticsearch.client.RestClientBuilder$1.run(RestClientBuilder.java:182) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_131]
	at org.elasticsearch.client.RestClientBuilder.build(RestClientBuilder.java:182) ~[?:?]
	at org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter.createRestClient(HttpExporter.java:284) ~[?:?]
	at org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter.<init>(HttpExporter.java:200) ~[?:?]
	at org.elasticsearch.xpack.monitoring.exporter.http.HttpExporter.<init>(HttpExporter.java:188) ~[?:?]
	at org.elasticsearch.xpack.monitoring.Monitoring.lambda$createComponents$1(Monitoring.java:126) ~[?:?]
	at org.elasticsearch.xpack.monitoring.exporter.Exporters.initExporters(Exporters.java:158) ~[?:?]
	at org.elasticsearch.xpack.monitoring.exporter.Exporters.doStart(Exporters.java:82) ~[?:?]
	at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:66) ~[elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at java.util.ArrayList.forEach(ArrayList.java:1249) ~[?:1.8.0_131]
	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080) ~[?:1.8.0_131]
	at org.elasticsearch.node.Node.start(Node.java:578) ~[elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:261) ~[elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:331) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:130) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:121) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.0.0-beta2.jar:6.0.0-beta2]
[2017-09-14T19:55:28,446][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [elastic30] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.security.AccessControlException: access denied ("java.net.NetPermission" "getProxySelector")

```

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [September 14, 2017, 8:55pm UTC](https://discuss.elastic.co/t/getting-java-net-netpermission-with-xpack-monitoring-exporters-elasticsearch-6-0-0-beta2/100607/2 "2017-09-14T20:55:19Z")

</div>

This issue is known to us, and I'm sorry that you encountered it. You can see details here: [6.0.0-beta2 Reindex from remote getProxySelector AccessControlException](https://discuss.elastic.co/t/6-0-0-beta2-reindex-from-remote-getproxyselector-accesscontrolexception/99864).

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [September 14, 2017, 8:55pm UTC](https://discuss.elastic.co/t/getting-java-net-netpermission-with-xpack-monitoring-exporters-elasticsearch-6-0-0-beta2/100607/3 "2017-09-14T20:55:57Z")

</div>

@Jayme I've added you to our [Pioneer Program](https://www.elastic.co/blog/elastic-pioneer-program-6-0).

---

<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:** [October 12, 2017, 8:56pm UTC](https://discuss.elastic.co/t/getting-java-net-netpermission-with-xpack-monitoring-exporters-elasticsearch-6-0-0-beta2/100607/4 "2017-10-12T20:56:21Z")

</div>

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