7

实际上我有elasticsearch 5.1.1并尝试使用以下命令下载kopf插件,但出现这样的错误..你能帮我解决这个问题吗?

C:\Users\896323\Downloads\elasticsearch-5.1.1\elasticsearch-5.1.1\bin>plugin install lmenezes/elasticsearch-kopf/2.1.1 一个管理已安装elasticsearch插件的工具

命令

  • list - 列出已安装的 elasticsearch 插件
  • install - 安装插件
  • remove - 从 elasticsearch 中删除插件

非选项参数:命令

选项说明 ------ ------------

  • -h, --help 显示帮助
  • -s, --silent 显示最小输出
  • -v, --verbose 显示详细输出

错误:未知插件 lmenezes/elasticsearch-kopf/2.1.1

4

2 回答 2

4

据我所知,在 Elasticsearch 版本 5 中,不可能将站点插件添加到 Elasticsearch 中,所有站点插件都必须作为 kibana 插件实现。 插件更改弹性 v5

另一方面,kopf 创建者正在为 elasticsearch > v5 开发隔离插件

你可以在这里查看:

https://github.com/lmenezes/cerebro

于 2017-02-15T14:19:12.610 回答
1

您尝试使用的插件与您的 elasticsearch 版本 5.x 不兼容。

此外,插件 uri“lmenezes/elasticsearch-kopf/2.1.1”没有兼容的依赖关系,这会导致您已经提到的错误“未知插件 lmenezes/elasticsearch-kopf/2.1.1”。其他插件 uri 依赖项是未知的,并且生产者未提交。

我试图在elasticsearch的插件空间之外使用localy kopf插件,但如果没有配置,那将无法正常工作。

替代插件 Head 也不适用于 es 版本 5.1,这使情况变得更糟。

如果有人知道除了对这些插件进行自定义修改之外的一些不错的选择,我会很高兴。

解决方案 1:

使用此处描述的独立头插件: https ://github.com/mobz/elasticsearch-head#running-with-built-in-server

重要的部分是为您的 es-5.x 启用 cors

解决方案 2: 从此处使用独立的 kopf 插件:https ://github.com/lmenezes/elasticsearch-kopf/blob/master/README.md

  1. 克隆或下载源代码
  2. 通过 elasticsearch.yml 修改为 es-5.x 启用 cors
  3. 修改/自定义 kopf 源

步骤1

git clone git://github.com/lmenezes/elasticsearch-kopf.git

第2步

修改 elasticsearch.yml

#enable cors for standalone plugins
http.cors.enabled: true
http.cors.allow-origin: "*"

步骤 3 在 中添加弹性搜索端口的属性_site/kopf_external_settings.json。样本

{
    "elasticsearch_root_path": "",
    "elasticsearch_port": 9200,
    "with_credentials": false,
    "theme": "dark",
    "refresh_rate": 5000
}

修改_site/dist/kopf.js的javascript

1-为从行开始的端口值添加一个常量5562

var ES_PORT = 'elasticsearch_port';

2-为从行开始的属性添加一个吸气剂5615

this.getElasticsearchPort = function () {
    return this.getSettings()[ES_PORT];
};

3-替换$location.port();ExternalSettingsService.getElasticsearchPort();在线1269

4-避免从在线1215 示例开始的版本兼容性警报的紧张数量可能是不同的版本,尽管抛出警报一次

    $scope.version = '2.1.2';

    $scope.modal = new ModalControls();
    var alertedOnce = false;

    $scope.$watch(
        function () {
            return ElasticService.cluster;
        },
        function (newValue, oldValue) {
            var version = ElasticService.getVersion();
            if (version && version.isValid()) {
                var major = version.getMajor();
                if (major != parseInt($scope.version.charAt(0)) && !alertedOnce) {
                    AlertService.warn(
                        'This version of kopf is not compatible with your ES version',
                        'Upgrading to newest supported version is recommeded'
                    );
                    alertedOnce = true;
                }
            }
        }
    );
于 2016-12-27T13:21:22.560 回答