elasticsearch6.0+集成小试

这里将集成的过程及遇到的问题分享给大家,欢迎指出纠正

目标:集成两台机器上的三个节点,一台服务器上装一个es,另一个机器上安装两个es

配置文件:

三个es的elasticsearch.yml配置如下:

主节点
cluster.name: my-application
node.name: node-1
network.host:  10.10.129.21
http.port: 9200
#transport.tcp.port:9300
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["10.10.129.19","10.10.129.21"]

同一台机器的附节点:

cluster.name: my-application
node.name: node-2
network.host:  10.10.129.21
http.port: 9500
#transport.tcp.port:9300
http.cors.enabled: true
http.cors.allow-origin: "*"

node.data: true
discovery.zen.ping.unicast.hosts: ["10.10.129.21","10.10.129.19"]

另外一台机器的节点付:

cluster.name: my-application
node.name: node-12
network.host: 10.10.129.19
http.port: 9200
#transport.tcp.port:9300
http.cors.enabled: true
http.cors.allow-origin: "*"

node.data: true
discovery.zen.ping.unicast.hosts: ["10.10.129.21"]

 

head插件修改head/_site/app.js 

this.base_uri = this.config.base_uri ||  "http://10.10.129.21:9200";

因为this.base_uri  = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";中this.prefs.get("app-base_uri") 返回的值是“http://localhost:9200”,没找到在哪,所以果断去掉(这个地方弄了许久,因为网上搜的都是把localhost直接换成ip,但是this.prefs.get("app-base_uri")返回值了)

head/Gruntfile.js修改:connect: {
            server: {
                options: {
                    hostname:'*',
                    port: 9100,
                    base: '.',
                    keepalive: true
                }
            }
        }

 

注意:三个es的版本必须一致!!!!不然连不上,网上报x-pack的错误,但是我并没有装这个插件


failed to send join request to master [[Peter
Criss][HnGtgLAbS_CVmHZBKMQ5sQ][inet[/192.168.100.210:9300]]], reason
[org.elasticsearch.transport.RemoteTransportException: [Peter
Criss][inet[/192.168.100.210:9300]][discovery/zen/join];
org.elasticsearch.transport.RemoteTransportException: [Night
Nurse][inet[/192.168.100.90:9300]][discovery/zen/join/validate];
java.io.IOException: Expected handle header, got [56]]
[2014-02-03 19:30:43,834][WARN ][transport.netty ] [Night Nurse]
Message not fully read (request) for [4169] and action
[discovery/zen/join/validate], resetting\

 

版本一致就好了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值