详述:

1 _riverStatus Import_fail

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

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

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

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

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 100 and if there happens more parallel requests than this , then those requests would be rejected as you can see in the error log.

The solution to this would be to -

1.    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.
2. 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:

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

其二,使用scroll api。

POST /twitter/tweet/_search?scroll=1m
{
"size": 100,
"query": {
"match" : {
"title" : "elasticsearch"
}
}
}

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

POST  /_search/scroll
{
"scroll" : "1m",
"scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
}

关于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错误,启动失败.

转载自:https://www.cnblogs.com/jiu0821/p/6075833.html#_label0_7

elasticsearch的服务器响应异常及解决策略(转)的更多相关文章

  1. elasticsearch的服务器响应异常及应对策略

    目录: 1 _riverStatus Import_fail 2 es_rejected_execution_exception <429> 3 create_failed_engine_ ...

  2. asp.net 发送电子邮件本地测试正常,但服务器上异常的解决办法

    如题,这个问题曾经非常苦恼,代码肯定是没有问题的.在网上也查找了不少资料,按照他们的步骤做了,还是无效. 最后问题解决了,原来:我租用腾讯云服务器,腾讯为了防止垃圾邮件,禁止了邮件发送的25号端口,原 ...

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

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

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

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

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

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

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

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

  7. SSH乱码和Xshell异常断开解决方法

    一.SSH Secure Shell Client中文乱码的解决方法 这是SSH Secure Shell Client多年未解决的短板,要求客户端和服务器端都要‘UTF-8’编码,我终于知道Wind ...

  8. Windows Server 2008 网站访问PHP响应慢的解决方法

    公司新上了一个网站,但是在配置完PHP环境之后却发现了问题,访问HTML速度飞快,而访问PHP网页时就要卡顿1秒,响应很慢的样子,排除了带宽的因素之后,在百度上搜了一圈竟然解决了,现在将方法转载给大家 ...

  9. org/apache/commons/pool/impl/GenericObjectPool异常的解决办法

    org/apache/commons/pool/impl/GenericObjectPool异常的解决办法 webwork+spring+hibernate框架的集成, 一启动Tomcat服务器就出了 ...

随机推荐

  1. PHP(Mysqli和PDO)预处理

    PHP预处理主要是用来防SQL注入的,开发程序的都明白这样一个道理,不能相信用户的任何输入,如果用户输入问题你没有做相应的安全, 那么:你的程序是很危险的,很容易被攻击的!预处理:只分析两个:mysq ...

  2. XML的一些点

    最近学习Spring会配置许多XML文件,没有系统学习过XML遇到了许多问题,系统的看了一下有些拨云见日的感觉. 推荐学习:http://www.w3school.com.cn/xml/xml_int ...

  3. 关于js的面向对象设计

    function Person( name, age ){ this.name = name; this.age = age; this.sleep = function(){ alert( this ...

  4. 移动端touch事件滚动

    本来想用在北京欢乐谷手机上用touch事件来模拟局部左右内容滚动里,但在touchmove上下滚动时由于禁止了默认事件而body滚动条不能滚动,虽然可以根据touchmove的坐标来判断方向,但体验效 ...

  5. 【BZOJ3437】小P的牧场 斜率优化

    [BZOJ3437]小P的牧场 Description 背景 小P是个特么喜欢玩MC的孩纸... 描述 小P在MC里有n个牧场,自西向东呈一字形排列(自西向东用1…n编号),于是他就烦恼了:为了控制这 ...

  6. Unity3D笔记八 Unity生命周期及动画学习

    Unity脚本从唤醒到销毁有着一套比较完善的生命周期,添加任何脚本都必须遵守自身生命周期法则.下面介绍一下生命周期中由系统自身调用的几个比较重要的方法.  Update(){}.正常更新,用于更新逻 ...

  7. svn-maven-tomcat自动发布脚本

    #!/bin/sh #svn-maven-tomcat自动发布脚本 #变量设置 svnpath=svn://10.60.10.120/研发部/xx-maven svnusername=xxx svnp ...

  8. Java项目工程化之项目构建工具Maven

    欢迎查看Java开发之上帝之眼系列教程,如果您正在为Java后端庞大的体系所困扰,如果您正在为各种繁出不穷的技术和各种框架所迷茫,那么本系列文章将带您窥探Java庞大的体系.本系列教程希望您能站在上帝 ...

  9. treeview(树加载)

    数据库结构 id:int类型,主键,自增列:     Name:char类型:     paraid:int类型 窗台拖入控件treeview. 1.版本1 using System; using S ...

  10. 使用colmap进行稠密重建

    colmap应该是目前state-of-art的增量式SFM方案,可以方便的对一系列二维图片进行三维重建 不用对摄像机进行标定,只需要从不同角度对重建场景或物体进行拍摄得到一系列图像作为输入 首先需要 ...