启动节点\数据时elasticsearch节点\主控更改为脱机

33qvvth1  于 2021-06-13  发布在  ElasticSearch
关注(0)|答案(0)|浏览(434)

我的服务器ec2有两个节点,当我启动时 node_data 按命令 /home/esdata/bin/elasticsearch , node_master 正在运行更改为脱机
登录 node_data ,有消息错误:

[2020-12-15T18:08:57,391][WARN ][o.e.c.c.ClusterFormationFailureHelper] [node_data_1] master not discovered yet: have discovered [{node_data_1}{elNK7JY9S4-E51sUY5zitw}{cDTkyu3bTmypDseY7IFrxw}{localhost}{127.0.0.1:8300}{drt}{xpack.installed=true, transform.node=true}]; discovery will continue using [127.0.0.1:9300] from hosts providers and [] from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2020-12-15T18:09:07,392][WARN ][o.e.c.c.ClusterFormationFailureHelper] [node_data_1] master not discovered yet: have discovered [{node_data_1}{elNK7JY9S4-E51sUY5zitw}{cDTkyu3bTmypDseY7IFrxw}{localhost}{127.0.0.1:8300}{drt}{xpack.installed=true, transform.node=true}]; discovery will continue using [127.0.0.1:9300] from hosts providers and [] from last-known cluster state; node term 0, last-accepted version 0 in term 0

我试着 curl 它,结果是:

root@ip-xxx:~# curl -XGET http://localhost:9201
{
  "name" : "node_data_1",
  "cluster_name" : "eslasticsearch",
  "cluster_uuid" : "_na_",
  "version" : {
    "number" : "7.9.1",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "083627f112ba94dffc1232e8b42b73492789ef91",
    "build_date" : "2020-09-01T21:22:21.964974Z",
    "build_snapshot" : false,
    "lucene_version" : "8.6.2",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
root@ip-xxx:~# curl -XGET http://localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused

配置 node_master/etc/elasticsearch/elasticsearch.yml ```
cluster.name: elasticsearch

node.name: node_master
node.master: true
node.data: true
node.ingest: false
node.ml: false

transport.host: localhost
transport.tcp.port: 9300

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

network.host: 0.0.0.0
http.port: 9200

discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:8300"]
cluster.initial_master_nodes: ["node_master"]

和配置 `node_data` 在 `/home/esdata/config.yml` ```
cluster.name: elasticsearch

node.name: node_data_1
node.master: false
node.data: true
node.ingest: false
node.ml: false

transport.host: localhost
transport.tcp.port: 8300

network.host: 0.0.0.0
http.port: 9201

discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:8300"]

有人能帮我修一下吗?我必须运行两个es示例吗?我该怎么做?
提前谢谢。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题