windows 搭建es 集群 使用cerebro

    技术2022-07-11  101

    下载es地址 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-windows-x86_64.zip

    下载cerebro https://github.com/lmenezes/cerebro/releases/download/v0.8.3/cerebro-0.8.3.zip

    1.解压复制三份

    2.一次修改三个节点下配置文件

    具体操作:

    主节点node cluster.name: my-application node.name: node node.master: true node.attr.rack: r1 network.host: 127.0.0.1 http.port: 9200 transport.tcp.port: 9300 discovery.seed_hosts: ["127.0.0.1:9300","127.0.0.1:9302","127.0.0.1:9303"] cluster.initial_master_nodes: ["node","node-1","node-2"] node-1 cluster.name: my-application node.name: node-1 node.master: false node.attr.rack: r1 node.max_local_storage_nodes: 3 bootstrap.memory_lock: false network.host: 127.0.0.1 http.port: 9202 transport.tcp.port: 9302 discovery.seed_hosts: ["127.0.0.1:9300","127.0.0.1:9302","127.0.0.1:9303"] cluster.initial_master_nodes: ["node","node-1","node-2"] node-2 cluster.name: my-application node.name: node-2 node.master: false node.attr.rack: r1 bootstrap.memory_lock: false network.host: 127.0.0.1 http.port: 9203 transport.tcp.port: 9303 discovery.seed_hosts: ["127.0.0.1:9300","127.0.0.1:9302","127.0.0.1:9303"] cluster.initial_master_nodes: ["node","node-1","node-2"]

    3.依次启动三个节点,先启动主节点node --》node-1-》 node-2

     

    显示上面uuid则启动成功,或者浏览器输入127.0.0.1:9200

     

    4.启动cerebro

    5.访问

    6.链接成功

    这样就成功了。

    注意:

    注意: 如果启动集群过程中异常 报错with the same id but is a different node instance  直接删除data文件夹,重新启动

     

     

    设置es使用内存(heap)磁盘大小:

     

    修改文件E:\elasticsearch-7.3.2-windows-x86_64\elasticsearch-7.3.2_1  ----> jvm.options (另外两个节点还是1g)

    -Xms2g -Xmx2g

    Processed: 0.015, SQL: 10