I am trying to use the Java Node Client and connect to a separate local elasticsearch node, running in a separate JVM. I get the following error when trying to follow the examples provided in the docs (https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/node-client.html).
Code:
Node node = NodeBuilder.nodeBuilder()
.client(true)
.local(false)
.settings(Settings.settingsBuilder().put("cluster.name", ES_CLUSTER_NAME))
.node();
Error:
Exception in thread "main" java.lang.IllegalStateException: path.home is not configured
at org.elasticsearch.env.Environment.(Environment.java:99)
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:82)
at org.elasticsearch.node.Node.(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:152)
I could obviously add a "path.home" to the settings, but I just don't see this documented anywhere - so what should the value be, and why do I need to set it?
thanks!