问题

一直在研究ES的监控怎么做,想偷点懒,不去通过API获取然后计算,就想找个现成的插件或者监控软件,只要装个agent就可以,然后就找到了x-pack,插件装好了之后,需要重启ES集群,线上的ES集群我想着既然是集群一台一台重启应该不会有问题的,太高估了,重启一台后,整个集群挂了......
 

操作过程

1、系统
[centos@ip---- bin]$ cat /etc/redhat-release
CentOS Linux release 7.6. (Core)
2、ES版本
[centos@ip---- bin]$ ./elasticsearch --version
Version: 5.0., Build: f6b4951/--24T10::.101Z, JVM: 1.8.0_131

3、杀进程

ps -ef | grep pid
kill - pid

这样操作完就后悔了,不是每个服务都是这么杀的,不知道这步操作对集群挂了有没有一定的影响。

4、报错信息

[--17T08::,][INFO ][o.e.p.PluginsService     ] [node-] loaded module [lang-painless]
[--17T08::,][INFO ][o.e.p.PluginsService ] [node-] loaded module [percolator]
[--17T08::,][INFO ][o.e.p.PluginsService ] [node-] loaded module [reindex]
[--17T08::,][INFO ][o.e.p.PluginsService ] [node-] loaded module [transport-netty3]
[--17T08::,][INFO ][o.e.p.PluginsService ] [node-] loaded module [transport-netty4]
[--17T08::,][INFO ][o.e.p.PluginsService ] [node-] no plugins loaded
[--17T08::,][INFO ][o.e.n.Node ] [node-] initialized
[--17T08::,][INFO ][o.e.n.Node ] [node-] starting ...
[--17T08::,][INFO ][o.e.t.TransportService ] [node-] publish_address {172.0.0.16:}, bound_addresses {172.30.36.146:}
[--17T08::,][INFO ][o.e.b.BootstrapCheck ] [node-] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks [--17T08::,][WARN ][o.e.n.Node ] [node-] timed out while waiting for initial discovery state - timeout: 30s
[--17T08::,][INFO ][o.e.h.HttpServer ] [node-] publish_address {172.0.0.16:}, bound_addresses {172.30.36.146:}
[--17T08::,][INFO ][o.e.n.Node ] [node-] started
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.i.c.TransportCreateIndexAction] [node-] no known master node, scheduling a retry
[--17T08::,][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [node-] timed out while retrying [cluster:monitor/state] after failure (timeout [30s])
[--17T08::,][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [node-] timed out while retrying [cluster:monitor/state] after failure (timeout [30s])
[--17T08::,][WARN ][r.suppressed ] path: /_cluster/state/metadata, params: {metric=metadata}
org.elasticsearch.discovery.MasterNotDiscoveredException
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$.onTimeout(TransportMasterNodeAction.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.service.ClusterService$NotifyTimeout.run(ClusterService.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:) [elasticsearch-5.0..jar:5.0.]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:) [?:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:) [?:1.8.0_151]
at java.lang.Thread.run(Thread.java:) [?:1.8.0_151]
[--17T08::,][WARN ][r.suppressed ] path: /_cluster/state/metadata, params: {metric=metadata}
org.elasticsearch.discovery.MasterNotDiscoveredException
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$.onTimeout(TransportMasterNodeAction.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.service.ClusterService$NotifyTimeout.run(ClusterService.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:) [elasticsearch-5.0..jar:5.0.]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:) [?:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:) [?:1.8.0_151]
at java.lang.Thread.run(Thread.java:) [?:1.8.0_151]
[--17T08::,][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [node-] timed out while retrying [cluster:monitor/state] after failure (timeout [30s])
[--17T08::,][WARN ][r.suppressed ] path: /_cluster/state/metadata, params: {metric=metadata}
org.elasticsearch.discovery.MasterNotDiscoveredException
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$.onTimeout(TransportMasterNodeAction.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.cluster.service.ClusterService$NotifyTimeout.run(ClusterService.java:) [elasticsearch-5.0..jar:5.0.]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:) [elasticsearch-5.0..jar:5.0.]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:) [?:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:) [?:1.8.0_151]
at java.lang.Thread.run(Thread.java:) [?:1.8.0_151]
 
 
5、配置文件
cluster.name: lile
node.name: node-
bootstrap.memory_lock: true
network.host: 172.0.0.16
http.port:
discovery.zen.ping.unicast.hosts: ["172.0.0.16","172.0.0.17","172.0.0.18"]
discovery.zen.minimum_master_nodes:
http.cors.enabled: true
http.cors.allow-origin: "*"
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs

三、解决办法

各种重启都没有,在网上查到的,都是重启就好了,但是使劲的重启也没好。但是当discovery.zen.minimum_master_nodes这个值设置为1的时候,可以启动成功,但是三台都成了master了。后来看到有个这个参数,加上然后全部重启就好了。
 
 
discovery.zen.ping_timeout: 60s

四、分析原因

还没细究,感觉是集群互相查找的时间太短了,没有找到对方,因为得2台才能形成集群
 

ES三节点重启后报错no known master node的更多相关文章

  1. oracle centos 重启后报错ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

    oracle centos 重启后报错ORA-12514, TNS:listener does not currently know of service requested in connect d ...

  2. idea添加插件后重启后报错:cannot load project xxxx 解决方案

    问题原因:新安装的idea下载插件后重启报错 找到windows上c:\Users\.IntelliJIdea<版本>\config\plugins\这个目录,然后 将对应插件删除

  3. 运行.xcworkspace项目后报错:'React/RCTBundleURLProvider.h’ file not found

    情况:根据https://github.com/rebeccahughes/react-native-device-info添加依赖库,运行.xcworkspacea项目后报错 解决:Delete n ...

  4. 三节点搭建openstack-Mitaka版本

    前言: 现在的云计算平台已经非常火,也非常的稳定了.像阿里云平台,百度云平台等等,今天咱们基于openstack来搭建一个云平台 注意: 本次平台搭建为三节点搭建(没有外部存储节点,所有存储为本地存储 ...

  5. 部署elasticsearch(三节点)集群+filebeat+kibana

    用途 ▷ 通过各个beat实时收集日志.传输至elasticsearch集群 ▷ 通过kibana展示日志 实验架构 名称:IP地址:CPU:内存 kibana&cerebro:192.168 ...

  6. legend3---用Homestead配置后报错“No input file specified.”

    legend3---用Homestead配置后报错“No input file specified.” 一.总结 一句话总结: 自己项目上传到github的时候多增加了一层legend3的github ...

  7. OceanBase三节点部署&&扩容

    OceanBase三节点部署&&扩容 环境信息搭建三节点(1-1-1)创建资源池和租户查看数据分布 环境信息 IP OB目录 端口 192.168.43.89 /data/observ ...

  8. elasticsearch之节点重启

    Elasticsearch节点重启时背后发生的故事有哪些,应该注意哪些配置内容,本篇文章做一个简单的探讨. 节点离开 在elasticsearch集群中,假设NodeA因为种种原因退出集群,在Node ...

  9. 理解 OpenStack Swift (1):OpenStack + 三节点Swift 集群+ HAProxy + UCARP 安装和配置

    本系列文章着重学习和研究OpenStack Swift,包括环境搭建.原理.架构.监控和性能等. (1)OpenStack + 三节点Swift 集群+ HAProxy + UCARP 安装和配置 ( ...

随机推荐

  1. 自己在WEB学习过程中遇到的问题

    问题一: 下面这两段代码差别不大,为何test1结果不同: 代码1: public void doGet(HttpServletRequest request, HttpServletResponse ...

  2. Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决

    参考:https://blog.csdn.net/lichangzai/article/details/39501025 如果执行sudo命令的用户没有执行sudo的权限,执行sudo命令时会报下面的 ...

  3. Alodi:为了保密我开发了一个系统

    每天都在愉快的造轮子,这次可以一键创建测试环境 咖啡君维护了几十个不同类型项目,其中有相当一部分项目是对保密性有很高要求的,也就是说下个版本要上线的内容是不能提前泄露的,就像苹果新产品的介绍网站决不允 ...

  4. 人体行为识别(骨架提取),搭建openpose环境,VS2019(python3.7)+openpose

    这几天开始接触人体行为识别,经过多方对比后,选择了现在最热的人体骨架提取开源库,openpose. 下面就不多说了,直接开始openpose在win10下的配置: 需求如下:1. VS2019    ...

  5. FreeSql (三十五)CodeFirst 自定义特性

    比如项目内已经使用了其它 orm,如 efcore,这样意味着实体中可能存在 [Key],但它与 FreeSql [Column(IsPrimary = true] 不同. Q: FreeSql 实体 ...

  6. 调用webservice获取电话号码归属地信息

    首先什么是webservice ? 从广义上面讲,任何一个服务器所提供的"数据","内容","方法"等等都可以理解为webservice. ...

  7. Android中px dpi dip density densityDpi 的相关说明

    转自:http://www.cnblogs.com/wader2011/archive/2011/11/29/2267490.html 概念解释 名词 解释 Px (Pixel像素) 不同设备显示效果 ...

  8. Winform中通过代码设置DevExpress的TextEdit的类型为Numbernic

    场景 使用DevExpress的EditText控件时,需要限制其输入类型为数字. 正常来说是窗体上拖拽一个TextEdit,然后在设计窗口点击小三角,选择Change Mask 但是如果说TextE ...

  9. Winform中使用zxing实现二维码生成(附dll下载)

    场景 zxing.dll下载 https://download.csdn.net/download/badao_liumang_qizhi/11623214 效果 实现 新建Winform程序,将上面 ...

  10. django配置静态文件的两种方法

    方法一:按照django配置静态文件的方法,可以在APP应用目录下创建一个static的文件夹,然后在static文件夹下创建一个和APP同名的文件夹,如我有一个blog的django项目,在下面有一 ...