详述:

1 _riverStatus Import_fail

问题描述: 发现有个索引的数据同步不完整,在 http://192.168.1.17:9200/_plugin/head/ 在browse - river里看到 _riverStatus Import_fail

查看 elasticsearch 的log发现 有几条数据由于异常造成同步失败,处理好数据好重新建索引数据同步正常。

2 es_rejected_execution_exception <429>

此异常主要是因为请求数过多,es的线程池不够用了。

默认bulk thead pool set  queue capacity =50 这个可以设置大点

打开 elasticsearch.yml 在末尾加上

threadpool:
    bulk:
        type: fixed
        size: 60
        queue_size: 1000

重新启动服务即可

另:

--查看线程池设置--
curl -XGET "http://localhost:9200/_nodes/thread_pool/"

非bulk入库thread pool设置可以这样修改
threadpool:
    index:
        type: fixed
        size: 30
        queue_size: 1000

关于该异常,有网友给的解释挺好的:

  1. Elasticsearch has a thread pool and a queue for search per node. A thread pool will have N number of workers ready to handle the requests. When a request comes and if a worker is free , this is handled by the worker. Now by default the number of workers is equal to the number of cores on that CPU. When the workers are full and there are more search requests , the request will go to queue. The size of queue is also limited. Its by default size is say and if there happens more parallel requests than this , then those requests would be rejected as you can see in the error log.
  2.  
  3. The solution to this would be to -
  4.  
  5. . Increase the size of queue or threadpool - The immediate solution for this would be to increase the size of the search queue. We can also increase the size of threadpool , but then that might badly effect the performance of individual queries. So increasing the queue might be a good idea. But then remember that this queue is memory residential and increasing the queue size too much can result in Out Of Memory issues. You can get more info on the same here.
  6. . Increase number of nodes and replicas - Remember each node has its own search threadpool/queue. Also search can happen on primary shard OR replica.

关于thread pool,可参看:https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html

3 create_failed_engine_exception <500>

相关分片损坏.

删除该分片重建即可。

4 mapper_parsing_exception <400>

存在字段格式不正确,与mapping不匹配。

检查文档字段格式,格式不正确有两种情况,其一是格式与mapping不匹配,其二是对字符串而言,可能字符非法。

5 index_not_found_exception <404>

索引不存在。

建立索引。

6 Result window is too large, from + size must be less than or equal to: [10000] but was [10000000].

result window的值默认为10000,比实际需求的小,故而报错。

两个方法:其一,在elasticsearch.yml中设置index.max_result_window,也可以直接修改某索引的settings:

  1. curl -XPUT http://127.0.0.1:9200/indexname/_settings -d '{ "index" : { "max_result_window" : 100000000}}'

其二,使用scroll api。

  1. POST /twitter/tweet/_search?scroll=1m
  2. {
  3. "size": ,
  4. "query": {
  5. "match" : {
  6. "title" : "elasticsearch"
  7. }
  8. }
  9. }

从服务器响应获取scroll_id,然后后面批次的结果可通过循环使用下面语句得到:

  1. POST /_search/scroll
  2. {
  3. "scroll" : "1m",
  4. "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
  5. }

关于scroll api,可参看:https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html

7 illegal_argument_exception: number of documents in the index cannot exceed 2147483519 <400>

分片上文档数达到20亿上限,无法插入新文档。

重建索引,增加分片;也可以增加节点。

8 action_request_validation_exception: Validation Failed:1:no requests added <400>

这个错误一般出现在bulk入库时,是格式不对,每行数据后面都得回车换行,最后一行后要跟空行。

修改格式就可以重新bulk了。

9 No Marvel Data Found (marvel error)

一般是人为删除(比如在sense插件里执行删除命令)marvel数据,导致marvel采集出错(删除了半天数据,另外半天数据将无法正常采集),不能统计;对于这种情况,等第二天marvel就可以正常使用了。

也有可能是9300端口被占用,marvel默认使用9300端口;对于这种情况,找到9300端口占用进程,kill掉,重启kibana即可。

10 Bad Request, you must reconsidered your request. <400>

一般是数据格式不对。

11 Invalid numeric value: Leading zeroes not allowed\n <400>

这种情况是整数类型字段格式不正确,比如一个整数等于0000。检查每个整数字段的数据生成即可。

12 #Deprecation: query malformed, empty clause found at [9:9]

查询语句不合法,里面含有空大括号。

13 query:string_index_out_of_bounds_exception

查询数据时,曾遇到这个问题。后来发现是http请求头格式不对,url里多了一个斜杠,却报了这个错误,特此记录。

14 failed to obtain node locks

在同一个节点(linux系统)上启动多个elasticsearch时出现failed to obtain node locks错误,启动失败.

