首页 > 其他 > 详细

elasticsearch 安装head

时间:2019-07-06 18:25:24      阅读:104      评论:0      收藏:0      [点我收藏+]

git clone https://github.com/mobz/elasticsearch-head.git

yum install nodejs

npm install

 

修改Elasticsearch配置,允许跨域访问,修改后重新启动Elasticsearch

vi elasticsearch-7.1.1/config/elasticsearch.yml

#添加如下配置,支持跨域访问

http.cors.enabled: true
http.cors.allow-origin: "*"

启动

# elasticsearch-head目录下执行

npm run start

 

 

报错

 ./bin/elasticsearch
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2019-07-06T17:36:30,052][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [agangdeMacBook-Pro.local] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/docker/elasticsearch-7.1.1/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?

解决

原因:线程占用

解决:重新启动

step1:杀死elasticsearch线程
ps -ef | grep elastic

kill -9 XXX

修改 elasticsearch-head 目录下的 Gruntfile.js 文件,在 options 属性内增加 hostname,设置为 0.0.0.0。

connect: {
    server: {
        options: {
            hostname: ‘0.0.0.0‘,
            port: 9100,
            base: ‘.‘,
            keepalive: true
        }
    }
}



elasticsearch 安装head

原文:https://www.cnblogs.com/agang-php/p/11143494.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!