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\

版本一致就好了

猜你喜欢

转载自blog.csdn.net/oneLifeDoubleL/article/details/81189306