使用 shuf 来打乱一个文件中的行或是选择文件中一个随机的行。

ELK7.2 启用安全认证功能 节点无法加到集群中

Elasticsearch | 作者 qq89267388 | 发布于2019年07月12日 | 阅读数:6571

我的集群是7.2版本 有3个节点 用的ubuntu系统
 
我按照文档https://www.elastic.co/cn/blog ... urity 描述去做
 
在主node上制作证书 ,把证书放到elasticsearch.yml同文件夹下,然后编辑yml
 
node.master: false
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: none
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
 
重启服务,之后在其他的三个节点上启用后发现设备无法发现其他节点 ,3个节点上都在报如下内容
 
[2019-07-12T18:13:48,485][WARN ][o.e.c.c.ClusterFormationFailureHelper] [node-2] master not discovered or elected yet, an election requires at least 2 nodes with ids from [vbb1tduMQxmNn9JnePQYsQ, swU3llhCQ6O2w-VrKyQB7A, ZcKI_W-rTKKO0-pq1lwpvA], have discovered [] which is not a quorum; discovery will continue using [10.106.1.108:9300, 10.106.1.110:9300] from hosts providers and [{node-2}{ZcKI_W-rTKKO0-pq1lwpvA}{JC5AcVIVQy2lsCO6G2tcwA}{10.106.1.109}{10.106.1.109:9300}{ml.machine_memory=8339894272, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 7, last-accepted version 26706 in term 7
 
请问该如何解决这个情况呢
 
已邀请:

qq89267388

赞同来自:

我现在发现即使我注释了
node.master: false
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: none
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
 
重启服务仍然无法连接 其他节点的9300端口
 

qq89267388

赞同来自:

有人遇到这个问题么...或者7.2版本有人成功启用认证功能么……?

zyy

赞同来自:

discovery.zen.ping.unicast.hosts配置了吗?
还有确认下防火墙是否限制了

qq89267388

赞同来自:

我查文档 发现7版本的命令已经改为discovery.seed_hosts: 这个已经配置了
 
防火墙也都是关闭的

zyy

赞同来自:

node.master: false这个配置是不作为master节点,如果三台都是一样的就没有master节点,当然起不来。看你的报错至少需要2个master备选节点。

zqc0512 - andy zhou

赞同来自:

master not discovered or elected yet, an election requires at least 2 nodes 
need more master node.

qq89267388

赞同来自:

饿。。这个问题 我解决了 貌似 是因为 在指定证书位置的时候应该指定证书路径,而不是写一个名字
 
xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/elastic-certificates.p12

xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/elastic-certificates.p12
 

qq89267388

赞同来自:

但是 我在进行抓包的时候 发现 好像用的还是TCP的报文

xialll

赞同来自:

我出现了这个问题,集群有3主节点可以参与选主
但是节点1报错
master not discovered or elected yet, an election requires at least 3 nodes with ids from
节点2报错
master not discovered or elected yet, an election requires at least 2 nodes with ids from
节点3报错
master not discovered or elected yet, an election requires at least 2 nodes with ids from
 
出现这个问题是因为我把集群所有的节点都停止了,然后设置安全认证功能,设置好之后然后再启动每个节点,就出现了这个问题,然后我把安全认证功能去掉之后,配置文件恢复到原来的状态,然后重启每个节点,还是出现这个错误,目前还没有解决

要回复问题请先登录注册