zoukankan      html  css  js  c++  java
  • elasticsearch 安装head

    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
            }
        }
    }



  • 相关阅读:
    第02组 Beta冲刺 总结
    第02组 Beta冲刺 (5/5)
    第02组 Beta冲刺 (4/5)
    第02组 Beta冲刺 (3/5)
    第02组 Beta冲刺 (2/5)
    第02组 Beta冲刺 (1/5)
    关于IE6中做兼容的那点事。
    一个ajax同步与异步引发的血案。
    浅谈Jquery中的bind(),live(),delegate(),on()绑定事件方式
    浅谈Dictionary用法
  • 原文地址:https://www.cnblogs.com/agang-php/p/11143494.html
Copyright © 2011-2022 走看看