Search code examples
javadebianelasticsearchelasticsearch-plugin

ElasticSearch plugins: "Failed to resolve config path" error


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?


Solution

  • 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.