Java Node Client - path.home is not configured

(Shawn Johnson) #1

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 (


Node node = NodeBuilder.nodeBuilder()
        .settings(Settings.settingsBuilder().put("", ES_CLUSTER_NAME))


Exception in thread "main" java.lang.IllegalStateException: path.home is not configured
at org.elasticsearch.env.Environment.(
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(
at org.elasticsearch.node.Node.(
at org.elasticsearch.node.NodeBuilder.node(

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?


(Jörg Prante) #2

path.home is documented at

A client node is a real node, in contrast to a transport client.

You need to pass path.home to a node so it knows where to lookup configuration files or a place to write logs or save cluster state data .

(Shawn Johnson) #3

Thanks for the reply.

For those others that might be hitting this error... I'm running a simple Java program from eclipse. In the launch profile I added:


Since I save the launch file to be shared by the other developers on the team, I use an eclipse variable as the path.


(Prakash) #4

I tried running from eclipse by setting -Des.path.home=/myproject/path in VM arguments in Run configuration, but i am still facing the issue

(system) #5