1

我已将elasticsearch项目从 GitHub 克隆到我的本地计算机。构建成功并将其导入eclipse。

当我尝试main()在类中运行该方法时org.elasticsearch.bootstrap.ElasticSearch(这是启动 elasticsearch 的入口点),出现以下错误:

ERROR: the system property [es.path.conf] must be set

我尝试将系统变量设置ES_PATH_CONFE:\Elasticsearch\Github\elasticsearch-master\distribution\src\main\resources\config.

但它不起作用我仍然遇到同样的错误。上述ES_PATH_CONF变量的位置是否正确?有没有其他方法可以解决这个问题?

4

1 回答 1

0

可以使用以下VM选项设置配置目录的位置:

-Des.path.conf=/path/to/config/

此外,在您的情况下,可能需要设置 Elasticsearch path.home变量:

-Des.path.home=/path/to/elasticsearch/home/dir
于 2018-02-18T19:11:44.733 回答