Elasticsearch-sql 5.4.0插件的安装与常见错误

插件地址

https://github.com/NLPchina/elasticsearch-sql

安装步骤

下载elasticsearch-sql插件
./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.0.0/elasticsearch-sql-5.4.0.0.zip

这里写图片描述

5.0以上版本还需要下载:
wget https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip

这里写图片描述

解压:
unzip es-sql-site-standalone.zip -d es-sql-site

cd es-sql-site/site-server

npm install express --save

node node-server.js 

这时就可以查询了:

http://localhost:9200/_sql?sql=select * from indexName limit 10

修改部分配置文件


  • 修改访问端口号
cd es-sql-site/site-server

vim site_configuration.json

将8080,改为9400:
{
        "port":9400
}

  • 修改elasticsearch.yml
    在安装了kibana和xpack后,在页面上查询会报以下错误:
Error:Error occured! response is not avalible.

这里写图片描述

修改elasticsearch配置文件,添加cors:

http.cors.enabled: true
http.cors.allow-credentials: true
http.cors.allow-origin: "/.*/"
http.cors.allow-headers: WWW-Authenticate,X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization

  • 安装了xpack不想输入用户名密码

修改elasticsearch.yml,添加:

xpack.security.enabled: false
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值