dadoonet
(David Pilato)
September 29, 2017, 11:41am
2
Please format your code using </>
icon as explained in this guide . It will make your post more readable.
Or use markdown style like:
```
CODE
```
You did not share your code so hard to say what is wrong. I guess a bad usage...
Here is some code to create a client:
Settings settings = Settings.builder()
.put("client.transport.nodes_sampler_interval", "5s")
.put("client.transport.sniff", false)
.put("transport.tcp.compress", true)
.put("cluster.name", CLUSTER_NAME)
.put("xpack.security.transport.ssl.enabled", true)
.put("request.headers.X-Found-Cluster", CLUSTER_NAME)
.put("xpack.security.user", CREDENTIALS)
.build();
return new PreBuiltXPackTransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(CLUSTER_URL, 9343)));
}
HTH