首页 > 其他分享 >restHighLevelClient 操作报错:listener timeout after waiting for [30000] ms

restHighLevelClient 操作报错:listener timeout after waiting for [30000] ms

时间:2023-03-31 20:25:39浏览次数:45  
标签:web catalina java 30000 报错 ms apache org ApplicationFilterChain

 

java.io.IOException: listener timeout after waiting for [30000] ms
    at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:905)
    at org.elasticsearch.client.RestClient.performRequest(RestClient.java:229)
    at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1593)
    at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1563)
    at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1525)
    at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:990)
    at com.ai.gaimops.log.service.es.impl.RiskEventElasticServiceImpl.queryPage(RiskEventElasticServiceImpl.java:174)
    at com.ai.gaimops.log.controller.es.ScrRiskEventEsController.exportExcel(ScrRiskEventEsController.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.ai.gaimops.utils.filter.CrosFilter.doFilter(CrosFilter.java:64)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:112)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
2023-03-31 19:57:41.727  WARN 19880 --- [nio-8095-exec-3] c.a.g.utils.core.ExceptionToCallResult   : ERROR:::系统异常:listener timeout after waiting for [30000] ms
2023-03-31 19:57:41.734  WARN 19880 --- [nio-8095-exec-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by handler execution: java.io.IOException: listener timeout after waiting for [30000] ms

 

 

 重写配置

@Bean
    public RestHighLevelClient getClient() {final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
        credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(userName, password));

        RestClientBuilder builder = RestClient.builder(host).setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
            @Override
            public RequestConfig.Builder customizeRequestConfig(RequestConfig.Builder requestConfigBuilder) {
                requestConfigBuilder.setConnectTimeout(-1);
                requestConfigBuilder.setSocketTimeout(-1);
                requestConfigBuilder.setConnectionRequestTimeout(-1);
                return requestConfigBuilder;
            }
        }).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
            @Override
            public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
                httpClientBuilder.disableAuthCaching();
                return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
            }
        });
        builder.setMaxRetryTimeoutMillis(600000);
        RestHighLevelClient client = new RestHighLevelClient(builder);
        return client;
    }

 

起作用的是这个

 builder.setMaxRetryTimeoutMillis(600000);

 

标签:web,catalina,java,30000,报错,ms,apache,org,ApplicationFilterChain
From: https://www.cnblogs.com/pxblog/p/17277383.html

相关文章

  • linux ftp服务器报错:425 Data Connection Failed.的解决方法
    原先我写的脚本:然后会出现450错误  修改后的脚本: 再操作前,增加passive一条语句就解决了。参考博客:https://www.codenong.com/cs106853176/    ......
  • MS SQL Server SQL刷题记录
    MSSQLServerSQL方言和mysqlsql略有不同目录保留4位小数求曼哈顿距离和欧几里得距离求中位数表联结表联结,我真心建议给你的列命名的时候不要瞎命名保留4位小数SELECTCAST(ROUND(SUM(LAT_N),4)ASDECIMAL(10,4))FROMSTATIONWHERELAT_N>38.7880ANDLAT_N<137.23......
  • 启动gitblit windows服务报错
    选自 https://www.bbsmax.com/A/kPzO3VjQzx/选中gitblitw.exe右键以管理员身份运行点击java进行配置,去掉Usedefault的勾选,重新选择JavaVirtualMachine,选择本地安装的java版本的虚拟机,点击应用,然后确定......
  • 【AGC】集成AGC认证服务facebook登录报错问题
    ​【关键字】认证服务、facebook、AGC 【问题描述】开发者反馈应用集成了AGC认证服务的facebook登录功能,在登录时遇到了一些问题。提示SERVER_ERROR:[code]1675030[message]:执行查询时出错,具体如下所述:开发接入集成认证服务中的fb登陆,目前我们有自己的google包,接入了f......
  • MySQL插入数据报错:1366 Incorrect string value: '\xF0\xA0\xB9\xB3\xF0\xA0...
    [10501]SQLSTATE[22007]:Invaliddatetimeformat:1366Incorrectstringvalue:'\xF0\xA0\xB9\xB3\xF0\xA0...'forcolumnxxxxatrow1是因为MySQL不能识别4个字节的utf8编码的字符,抛出了异常。解决办法将字符类型换成改为utf8mb4数据库:ALTERDATABASE`db_name`C......
  • 该模型采用龙贝格观测器进行无传感器控制 其利用 PMSM 数学模型构造观测器模型
    该模型采用龙贝格观测器进行无传感器控制其利用PMSM数学模型构造观测器模型,根据输出的偏差反馈信号来修正状态变量。当观测的电流实现与实际电流跟随时,可以从观测的反电势计算得到电机的转子位置信息,形成跟踪闭环估计。龙伯格观测器采用线性控制策略代替了SMO的变结构控制......
  • Java(TM) Platform SE binary 打开jar文件报错
    问题描述双击jar包,使用Java(TM)PlatformSEbinary直接运行java代码,报错Error:AJNIerrorhasoccurred,pleasecheckyourinstallationandtryagain和AJavaExceptionhasoccurred.选择更多应用,进目录里选中javaw.exe也不行问题原因jdk版本与jar包的编译时的版本......
  • broadcom Ethernet BCM57412 驱动更新记录(dkms方式)
    一背景现场DellR740xd2机器使用网卡Broadcom5741210GbSFP+,固件版本22.21.06.80。bnxt_en.ko内核模块是该网卡的驱动,我们默认的驱动版本为1.8.0,而固件版本22.21.06.80需要1.10.2的driver。本文主要是记录一些操作步骤,后续出现类似驱动过旧的问题可以快速解决。二临时解......
  • 「解题报告」ARC122E Increasing LCMs
    紫题不会了,感觉要退役了前缀\(\mathrm{lcm}\)的限制很强,考虑每次消去一个数。发现最后一个数没有依赖,考虑最后一个数的条件,其实就是最后一个数不是前\(n-1\)个数的\(\mathrm{lcm}\)的倍数,即\(\displaystyle\gcd(\mathop{\mathrm{lcm}}_{i\nej}(a_j),a_i)<a_i\)。这......
  • MSF实战免杀过静态:ShellCode加花指令
    分析MSF的ShellCode1.Hash寻找系统API函数由于ShellCode是没有PE结构的,无法通过导入表来调用系统的API函数,因此,这部分是一个通用的API调用函数,它可以根据给定的哈希值查找并调用相应的API。在查找API时,它会遍历已加载模块的列表以及每个模块的导出地址表。这个函数在Shellcode中......