[ABI 5.2] 数据库连接测试成功,但当前数据库配置无法作为系统连接池使用

177
3

esen_52B1YYLTW1 数据小白Lv1

发表于2024-10-9 15:15

悬赏1

已解决

楼主
数据库连接测试成功,但当前数据库配置无法作为系统连接池使用。详情如下: 数据库参数 max_allowed_packet 的值小于期望值,实际值为 4,194,304,期望值最小为 20,971,520。

详情如下:
QueryObj ERROR:/abi/emainframe/setup.do?driverClassName=com.mysql.cj.jdbc.Driver&url=jdbc:mysql://127.0.0.1:3306/yixin?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&databaseTerm=SCHEMA&nullDatabaseMeansCurrent=true&username=root&password=K6OeI3fSVBmlQckyEdOBKOvzxj+mazw8ybSSMKdP0Nb8bfOs1zbwNlWczUHBd17RH8VrRlXbhFZwTNyuNW6phef6L/pu2lp7wXAY/nntu5nHoMNyoK1TrpV/nGW3u1IoGeEMDuCgPVv5DUzvAIRx265JDMrcfF3XJFMdDjtZ0Qw=&catalog=&maxActive=1000&maxWait=10000&logLevel=ERROR&action=testdatasource
java.lang.RuntimeException: 数据库连接测试成功,但当前数据库配置无法作为系统连接池使用。详情如下:
数据库参数 max_allowed_packet 的值小于期望值,实际值为 4,194,304,期望值最小为 20,971,520。

at com.esen.jdbc.SqlFunc.testDataSource(SqlFunc.java:1627)
at com.esen.ecore.jdbc.JdbcConnectFactoryManager.testDataSource(sj:59)
at com.esen.emainframe.action.ActionSystemSetup.ppPpPp(j:39)
at com.esen.emainframe.action.ActionSystemSetup.jsexecute(j:31)
at com.esen.eweb.action.Action_Js.execute(Action_Js.java:77)
at com.esen.emainframe.action.ActionSystemSetup.execute(j:13)
at com.esen.eweb.action.Action.handle(Action.java:67)
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:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
at com.esen.eweb.XUIServlet.doDispatch(XUIServlet.java:265)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
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:648)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at com.esen.eweb.XUIServlet.service(XUIServlet.java:230)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.esen.eacl.web.FilterLoginConfig.filterAccess(FilterLoginConfig.java:149)
at com.esen.eacl.web.FilterLoginConfig.serverIsReady(FilterLoginConfig.java:190)
at com.esen.eacl.web.AbstractLoginFilter.checkUrlExt(AbstractLoginFilter.java:106)
at com.esen.eacl.web.AbstractLoginFilter.doFilter(AbstractLoginFilter.java:61)
at com.esen.eacl.webinit.FilterLoginCheck.doFilter(FilterLoginCheck.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.esen.ecascore.AbstractCasFilter.doFilter(AbstractCasFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.esen.ecascore.AbstractCasFilter.doFilter(AbstractCasFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.esen.ecascore.AbstractCasFilter.doFilter(AbstractCasFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.esen.eacl.webinit.FilterTokenCheck.doFilter(FilterTokenCheck.java:201)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:128)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:103)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:121)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.esen.eweb.webinit.FilterSecurityCheck.doFilter(FilterSecurityCheck.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.esen.eweb.webinit.HttpMethodFilter.doFilter(HttpMethodFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1156)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
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)


JavaScript StackTrace:
throwError@http://127.0.0.1:8080/abi/eui/eui.js:1:36961
QueryObj.prototype.checkResult@http://127.0.0.1:8080/abi/eui/eui.js:1:56259
QueryObj.prototype._onreadystatechange@http://127.0.0.1:8080/abi/eui/eui.js:1:49690
QueryObj.prototype._sendRequest/this.hp.onreadystatechange@http://127.0.0.1:8080/abi/eui/eui.js:1:50805

最近看过此主题的会员

liwm

esen_55E7PPVBUQ

esen_4VQDJ8W7BU

大强

esen_53WI7WU2UU

esen_4Y3L5ADO80

ESENSOFT官方技术支持

chestnut

雨yi

最佳答案
关帖总结:
问题:数据库连接测试成功,但当前数据库配置无法作为系统连接池使用,提示:数据库参数 max_allowed_packet 的值小于期望值,实际值为 4,194,304,期望值最小为 20,971,520。
解决方案:调整提示的参数,找到MySQL的配置文件(一般是my.cnf或者my.ini),在配置文件的[mysqld]段中添加或者修改max_allowed_packet = 20M。
3个回答

只看楼主

esen_52B1YYLTW1 数据小白Lv1

发表于2024-10-9 15:51

只看该作者

取消 关注该作者的回复

沙发

对于 MySQL,找到 MySQL 的配置文件(通常是my.cnf或者my.ini,如果使用了自定义的配置文件路径则根据实际情况查找)。
在配置文件的[mysqld]段中添加或者修改max_allowed_packet = 20M(这里的20M表示 20MB,可以根据实际需求调整)。

esen_52B1YYLTW1 数据小白Lv1

发表于2024-10-9 15:51

只看该作者

取消 关注该作者的回复

板凳

esen_52B1YYLTW1 发表于 2024-10-9 15:51
对于 MySQL,找到 MySQL 的配置文件(通常是my.cnf或者my.ini,如果使用了自定义的配置文件路径则根据实际 ...

问题解决

chestnut 数据领袖Lv6

发表于2024-10-9 15:15

只看该作者

取消 关注该作者的回复

地板

关帖总结:
问题:数据库连接测试成功,但当前数据库配置无法作为系统连接池使用,提示:数据库参数 max_allowed_packet 的值小于期望值,实际值为 4,194,304,期望值最小为 20,971,520。
解决方案:调整提示的参数,找到MySQL的配置文件(一般是my.cnf或者my.ini),在配置文件的[mysqld]段中添加或者修改max_allowed_packet = 20M。

登录后可回答问题,请登录注册

快速回复 返回顶部 返回列表

小时

全天响应

分钟

快速处理问题

工程师强势助力

明星产品
解决方案
联系合作

400咨询:400-0011-866

技术支持QQ:400-0011-866(工作日9:00-18:00)

产品建议邮箱yixin@esensoft.com

关注我们

扫TA学习更多干货

一对一专家交流

版权所有© 2006-2024 北京亿信华辰软件有限责任公司 京ICP备07017321号 京公网安备11010802016281号