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

When I add

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

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

Provide logs (if relevant):

[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")

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.

@Jayme I've added you to our Pioneer Program.

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