ElasticSearch插件:“无法解析配置路径”错误 [英] ElasticSearch plugins: "Failed to resolve config path" error
问题描述
sudo / usr / share / elasticsearch / bin / plugin
它会返回错误: 线程中的异常mainorg.elasticsearch.env.FailedToResolveConfigException:无法解析配置路径[/usr/share/elasticsearch/config/elasticsearch.yml],尝试文件路径[/ usr /share/elasticsearch/config/elasticsearch.yml],路径文件[/usr/share/elasticsearch/config//\"/usr/share/elasticsearch/config/elasticsearch.yml]和类路径
org.elasticsearch.env.Environment.resolveConfig(Environment.java:291)
在org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:95)
在org.elasticsearch.plugins。 PluginManager.main(PluginManager.java:396)
文件 / usr / share存在/elasticsearch/config/elasticsearch.yml
,我可以用nano打开他。
有/ etc / default / elasticsearch文件:
#启动Ela sticsearch自动
START_DAEMON = true
#运行Elasticsearch作为此用户ID和组ID
#ES_USER = elasticsearch
#ES_GROUP = elasticsearch
#堆大小(默认为256m min,最大1g)
#ES_HEAP_SIZE = 2g
#堆新一代
#ES_HEAP_NEWSIZE =
#max直接内存
#ES_DIRECT_SIZE =
#最大打开文件数,默认为65535
#MAX_OPEN_FILES = 65535
#最大锁定内存大小。如果您在elasticsearch.yml中使用
#bootstrap.mlockall选项,请设置为unlimited。您还必须设置
#ES_HEAP_SIZE。
#MAX_LOCKED_MEMORY = unlimited
#进程可以拥有的VMA(虚拟内存区域)的最大数量
#MAX_MAP_COUNT = 262144
#Elasticsearch日志目录
#LOG_DIR = / var / log / elasticsearch
#Elasticsearch数据目录
#DATA_DIR = / var / lib / elasticsearch
#Elasticsearch工作目录
#WORK_DIR = / tmp / elasticsearch
#Elasticsearch配置目录
#CONF_DIR = / etc / elasticsearch
#弹性搜索配置文件(elasticsearch.yml )
#CONF_FILE = / etc / elasticsearch / elasticsearch.yml
#其他Java OPTS
#ES_JAVA_OPTS =
#配置重新启动软件包升级
#RESTART_ON_UPGRADE = true
有/ code> /var/log/elasticsearch/elasticsearch.error 和文件。
有人知道为什么会失败吗?
这不是问题的解决。但我解决了我的问题。
/ usr / share / elasticsearch / bin / plugin
中的脚本生成bash命令并运行它。我编辑了这个文件。它通过 echo
打印此命令,而不是运行它。我复制了这个命令,并从布什终端运行。它正常运行。
我不知道为什么,但它的工作。可能对某人有帮助。
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)
File /usr/share/elasticsearch/config/elasticsearch.yml
is exists and i can open him in nano.
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
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.
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插件:“无法解析配置路径”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!