4

Я начал использовать Elasticsearch 2.0. У меня есть плагин для Elasticsearch, но не могу установить его на новую версию 2.0. Он дает сообщение об ошибке:Установка плагина Elasticsearch 2.0 INFO

/Downloads/elasticsearch-2.0.0/bin$ ./plugin install file:///home/fatih/Downloads/myftptest/zemberekplugin.zip 
-> Installing from file:/home/fatih/Downloads/myftptest/zemberekplugin.zip... 
Trying file:/home/fatih/Downloads/myftptest/zemberekplugin.zip ... 
Downloading .......DONE 
Verifying file:/home/fatih/Downloads/myftptest/zemberekplugin.zip checksums if available ... 
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify) 
ERROR: Could not find plugin descriptor 'plugin-descriptor.properties' in plugin zip 

Как это исправить?

+0

Можете ли вы предоставить командную строку, которую вы используете? – Val

+0

/Downloads/elasticsearch-2.0.0/bin$ ./plugin установочный файл: ///home/fatih/Downloads/myftptest/zemberekplugin.zip -> Установка из файла:/home/fatih/Downloads/myftptest/zemberekplugin. zip ... Пытающий файл: /home/fatih/Downloads/myftptest/zemberekplugin.zip ... Загрузка ....... DONE Проверка файла: /home/fatih/Downloads/myftptest/zemberekplugin.zip контрольные суммы если доступно ... ПРИМЕЧАНИЕ: Не удалось проверить контрольную сумму для загруженного плагина (не удалось найти файл .sha1 или .md5 для проверки) ОШИБКА: Не удалось найти плагин-дескриптор 'plugin-descriptor.properties' в плагине zip –

+0

Плагин был отлично работает в версии 1.7.2. –

ответ

5

Способ установки плагинов изменен. Правильная команда, как описано выше в настоящее время:

sudo bin/plugin install file:/path/to/plugin.zip 

https://www.elastic.co/guide/en/elasticsearch/plugins/2.0/installation.html

Однако плагины теперь требуют файл 'plugin-descriptor.properties к включению в плагин молнии рядом с .jar файлов

https://www.elastic.co/guide/en/elasticsearch/plugins/2.0/plugin-authors.html

https://github.com/elastic/elasticsearch/blob/master/dev-tools/src/main/resources/plugin-metadata/plugin-descriptor.properties

# Elasticsearch plugin descriptor file 
# This file must exist as 'plugin-descriptor.properties' at 
# the root directory of all plugins. 
# 
# A plugin can be 'site', 'jvm', or both. 
# 
### example site plugin for "foo": 
# 
# foo.zip <-- zip file for the plugin, with this structure: 
# _site/ <-- the contents that will be served 
# plugin-descriptor.properties <-- example contents below: 
# 
# site=true 
# description=My cool plugin 
# version=1.0 
# 
### example jvm plugin for "foo" 
# 
# foo.zip <-- zip file for the plugin, with this structure: 
# <arbitrary name1>.jar <-- classes, resources, dependencies 
# <arbitrary nameN>.jar <-- any number of jars 
# plugin-descriptor.properties <-- example contents below: 
# 
# jvm=true 
# classname=foo.bar.BazPlugin 
# description=My cool plugin 
# version=2.0.0-rc1 
# elasticsearch.version=2.0 
# java.version=1.7 
# 
### mandatory elements for all plugins: 
# 
# 'description': simple summary of the plugin 
description=${project.description} 
# 
# 'version': plugin's version 
version=${project.version} 
# 
# 'name': the plugin name 
name=${elasticsearch.plugin.name} 

### mandatory elements for site plugins: 
# 
# 'site': set to true to indicate contents of the _site/ 
# directory in the root of the plugin should be served. 
site=${elasticsearch.plugin.site} 
# 
### mandatory elements for jvm plugins : 
# 
# 'jvm': true if the 'classname' class should be loaded 
# from jar files in the root directory of the plugin. 
# Note that only jar files in the root directory are 
# added to the classpath for the plugin! If you need 
# other resources, package them into a resources jar. 
jvm=${elasticsearch.plugin.jvm} 
# 
# 'classname': the name of the class to load, fully-qualified. 
classname=${elasticsearch.plugin.classname} 
# 
# 'java.version' version of java the code is built against 
# use the system property java.specification.version 
# version string must be a sequence of nonnegative decimal integers 
# separated by "."'s and may have leading zeros 
java.version=${maven.compiler.target} 
# 
# 'elasticsearch.version' version of elasticsearch compiled against 
# You will have to release a new version of the plugin for each new 
# elasticsearch release. This version is checked when the plugin 
# is loaded so Elasticsearch will refuse to start in the presence of 
# plugins with the incorrect elasticsearch.version. 
elasticsearch.version=${elasticsearch.version} 
# 
### deprecated elements for jvm plugins : 
# 
# 'isolated': true if the plugin should have its own classloader. 
# passing false is deprecated, and only intended to support plugins 
# that have hard dependencies against each other. If this is 
# not specified, then the plugin is isolated by default. 
isolated=${elasticsearch.plugin.isolated} 
# 
+1

Я добавил этот файл вручную к загруженному zip для чуда, потому что по какой-то причине его не хватало, но по какой-то причине во время установки он все равно не найдет файл. есть ли у вас какие-либо рекомендации по этому поводу? –

3

Я только завершаю @ Ianky393 ответ с изображением, поэтому его можно намного проще понять.

Для плагина zip вам нужно, это обычно находится в папке src внутри загруженной папки. Если сначала находится папка site вместо _site, сначала переименуйте ее в _site. Убедитесь, что внутри zip выглядит так.

enter image description here