如何在集群模式下启动Elasticsearch?

时间:2019-07-16 03:30:37

标签: linux elasticsearch amazon-ec2

在同一VPC /子网中的2台EC2服务器上启动ES之前,如何设置正确的配置文件。

到目前为止,我在config/elasticsearch.yml中尝试了此操作:

node.name: mymaster
cluster.initial_master_nodes: ["172.31.27.57"]
network.bind_host: 172.31.27.57
network.publish_host: 172.31.27.57
transport.host: localhost

然后从./bin/elasticsearch开始。

获取错误:

2019-07-16T03:28:03,010][INFO ][o.e.t.TransportService   ] [mymaster] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2019-07-16T03:28:03,029][WARN ][o.e.b.BootstrapChecks    ] [mymaster] max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2019-07-16T03:28:03,055][INFO ][o.e.c.c.ClusterBootstrapService] [mymaster] skipping cluster bootstrapping as local node does not match bootstrap requirements: [172.31.27.57]
[2019-07-16T03:28:13,058][WARN ][o.e.c.c.ClusterFormationFailureHelper] [mymaster] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [172.31.27.57] to bootstrap a cluster: have discovered []; discovery will continue using [127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{mymaster}{PIHDT0-yQ6mY8q2vbFPZxA}{HhBcI1jLSPW9wqGvYWs8Vw}{localhost}{127.0.0.1:9300}{ml.machine_memory=2088472576, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2019-07-16T03:28:23,071][WARN ][o.e.c.c.ClusterFormationFailureHelper] [mymaster] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [172.31.27.57] to bootstrap a cluster: have discovered []; discovery will continue using [127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{mymaster}{PIHDT0-yQ6mY8q2vbFPZxA}{HhBcI1jLSPW9wqGvYWs8Vw}{localhost}{127.0.0.1:9300}{ml.machine_memory=2088472576, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2019-07-16T03:28:33,073][WARN ][o.e.c.c.ClusterFormationFailureHelper] [mymaster] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [172.31.27.57] to bootstrap a cluster: have discovered []; discovery will continue using [127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{mymaster}{PIHDT0-yQ6mY8q2vbFPZxA}{HhBcI1jLSPW9wqGvYWs8Vw}{localhost}{127.0.0.1:9300}{ml.machine_memory=2088472576, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2019-07-16T03:28:33,125][WARN ][o.e.n.Node               ] [mymaster] timed out while waiting for initial discovery state - timeout: 30s
[2019-07-16T03:28:33,132][INFO ][o.e.h.AbstractHttpServerTransport] [mymaster] publish_address {172.31.27.57:9200}, bound_addresses {172.31.27.57:9200}
[2019-07-16T03:28:33,133][INFO ][o.e.n.Node               ] [mymaster] started
[2019-07-16T03:28:43,076][WARN ][o.e.c.c.ClusterFormationFailureHelper] [mymaster] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [172.31.27.57] to bootstrap a cluster: have discovered []; discovery will continue using [127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{mymaster}{PIHDT0-yQ6mY8q2vbFPZxA}{HhBcI1jLSPW9wqGvYWs8Vw}{localhost}{127.0.0.1:9300}{ml.machine_memory=2088472576, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

0 个答案:

没有答案