2

I have been using the elastic4s elasticsearch driver.

When attempting to create a client:

import com.sksamuel.elastic4s._
import org.elasticsearch.common.settings._

val esSettings = //...
val client     = ElasticClient local esSettings

I recieve a runtime error:

 [IllegalStateException: path.home is not configured]

What is path.home?
how do I set path.home?

Versions: elasticsearch-2.4.1, elastic4s-2.3.1

Rhys Bradbury
  • 1,699
  • 13
  • 24
  • 1
    Please don't use different versions of product and api - elastic4s version 2.3.1 meant to work with elasticsearch versions 2.3.X and not 2.4.X – Erik Oct 14 '16 at 08:30
  • This is correct and what is mentioned in the `elastic4s` documentation. FYI this error still occurs when using the correct product/api combination. – Rhys Bradbury Oct 14 '16 at 09:40

2 Answers2

2

In addition to Rhys' own answer, you can pass path.home into the settings when you create the client.

val settings = Settings.builder.put("path.home", "/home/elastic")
val = ElasticClient.local(settings)
sksamuel
  • 16,154
  • 8
  • 60
  • 108
1

What is path.home?

As you can see from the documentation, path.home is a variable which must be set to define where on the hard disk to store data.

How do I set path.home?

After searching/trial and error, I have found that path.home cannot be set in elasticsearch.yml (as indicated in the documentation). This will cause your elasticsearch service to fail when you try load that new config.

path.home is a JVM arg.

specifically -Des.path.home="~/folder/"

Rhys Bradbury
  • 1,699
  • 13
  • 24