elasticsearch的服务器响应异常及应对策略的更多相关文章

  1. elasticsearch的服务器响应异常及解决策略(转)

    详述: 1 _riverStatus Import_fail 问题描述: 发现有个索引的数据同步不完整,在 http://192.168.1.17:9200/_plugin/head/ 在browse ...

  2. 发送邮件,出现异常:服务器响应为: Error: need EHLO and AUTH first !"

    在使用 System.Net.Mail组建发送邮件的时候出现了"命令顺序不正确. 服务器响应为: Error: need EHLO and AUTH first !"异常 解决方法 ...

  3. 高并发&高可用系统的常见应对策略 秒杀等-(阿里)

    对于一个需要处理高并发的系统而言,可以从多个层面去解决这个问题. 1.数据库系统:数据库系统可以采取集群策略以保证某台数据库服务器的宕机不会影响整个系统,并且通过负载均衡策略来降低每一台数据库服务器的 ...

  4. Linux 下Tomcat服务器响应越来越慢分分析

    本文转自自:https://www.cnblogs.com/yangc/p/6859985.html ,感谢给我提供提供思路. 服务器响应慢的分析与解决(Linux服务器) 一.分析思路 1.排除本机 ...

  5. 服务器响应慢的分析与解决(Linux服务器)

    一.分析思路 1.排除本机自身原因 2.服务器性能分析 3.项目本身分析(不详细说) 4.虚拟机分析 5.数据库分析 二.详细分析方法 1.排除本机自身原因 可以使用站长工具测试网站速度. 2.服务器 ...

  6. GC之八--GC 触发Full GC执行的情况及应对策略

    目录: GC之一--GC 的算法分析.垃圾收集器.内存分配策略介绍 GC之二--GC日志分析(jdk1.8)整理中 GC之三--GC 触发Full GC执行的情况及应对策略 gc之四--Minor G ...

  7. 系列文章(一):探究电信诈骗的关键问题与应对策略——By Me

    导读:伴随着互联网与移动网的融合,移动互联网变得更加开放.与此同时,伴随着新型的移动互联网服务模式的出现,移动互联网的安全问题也出现了新的形式及特点. 如今,移动互联网遭受到的攻击已严重影响了人们的隐 ...

  8. 邮件:事务失败。 服务器响应为:DT:SPM 163 smtp

    几年前我做的一个项目,日发邮件最高峰时几十万.自以为对邮件发送方面已经有了一定认识,所以近期机缘巧合之下,又有项目需要发送邮件,不禁自信满满,暗自庆幸能不手到擒来乎? 不想老革命遇到新问题.我原先的邮 ...

  9. C#发送邮件时提示:“不允许使用邮箱名称。服务器响应为:”的错误解决办法

    由于项目需要,要为客户提供一个定期发送邮件的程序.本来原来自己还写过,但新写的程序一晚上也没通过测试,总是提示"不允许使用邮箱名称.服务器响应为..." 经过在网上搜索查找解决办法 ...

随机推荐

  1. webApp 开发技术要点总结

    如果你是一名前端er,又想在移动设备上开发出自己的应用,那怎么实现呢?幸好,webkit内核的浏览器能帮助我们完成这一切.接触 webkit webapp的开发已经有一段时间了,现把一些技巧分享给大家 ...

  2. html5,实例开发代码

    <!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8&qu ...

  3. Eclipse下编写的web项目部署到tomcat下

    之前都是用myeclipse编写web项目,编写好然后在myclipse上配置的tomcat下的webapps文件想项目复制到其他tomcat下就能运行了. 最近学习jquery,将eclipse编写 ...

  4. 智能家居常用WiFi模块

    WiFi模块 WiFi模块就是整个系统的控制中心,控制很简单,就是输出一个开关信号控制继电器,而这个模块的核心是WiFi的连接,手机连接WiFi时需要扫描,输入密码,而这类本身没有屏幕和键盘的硬件设备 ...

  5. Xamarin

    快速建立原生(Native)的行动装置应用程序: 程序代码共享: 与 Visual Studio 整合: 确保第一时间更新: 原生的应用程序效能:

  6. [6] 智能指针boost::weak_ptr

    [1]boost::weak_ptr简介 boost::weak_ptr属于boost库,定义在namespace boost中,包含头文件 #include<boost/weak_ptr.hp ...

  7. 使用 Centos 7 的 systemctl 管理服务

    CentOS 7的服务systemctl脚本存放在:/usr/lib/systemd/,有系统(system)和用户(user)之分,像需要开机不登陆就能运行的程序,存系统服务里即:/usr/lib/ ...

  8. 查看数据库磁盘使用多少G:

    查看数据库磁盘使用多少G: / / ) G from dba_segments t where t.owner = 'TPSC' group by OWNER, t.segment_name, t.s ...

  9. 怎样将GB2312编码的字符串转换为ISO-8859-1编码的字符串?

    String s1 = "你好"; String s2 = new String(s1.getBytes("GB2312"), "ISO-8859-1 ...

  10. 从yum源下载安装包及依赖包

    局域网内所有linux都用yum从外网源安装软件有点浪费,尤其遇到下载慢的情况: 所以考虑下载后传到其他机器安装,还可以保证版本一致(创建一个本地仓库更好,这个后面研究了再记录): 首先安装yum工具 ...