ElasticSearch 插件:“无法解析配置路径"错误

ElasticSearch plugins: quot;Failed to resolve config pathquot; error(ElasticSearch 插件:“无法解析配置路径错误)

本文介绍了ElasticSearch 插件:“无法解析配置路径"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 debian jessie 上安装了 elasticsearch 1.7.3.它使用默认配置文件并正常工作.但是当我调用 sudo/usr/share/elasticsearch/bin/plugin 它返回一个错误:

I install elasticsearch 1.7.3 on debian jessie. It uses default config files and works normally. But when i call sudo /usr/share/elasticsearch/bin/plugin it returns an error:

Exception in thread "main" org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve config path ["/usr/share/elasticsearch/config/elasticsearch.yml"], tried file path ["/usr/share/elasticsearch/config/elasticsearch.yml"], path file ["/usr/share/elasticsearch/config"/"/usr/share/elasticsearch/config/elasticsearch.yml"], and classpath
        at org.elasticsearch.env.Environment.resolveConfig(Environment.java:291)
        at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:95)
        at org.elasticsearch.plugins.PluginManager.main(PluginManager.java:396)

文件 /usr/share/elasticsearch/config/elasticsearch.yml 存在,我可以在 nano 中打开他.

File /usr/share/elasticsearch/config/elasticsearch.yml is exists and i can open him in nano.

有/etc/default/elasticsearch 文件:

There is /etc/default/elasticsearch file:

# Start Elasticsearch automatically
START_DAEMON=true

# Run Elasticsearch as this user ID and group ID
#ES_USER=elasticsearch
#ES_GROUP=elasticsearch

# Heap Size (defaults to 256m min, 1g max)
#ES_HEAP_SIZE=2g

# Heap new generation
#ES_HEAP_NEWSIZE=

# max direct memory
#ES_DIRECT_SIZE=

# Maximum number of open files, defaults to 65535.
#MAX_OPEN_FILES=65535

# Maximum locked memory size. Set to "unlimited" if you use the
# bootstrap.mlockall option in elasticsearch.yml. You must also set
# ES_HEAP_SIZE.
#MAX_LOCKED_MEMORY=unlimited

# Maximum number of VMA (Virtual Memory Areas) a process can own
#MAX_MAP_COUNT=262144

# Elasticsearch log directory
#LOG_DIR=/var/log/elasticsearch

# Elasticsearch data directory
#DATA_DIR=/var/lib/elasticsearch

# Elasticsearch work directory
#WORK_DIR=/tmp/elasticsearch

# Elasticsearch configuration directory
#CONF_DIR=/etc/elasticsearch

# Elasticsearch configuration file (elasticsearch.yml)
#CONF_FILE=/etc/elasticsearch/elasticsearch.yml

# Additional Java OPTS
#ES_JAVA_OPTS=

# Configure restart on package upgrade (true, every other setting will lead to not restarting)
#RESTART_ON_UPGRADE=true

/var/log/elasticsearch/elasticsearch.log/var/log/elasticsearch/elasticsearch.error 文件中没有记录.

There are no records in /var/log/elasticsearch/elasticsearch.log and /var/log/elasticsearch/elasticsearch.error files.

有人知道为什么会失败吗?

Does anybody know why is can fail?

推荐答案

不是解决问题.但我解决了我的问题.

It is not resolve of question. But i resolved my problem.

/usr/share/elasticsearch/bin/plugin 中的脚本生成 bash-command 并运行它.我编辑了这个文件.它通过 echo 打印此命令,而不是运行它.我复制了这个命令并从布什终端运行它.它运行正确.

Script in /usr/share/elasticsearch/bin/plugin generate bash-command and run it. I edited this file. It printed this command by echo instead running it. I copied this command and ran it from bush terminal. And it ran correctly.

我不知道为什么,但它有效.可能对某人有帮助.

I don't know why but it work. May be it will be helpful for someone.

这篇关于ElasticSearch 插件:“无法解析配置路径"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:ElasticSearch 插件:“无法解析配置路径"错误

基础教程推荐