笔者在自己的 ubuntu 服务器上使用 GET /_cat/health?v 命令时,返回值如下所示

可以看到集群状态为 yellow,这是什么意思呢?原来在 es 的集群状态中,有三种情况,官网描述如下。

  • RED: Some or all of (primary) shards are not ready.

  • YELLOW: Elasticsearch has allocated all of the primary shards, but some/all of the replicas have not been allocated.

  • GREEN: Great. Your cluster is fully operational. Elasticsearch is able to allocate all shards and replicas to machines within the cluster.

由此可知,我们的分片副本还没有被分配到某个节点上。这是因为笔者目前的 es 集群由单节点组成,副本集没有足够的节点容纳它。解决办法也非常简单,由于笔者最近都是单机演示,这里也给出单机的解决方案(然并卵)。

笔者的 es 实例文件夹放在 elasticsearch\elasticsearch-5.2.2 文件夹下,将其复制一份为 elasticsearch\elasticsearch-5.2.2_node 放在同个文件夹下,然后按照正常步骤启动即可。再次使用 GET /_cat/health?v 查看时,便会返回一下内容

{
"cluster_name": "elasticsearch",
"status": "green",
"timed_out": false,
"number_of_nodes": 2,
"number_of_data_nodes": 2,
"active_primary_shards": 6,
"active_shards": 12,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0,
"task_max_waiting_in_queue_millis": 0,
"active_shards_percent_as_number": 100
}

Elasticsearch 健康状态处理的更多相关文章

  1. Elasticsearch 集群和索引健康状态及常见错误说明

    之前在IDC机房线上环境部署了一套ELK日志集中分析系统, 这里简单总结下ELK中Elasticsearch健康状态相关问题, Elasticsearch的索引状态和集群状态传达着不同的意思. 一.  ...

  2. elasticsearch集群健康状态查看

    1. 查看ES集群健康状态 http://localhost:9200/_cluster/health?pretty 响应: { "cluster_name" : "if ...

  3. nginx自动检测后台服务器健康状态

    转自http://www.iyunv.com/thread-38535-1-1.html 公司业务线上对后端节点的健康检查是通过nginx_upstream_check_module模块做的,这里我将 ...

  4. Tengine笔记3:Nginx的反向代理和健康状态检查

    通常代理服务器只用于处理内部网络对Intenet的请求,客户端必须通过代理服务器把本来要发送到Web服务器上的请求通过代理服务器分发给Web服务器,Web服务器响应时再通过代理服务器把响应发给客户端: ...

  5. Varnish后端主机的健康状态检查

    author:JevonWei 版权声明:原创作品 配置后端主机的Health Check 环境 Varnish 192.168.198.139 图片服务端 192.168.198.120 程序服务端 ...

  6. nginx_upstream_check_module-master对nginx的后端机器进行健康状态检查报403错误【转】

    在nginx.conf配置文件中 在server添加 location /nstatus { check_status; access_log off; #allow 192.168.2.11; #d ...

  7. 如何编写LVS对Real Server的健康状态检测脚本

    简介:Linux 虚拟服务器(Linux Virtual Server. LVS),是一个由章文松开发的自由软件.利用KVS可以实现高可用的.可伸缩缩的Web, Mail, Cache和Medial等 ...

  8. WEB缓存系统之varnish代理以及健康状态检测配置

    前文我们聊了下varnish的缓存项修剪配置,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/12666406.html:今天我来说一下varnish作为代理服务 ...

  9. 使用collectd+influxdb+grafna监控进程的健康状态

    一,前言 本文将介绍如何使用collectd+influxdb+grafna进行进程的监控,监控项为:进程健康状态. 思路为:使用collectd的processes插件进行程序进程的监控,储存到in ...

随机推荐

  1. web 前端遇到的问题

    前端小白一枚,经常遇到一些小问题,但是解决完吧,又记不住,哎,好记性不如烂笔头咯 1. 如何在js代码中设置checkbox选中? $("#select").attr('check ...

  2. 55. Jump Game (Array; Greedy)

    Given an array of non-negative integers, you are initially positioned at the first index of the arra ...

  3. phpStudy7——MySql数据库的增删查改

    1. 添加数据: //添加数据 $strsql = "insert into user_info(userId,userName,phoneNumber,userScore,dataTime ...

  4. ios 点击Home问题

    应用可以在后台运行或者挂起,该场景的状态跃迁过程见图2-22,共经历3个阶段4个状态:Active → Inactive → Background→Suspended. q   在Active→Ina ...

  5. repeater嵌套RadioButtonList赋值

    <asp:Repeater ID="Repeater1" runat="server"         onitemdatabound="Rep ...

  6. DataTable的序列化和反序列化

    /// <summary> /// DataTable序列化 /// </summary> /// <param name="dt"></ ...

  7. css布局---各种居中

    居中是我们使用css来布局时常遇到的情况.使用css来进行居中时,有时一个属性就能搞定,有时则需要一定的技巧才能兼容到所有浏览器,本文就居中的一些常用方法做个简单的介绍. 注:本文所讲方法除了特别说明 ...

  8. python基础之删除文件及删除目录的方法-乾颐堂

    下面来看一下python里面是如何删除一个文件及文件夹的~~ 首先引入OS模块 import os 删除文件: os.remove() 删除空目录: os.rmdir() 递归删除空目录: os.re ...

  9. dedecms目录说明

    1.有多个common.inc.php文件,注意引入的是哪一个,引入以后,里面的常量才可以用: 2.路径向上跳转 require_once('../../plus/phpexcel/PHPExcel. ...

  10. Laravel 5.5 Api

    Laravel api token验证使用方法 从 Laravel 5.2 开始, Laravel 的将路由的配置进行了分拆, 在 routes 目录下有 web.php 和 api.php 两个路由 ...