【ElasticSearch】异常 Request cannot be executed; I/O reactor status: STOPPED
Caused by: java.lang.RuntimeException: Request cannot be executed; I/O reactor status: STOPPED
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:857)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:259)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:246)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1613)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1583)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1553)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:1069)
at com.deyatech.esutil.service.impl.ElasticSearchServiceImpl.selectDataByESQueryJSON(ElasticSearchServiceImpl.java:581)
at com.deyatech.esutil.service.impl.ElasticSearchServiceImpl.searchData(ElasticSearchServiceImpl.java:548)
at com.deyatech.reception.service.impl.InfoTemplateEsServiceImpl.getElaticsearchResult(InfoTemplateEsServiceImpl.java:251)
at com.deyatech.reception.service.impl.InfoTemplateEsServiceImpl.getTemplateListView(InfoTemplateEsServiceImpl.java:120)
at com.deyatech.reception.service.impl.InfoTemplateServiceImpl.getTemplateListView(InfoTemplateServiceImpl.java:221)
at com.deyatech.reception.service.impl.InfoTemplateServiceImpl$$FastClassBySpringCGLIB$$aadf779.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:53)
at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:366)
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:421)
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:346)
at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
at com.deyatech.reception.service.impl.InfoTemplateServiceImpl$$EnhancerBySpringCGLIB$$6d755bd7.getTemplateListView(<generated>)
at com.deyatech.reception.thymeleaf.InfoDataExpressionObject.getInfoList(InfoDataExpressionObject.java:47)
at sun.reflect.GeneratedMethodAccessor1001.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:902)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1547)
... 113 common frames omitted
Caused by: java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED
at org.apache.http.util.Asserts.check(Asserts.java:46)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.ensureRunning(CloseableHttpAsyncClientBase.java:90)
at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:123)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:255)
... 143 common frames omitted
github已提的问题
https://github.com/elastic/elasticsearch/issues/42133
https://github.com/elastic/elasticsearch/issues/45115
https://github.com/elastic/elasticsearch/issues/49124
https://github.com/elastic/elasticsearch/issues/39946
一些可以尝试的方法来解决问题
1、After some debugging and configuration tuning, I found that the exception was caused by too many concurrent ElasticSearch clients. After I reduce the number of concurrent clients, the exception is gone.
减少客户端的数量,使用的地方都注入。
2、 I'm using the client at scheduled method, so every invocation is started in new thread. The client has been injected to the service and never closed. Seems that is the reason of exception in my case. I changed my implementation so a new client is created at every thread when it is needed and closes in the end of method. That fixed the issue.
每次使用都新创建客户端,用完后关闭。
3、自己构建 RestHighLevelClient 使用 HttpComponents,链接STOP时重新构造客户端
【ElasticSearch】异常 Request cannot be executed; I/O reactor status: STOPPED的更多相关文章
- Java访问Elasticsearch报错Request cannot be executed; I/O reactor status: STOPPED
简介 使用ES过程中遇到一个Request cannot be executed; I/O reactor status: STOPPED 的异常,大概意思是和server端的连接异常终止了.开始以为 ...
- ElasticSearch异常归纳(能力工场小马哥)
异常1: can not run elasticsearch as root [WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-2] ...
- 异常System.Web.HttpException (0x80004005): Server cannot set status after HTTP headers have been sent.
在用mvc 的AuthorizeAttribute做身份验证,重写HandleUnauthorizedRequest方法,在Application_Error方法里出现异常System.Web.Htt ...
- docker启动elasticsearch异常Failed to create node environment(解决)
异常说是创建节点环境失败,操作/usr/share/elasticsearch/data/nodes的IO错误,尝试给此目录添加读写权限后,依旧没什么**用,灵机一动是不是挂载目录没有权限导致的? c ...
- iOS 使用AFNetworking遇到异常 Request failed: unacceptable content-type: text/html
错误日志是: Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unac ...
- 解决linux下root运行Elasticsearch异常
如果以root身份运行将会出现以下问题 root@yxjay:/opt/elasticsearch-2.3.5/bin# ./elasticsearchException in thread &quo ...
- Logstash连接Elasticsearch异常
1.背景 elasticsearch集群默认配置启动ok,logstash连接向里面发数据ok. 2.出现问题 修改elasticsearch.yml中的cluster.name,改为 esabc 然 ...
- elasticsearch异常问题 discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
本文使用环境 centos7.x elasticsearch7.6.2 JDK1.8 错误:文件权限不足 [1]: max file descriptors [4096] for ...
- 【异常】微博生成短链异常{"request":"/2/short_url/shorten.json","error_code":"10014","error":"Insufficient app permissions!"}
一.之前的调用方式 这种方式用了大约有一年时间,之前没有问题,但是2019-8-28号突然不行了,可能是由于微博对该接口的调用做了限制.不允许通过传递source参数的方式进行请求 该接口微博API文 ...
随机推荐
- PhoneGap本地将html打包成安卓App
PhoneGap的在线打包有大小限制,超过30M的包无法在线打包.当然,可以把包里面的图片.声音文件去掉,然后打包.下载以后,解包,重新打包并签名.蛮麻烦的. 本地打包的简单方法如下: 下载安装Jav ...
- 为Python的web框架编写前端模版的教程
虽然我们跑通了一个最简单的MVC,但是页面效果肯定不会让人满意. 对于复杂的HTML前端页面来说,我们需要一套基础的CSS框架来完成页面布局和基本样式.另外,jQuery作为操作DOM的JavaScr ...
- 关于python中的随机种子——random_state
random_state是一个随机种子,是在任意带有随机性的类或函数里作为参数来控制随机模式.当random_state取某一个值时,也就确定了一种规则. random_state可以用于很多函数,我 ...
- Java中的选择结构(二)
选择结构(二) 学习本章会用到的单词: case:实例,情形,情况 switch:转换,切换,开关 default:系统默认值,违约,预设.缺省 exit:出口,通道,退出 consume:消耗,耗费 ...
- python使用gitlab-api
目录 一.简介 二.示例 讲解 配置文件方式存储token 其它返回 三.其它操作 一.简介 公司使用gitlab 来托管代码,日常代码merge request以及其他管理是交给测试,鉴于操作需经常 ...
- Python基础入门(7)- Python异常处理机制
1.初识异常 1.1.什么是异常与异常处理 异常就是错误 异常会导致程序崩溃并停止运行 能监控并捕获异常,将异常部位的程序进行修理使得程序继续正常运行 1.2.异常的语法 1 # coding:utf ...
- CF946B Weird Subtraction Process 题解
Content 有两个数 \(a,b\),执行如下操作: 如果 \(a,b\) 中有一个数是 \(0\),结束操作,否则跳到操作 \(2\). 如果 \(a\geqslant 2b\),那么 \(a\ ...
- LuoguB2001 入门测试题目 题解
Update \(\texttt{2021.7.3}\) 经测试,本题 \(a,b\) 范围在 long long,对代码进行了修改,并修改一些笔误,更新了数据范围. \(\texttt{2021.7 ...
- Docker从入门到精通(八)——Docker Compose
恭喜大家,学到这里,对于 docker 的基础玩法大家应该都会了,下面会介绍 docker的一些编排工具. 1.为什么需要 Docker Compose? 官网镇楼:https://www.runoo ...
- Python sys模块 os模块、OS.open() | open() | OS._exit() | sys.exit() | exit()
sys模块:负责程序和Python交互. sys常用方法:=========================== sys.stdout.write('please:')val = sys.stdin ...