记录一次presto sql执行报错 Error executing query的解决办法

在执行presto sql 时报错截图如下:

查看后台执行报错日志:

java.sql.SQLException: Error executing query
at com.facebook.presto.jdbc.PrestoStatement.internalExecute(PrestoStatement.java:307)
at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:230)
at com.facebook.presto.jdbc.PrestoPreparedStatement.close(PrestoPreparedStatement.java:95)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:106)
at com.alibaba.druid.pool.DruidAbstractDataSource.closePreapredStatement(DruidAbstractDataSource.java:2011)
at com.alibaba.druid.pool.PreparedStatementPool.closeRemovedStatement(PreparedStatementPool.java:175)
at com.alibaba.druid.pool.PreparedStatementPool.remove(PreparedStatementPool.java:80)
at com.alibaba.druid.pool.DruidPooledConnection.closePoolableStatement(DruidPooledConnection.java:186)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.close(DruidPooledPreparedStatement.java:201)
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:106)
at com.alibaba.druid.pool.DruidConnectionHolder.reset(DruidConnectionHolder.java:321)
at com.alibaba.druid.pool.DruidDataSource.recycle(DruidDataSource.java:1910)
at com.alibaba.druid.pool.DruidPooledConnection.recycle(DruidPooledConnection.java:325)
at com.alibaba.druid.pool.DruidPooledConnection.close(DruidPooledConnection.java:270)
at com.anjiplus.template.gaea.business.modules.datasource.service.impl.DataSourceServiceImpl.executeRelationalDb(DataSourceServiceImpl.java:311)
at com.anjiplus.template.gaea.business.modules.datasource.service.impl.DataSourceServiceImpl.execute(DataSourceServiceImpl.java:141)
at com.anjiplus.template.gaea.business.modules.datasource.service.impl.DataSourceServiceImpl$$FastClassBySpringCGLIB$$5ad1cfae.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
at com.anjiplus.template.gaea.business.modules.datasource.service.impl.DataSourceServiceImpl$$EnhancerBySpringCGLIB$$39b94fc7.execute(<generated>)
at com.anjiplus.template.gaea.business.modules.dataset.service.impl.DataSetServiceImpl.testTransform(DataSetServiceImpl.java:345)
at com.anjiplus.template.gaea.business.modules.dataset.service.impl.DataSetServiceImpl$$FastClassBySpringCGLIB$$839a8ea6.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687)
at com.anjiplus.template.gaea.business.modules.dataset.service.impl.DataSetServiceImpl$$EnhancerBySpringCGLIB$$df26a7af.testTransform(<generated>)
at com.anjiplus.template.gaea.business.modules.dataset.controller.DataSetController.testTransform(DataSetController.java:161)
at sun.reflect.GeneratedMethodAccessor729.invoke(Unknown Source)
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:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
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:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)
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:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
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.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.anji.plus.gaea.GaeaAutoConfiguration$WebGaeaAutoConfiguration.lambda$registrationBean$0(GaeaAutoConfiguration.java:188)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.anjiplus.template.gaea.business.filter.TokenFilter.doFilter(TokenFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.anjiplus.template.gaea.business.filter.UrlDecodeFilter.doFilter(UrlDecodeFilter.java:44)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
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:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
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:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Error starting query at http://10.3.62.102:8743/v1/statement returned an invalid response: JsonResponse{statusCode=431, statusMessage=Request Header Fields Too Large, headers={connection=[close], content-length=[74], content-type=[text/html;charset=iso-8859-1]}, hasValue=false} [Error: <h1>Bad Message 431</h1><pre>reason: Request Header Fields Too Large</pre>]
at com.facebook.presto.jdbc.internal.client.StatementClientV1.requestFailedException(StatementClientV1.java:497)
at com.facebook.presto.jdbc.internal.client.StatementClientV1.<init>(StatementClientV1.java:138)
at com.facebook.presto.jdbc.internal.client.StatementClientFactory.newStatementClient(StatementClientFactory.java:24)
at com.facebook.presto.jdbc.QueryExecutor.startQuery(QueryExecutor.java:46)
at com.facebook.presto.jdbc.PrestoConnection.startQuery(PrestoConnection.java:774)
at com.facebook.presto.jdbc.PrestoStatement.internalExecute(PrestoStatement.java:263)
... 94 common frames omitted

解决办法:

在presto 数据源配置的 config.properties 配置文件中 添加 如下配置:

http-server.max-response-header-size=5MB
http-server.max-request-header-size=5MB

然后重启presto ,问题解决。亲测有效!!

相关推荐
Asiram_5 分钟前
大数据机器学习与计算机视觉应用08:反向传播
大数据·机器学习·计算机视觉
Json_181790144801 小时前
淘系商品评论json数据示例参考,API接口系列
大数据·json·api
ssxueyi12 小时前
如何查看flink错误信息
大数据·flink
奥顺14 小时前
PHP与AJAX:实现动态网页的完美结合
大数据·mysql·开源·php
中东大鹅16 小时前
分布式数据存储基础与HDFS操作实践
大数据·linux·hadoop·分布式·hbase
Y编程小白17 小时前
Git版本控制工具--基础命令和分支管理
大数据·git·elasticsearch
不爱学习的YY酱18 小时前
【操作系统不挂科】<内存管理-文件系统实现(18)>选择题(带答案与解析)
java·大数据·数据库
guanpinkeji19 小时前
陪诊小程序搭建,打造一站式陪诊服务
大数据·小程序·小程序开发·陪诊·陪诊小程序
胡耀超19 小时前
如何从全局视角规划项目与战略决策(“精准接送”案例、技术架构设计与选型、业务逻辑及产品商业模式探讨)
大数据·数据挖掘·软件架构·商业模式·数据管理
标贝科技20 小时前
标贝科技受邀出席2024ADD数据应用场景大会 共议数据要素发展新契机
大数据·数据库·人工智能·科技·语言模型·数据挖掘