New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.beta1 - Exception "path.home is not configured" when starting ES in transport and client mode #13155
Comments
Discussed this on FixItFriday. The client node is a real node, and should require everything that any other node requires. (Need to add docs for this). The transport client should be light weight and shouldn't require any config etc. So let's not require path.home for the transport client, and not load any config by default. If the user needs to load a config file, then that should be explicitly specified. |
as a temporary work around, if you are using the transport client, you can turn off config file loading by calling |
bleh, it turns out I was wrong. Disabling loading the config settings still results in the exception (we throw it before checking the settings). Sorry for the noise. |
I chatted to @rjernst about it a bit, and he suggested something that I agree with. In the case of There is a whole other question around Node(Client), but we should open a different issue where we properly define how things should work when "embedding" a Node. |
@Andy-Peng service.bat should work unrelated to TransportClient, can you open a new issue with what fails for you in this context? |
service.bat problems might be related to #13247 |
@rjernst are you working on this? |
Transport clients run embedded within external applications, so elasticsearch should not be doing anything with the filesystem, as there is not elasticsearch home. This change makes a number of cleanups to the internal API for loading settings and creating an environment. The loadFromConfig option was removed, since it was always true except for tests. We now always attempt to load settings from config a file when an environment is created. The prepare methods were also simplified so there is now prepareSettingsAndEnvironment which nodes use, and prepareSettings which the transport client uses. I also attempted to improve the tests, but there is a still a lot of follow up work to do there. closes elastic#13155
@clintongormley I just opened a PR for this: #13383 |
Is there any work around for this bug for now? |
I'm still seeing this with elasticsearch 2.0.0, Mac OS Yosemite. maven dependency
code that triggers error
error stack trace
|
@sweetest That is expected since you are starting a node. The PR that closed this removed the need for |
That's not building a client node, that's building a data node for which |
Doesnt it just use path.data to know where to put the data? How does one set path.home? When I google it I just find this thread and the directory layout docs. Also, I am trying to create a client node and get the same error. nodeBuilder()
.settings(Settings.settingsBuilder().put("http.enabled", false))
.client(true)
.node(); Note: I am also trying to upgrade from 1.7.1 to 2.0.0. |
Yes, and by default that is
Are you sure that you're using the released version of Elasticsearch 2.0.0?
Can you give a small reproduction? |
I am having the same issue when creating a Node(Client):
Results in "path.home is not configured" |
Adding
|
Yes I'm fairly sure but is there a way I can have the client report what version it is from within the app? Also, looking at the 2.0.0 source code constructor for Node (line 128) this happens:
Then Environment constructor requires path.home (line 96):
Am I still misunderstanding something? If not, what should I set path.home to when I'm not storing data and how does one set path.home since its not in the client node doc example. https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/node-client.html Thank you. Server:
Client:
|
Yes the doc needs to be fix. |
Set it to any directory. If you are explicitly setting other dirs like path.logs, then nothing should be written to it. |
worked for me on ES 2.0.0 |
唉,还是没解决~ |
Is there any fix for this? I am using the release version of elasticsearch 2.0.0 on my laptop, both for the running es server, and for the dependency in my source code where I use es as a client. |
path.home is not configured |
I am new to ES, and I also faced this problem, any suggested solutions? |
solution: |
The need for path.home to be configured is meh, it's documented in the open issue on ES here: elastic/elasticsearch#13155 for now using UUID class to create a unique directory to store data in.
Hi,
I just installed the new beta version 2.0.0-beta1 and ran some code that used to work with ES 1.7.0.
I got an exception where it complained that "path.home is not configured".
Is this something new? Why would I need to configure anything beside the cluster name in transport mode?
Thanks
The text was updated successfully, but these errors were encountered: