在 Mapping 里面,将 dynamic 参数设置成 strict 可以拒绝索引包含未知字段的文档。 此条 Tips 由 medcl 贡献。

3主机3节点es7.1.1集群启动报如下问题

Elasticsearch | 作者 jhondom | 发布于2019年10月15日 | 阅读数:2207

使用es7.1.1搭建3主机的es集群,两台slave节点均报如下信息,请各位老师帮忙看下哪里出问题?
slave1:
[2019-10-15T11:19:44,288][WARN ][o.e.c.c.ClusterFormationFailureHelper] [slave41] master not discovered yet: have discovered []; discovery will continue using [10.252.7.39:9300, 10.252.7.40:9300] from hosts providers and [{slave41}{4nUI2RrjREOFW2ydRz1zXw}{5_Dtl_vPSLK436YnBQNfEw}{10.252.7.41}{10.252.7.41:9300}{ml.machine_memory=8237297664, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2019-10-15T11:19:54,288][WARN ][o.e.c.c.ClusterFormationFailureHelper] [slave41] master not discovered yet: have discovered []; discovery will continue using [10.252.7.39:9300, 10.252.7.40:9300] from hosts providers and [{slave41}{4nUI2RrjREOFW2ydRz1zXw}{5_Dtl_vPSLK436YnBQNfEw}{10.252.7.41}{10.252.7.41:9300}{ml.machine_memory=8237297664, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
slave2:
[2019-10-15T11:20:12,687][WARN ][o.e.c.c.ClusterFormationFailureHelper] [slave40] master not discovered yet: have discovered []; discovery will continue using [10.252.7.39:9300, 10.252.7.41:9300] from hosts providers and [{slave40}{Ur7xDujXTTeoLaRkOkKlNg}{QN0QknqDTBiL8bhSzVeqzg}{10.252.7.40}{10.252.7.40:9300}{ml.machine_memory=8237297664, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
[2019-10-15T11:20:22,688][WARN ][o.e.c.c.ClusterFormationFailureHelper] [slave40] master not discovered yet: have discovered []; discovery will continue using [10.252.7.39:9300, 10.252.7.41:9300] from hosts providers and [{slave40}{Ur7xDujXTTeoLaRkOkKlNg}{QN0QknqDTBiL8bhSzVeqzg}{10.252.7.40}{10.252.7.40:9300}{ml.machine_memory=8237297664, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
 
master日志正常:
[2019-10-15T10:57:57,430][INFO ][o.e.p.PluginsService     ] [master39] loaded module [percolator]
[2019-10-15T10:57:57,430][INFO ][o.e.p.PluginsService     ] [master39] loaded module [rank-eval]
[2019-10-15T10:57:57,430][INFO ][o.e.p.PluginsService     ] [master39] loaded module [reindex]
[2019-10-15T10:57:57,431][INFO ][o.e.p.PluginsService     ] [master39] loaded module [repository-url]
[2019-10-15T10:57:57,431][INFO ][o.e.p.PluginsService     ] [master39] loaded module [transport-netty4]
[2019-10-15T10:57:57,431][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-ccr]
[2019-10-15T10:57:57,431][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-core]
[2019-10-15T10:57:57,431][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-deprecation]
[2019-10-15T10:57:57,431][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-graph]
[2019-10-15T10:57:57,431][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-ilm]
[2019-10-15T10:57:57,432][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-logstash]
[2019-10-15T10:57:57,432][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-ml]
[2019-10-15T10:57:57,432][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-monitoring]
[2019-10-15T10:57:57,432][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-rollup]
[2019-10-15T10:57:57,432][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-security]
[2019-10-15T10:57:57,432][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-sql]
[2019-10-15T10:57:57,432][INFO ][o.e.p.PluginsService     ] [master39] loaded module [x-pack-watcher]
[2019-10-15T10:57:57,433][INFO ][o.e.p.PluginsService     ] [master39] no plugins loaded
[2019-10-15T10:58:00,602][INFO ][o.e.x.s.a.s.FileRolesStore] [master39] parsed [0] roles from file [/app/elasticsearch-7.1.1/config/roles.yml]
[2019-10-15T10:58:01,061][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [master39] [controller/16361] [Main.cc@109] controller (64 bit): Version 7.1.1 (Build fd619a36eb77df) Copyright (c) 2019 Elasticsearch BV
[2019-10-15T10:58:01,449][DEBUG][o.e.a.ActionModule       ] [master39] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-10-15T10:58:01,746][INFO ][o.e.d.DiscoveryModule    ] [master39] using discovery type [zen] and seed hosts providers [settings]
[2019-10-15T10:58:02,539][INFO ][o.e.n.Node               ] [master39] initialized
[2019-10-15T10:58:02,540][INFO ][o.e.n.Node               ] [master39] starting ...
[2019-10-15T10:58:02,651][INFO ][o.e.t.TransportService   ] [master39] publish_address {10.252.7.39:9301}, bound_addresses {10.252.7.39:9301}
[2019-10-15T10:58:02,660][INFO ][o.e.b.BootstrapChecks    ] [master39] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2019-10-15T10:58:02,697][INFO ][o.e.c.c.Coordinator      ] [master39] cluster UUID [a82GpwMjQXucu_tLx9zFMA]
[2019-10-15T10:58:02,870][INFO ][o.e.c.s.MasterService    ] [master39] elected-as-master ([1] nodes joined)[{master39}{4BeCVOZIROWBnJvvTnmKBg}{dHNCYYoOSOmatLnpMy_DaA}{10.252.7.39}{10.252.7.39:9301}{ml.machine_memory=8237297664, xpack.installed=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 2, version: 16, reason: master node changed {previous [], current [{master39}{4BeCVOZIROWBnJvvTnmKBg}{dHNCYYoOSOmatLnpMy_DaA}{10.252.7.39}{10.252.7.39:9301}{ml.machine_memory=8237297664, xpack.installed=true, ml.max_open_jobs=20}]}
[2019-10-15T10:58:02,981][INFO ][o.e.c.s.ClusterApplierService] [master39] master node changed {previous [], current [{master39}{4BeCVOZIROWBnJvvTnmKBg}{dHNCYYoOSOmatLnpMy_DaA}{10.252.7.39}{10.252.7.39:9301}{ml.machine_memory=8237297664, xpack.installed=true, ml.max_open_jobs=20}]}, term: 2, version: 16, reason: Publication{term=2, version=16}
[2019-10-15T10:58:03,033][INFO ][o.e.h.AbstractHttpServerTransport] [master39] publish_address {10.252.7.39:9200}, bound_addresses {10.252.7.39:9200}
[2019-10-15T10:58:03,033][INFO ][o.e.n.Node               ] [master39] started
[2019-10-15T10:58:03,155][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [master39] Failed to clear cache for realms [[]]
[2019-10-15T10:58:03,202][INFO ][o.e.l.LicenseService     ] [master39] license [03e22bd3-743c-453d-9512-826b71bc16be] mode [basic] - valid
[2019-10-15T10:58:03,218][INFO ][o.e.g.GatewayService     ] [master39] recovered [0] indices into cluster_state
 
 
 
 
master与slave的elasticsearch.yml文件配置:
master配置:
cluster.name: dh-elasticsearch
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 80%
cluster.routing.allocation.disk.watermark.high: 80%
node.name: master39
node.master: true
path.data: /app/data
path.logs: /app/es_logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 10.245.7.39
http.port: 9200
discovery.seed_hosts: ["10.245.7.39", "10.245.7.40", "10.245.7.41"]
cluster.initial_master_nodes: ["10.245.7.39"]
transport.tcp.port: 9301
http.cors.enabled: true
http.cors.allow-origin: 
 
 
slave1配置:

cluster.name: dh-elasticsearch
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 80%
cluster.routing.allocation.disk.watermark.high: 80%
node.name: slave40
node.master: true
path.data: /app/data
path.logs: /app/es_logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 10.245.7.40
http.port: 9200
discovery.seed_hosts: ["10.245.7.39", "10.245.7.40", "10.245.7.41"]
cluster.initial_master_nodes: ["10.245.7.39"]
http.cors.enabled: true
http.cors.allow-origin: 
 
 
slave2配置:
cluster.name: dh-elasticsearch
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 80%
cluster.routing.allocation.disk.watermark.high: 80%
node.name: slave41
node.master: true
path.data: /app/data
path.logs: /app/es_logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 10.245.7.41
http.port: 9200
discovery.seed_hosts: ["10.245.7.39", "10.245.7.40", "10.245.7.41"]
cluster.initial_master_nodes: ["10.245.7.39"]
http.cors.enabled: true
http.cors.allow-origin: 
 
slave1.png
已邀请:

LZY_lee

赞同来自:

master的配置transport.tcp.port: 9301  其他两个节点加上,或者master删掉

jhondom

赞同来自:

已经解决,多谢

要回复问题请先登录注册