永洪社区

标题: 连接mysql服务器报错 [打印本页]

作者: xxx404    时间: 2023-1-11 11:15
标题: 连接mysql服务器报错
连接mysql服务器报错,fail to create conn because of timeout: 30000 , url:jdbc:mysql://xx.xxx.xxx.xx:xxxx/
本人排查,驱动没问题上传到 同Mysql数据库版本一致的8019、永洪服务器与Mysql数据库服务器telnet能连通,防火墙已关,但是还连不上
日志
  1. [2023-01-11 10:56:42.229] |-[ERROR] |-[cdb7ba4038394e4baa01697df4dbdd99] |-[admin] |-[g5.sv.qry.QueryProc.procReq(QueryProc.java:197)] |-[QUERY: [xxxx20230111105334-13014<___CONNECTION___/xxx/xxxx>][ErrCode: 8192]  fail to create conn because of timeout: 30000 , url:jdbc:mysql://xx.xxx.xxx.xx:xxxx/]
  2. g5.util.GRTException: fail to create conn because of timeout: 30000 , url:jdbc:mysql://xx.xxx.xxx.xx:xxxx/
  3.         at g5.sv.qry.req.TestQryReq.process0(TestQryReq.java:162) ~[product-20220823.jar:?]
  4.         at g5.sv.Req.process(Req.java:41) ~[product-20220823.jar:?]
  5.         at g5.sv.qry.impl.QueryServiceImpl.process(QueryServiceImpl.java:181) ~[product-20220823.jar:?]
  6.         at g5.sv.qry.QueryProc.procReq(QueryProc.java:141) [product-20220823.jar:?]
  7.         at g5.sv.qry.QueryProc.service(QueryProc.java:61) [product-20220823.jar:?]
  8.         at g5.sv.ServletHelper.service(ServletHelper.java:101) [product-20220823.jar:?]
  9.         at g5.sv.PortalServlet.service(PortalServlet.java:536) [product-20220823.jar:?]
  10.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) [servlet-api.jar:4.0.FR]
  11.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:9.0.37]
  12.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.37]
  13.         at g5.sv.standardsso.SSOLoginFilter.doFilter(SSOLoginFilter.java:117) [product-20220823.jar:?]
  14.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.37]
  15.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.37]
  16.         at com.yonghongtech.filter.PortalLoginFilter.doFilter(PortalLoginFilter.java:34) [PortalLogin.jar:?]
  17.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.37]
  18.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.37]
  19.         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.37]
  20.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.37]
  21.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.37]
  22.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [catalina.jar:9.0.37]
  23.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.37]
  24.         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:666) [catalina.jar:9.0.37]
  25.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.37]
  26.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.37]
  27.         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [catalina.jar:9.0.37]
  28.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.37]
  29.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.37]
  30.         at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-coyote.jar:9.0.37]
  31.         at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.37]
  32.         at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:9.0.37]
  33.         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589) [tomcat-coyote.jar:9.0.37]
  34.         at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.37]
  35.         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
  36.         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
  37.         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.37]
  38.         at java.lang.Thread.run(Thread.java:834) [?:?]
  39. [2023-01-11 10:56:48.233] |-[INFO] |-[df21c86198fb4eeda3a69050345b3cce] |-[SYSTEM] |-[g5.qry.driver.ConnectionProvider.getConn(ConnectionProvider.java:105)] |-[OTHER:   Succeed to get connection, classloader: Def Class loader.]
  40. [2023-01-11 10:56:48.405] |-[INFO] |-[d65063ce0df6424481055d799b279dae] |-[SYSTEM] |-[g5.qry.driver.ConnectionProvider.getConn(ConnectionProvider.java:105)] |-[OTHER:   Succeed to get connection, classloader: Def Class loader.]
  41. [2023-01-11 10:56:48.406] |-[INFO] |-[f6740e2a5d8f4194866de0075a96cb21] |-[SYSTEM] |-[g5.qry.driver.ConnectionProvider.getConn(ConnectionProvider.java:105)] |-[OTHER:   Succeed to get connection, classloader: Def Class loader.]
  42. [2023-01-11 10:56:49.465] |-[INFO] |-[475ca99daaf642e4a778fc0bef5da745] |-[SYSTEM] |-[g5.sched.SchedulerEngine.updateJobs(SchedulerEngine.java:943)] |-[OTHER:   Start to sync/update job status.]
  43. [2023-01-11 10:56:49.554] |-[INFO] |-[043d251724f74cbe9a0c3248f9e59b6c] |-[SYSTEM] |-[g5.sched.SchedulerEngine.updateJobs(SchedulerEngine.java:1092)] |-[OTHER:   Begin to process reboot error.]
  44. [2023-01-11 10:56:49.555] |-[INFO] |-[7b3a8b4e488842f8941b9f11cc08193f] |-[SYSTEM] |-[g5.sched.SchedulerEngine.updateJobs(SchedulerEngine.java:1122)] |-[OTHER:   End of sync/update job status.]
  45. [2023-01-11 10:56:51.199] |-[INFO] |-[c177fbf30ccf443eb3ba18a33eaf5b0d] |-[SYSTEM] |-[g5.qry.sql.impl.SQLConnPool.get0(SQLConnPool.java:232)] |-[OTHER:   g5.qry.sql.impl.SQLConnPool@225ffcc7 Get one connection 'g5.qry.sql.impl.GConn@2ca06442' url: jdbc:derby:/app/yh904/Yonghong/derby/defAuditDb, Pool size: 30, Pool occupied: 1, cost: 0ms, use conn pool: true]
  46. [2023-01-11 10:56:51.297] |-[INFO] |-[7a855275947e4422b5d61ce52d8fc0ec] |-[SYSTEM] |-[g5.qry.sql.impl.SQLConnPool.set0(SQLConnPool.java:254)] |-[OTHER:   g5.qry.sql.impl.SQLConnPool@225ffcc7 Return back connection 'g5.qry.sql.impl.GConn@2ca06442' url: jdbc:derby:/app/yh904/Yonghong/derby/defAuditDb, Pool size: 30, Pool occupied: 0, cost: 0ms]
复制代码



作者: yhdata_lyaa    时间: 2023-1-11 11:27
永洪服务器上的其他数据库工具可以连上吗
作者: xxx404    时间: 2023-1-11 11:33
yhdata_lyaa 发表于 2023-1-11 11:27
永洪服务器上的其他数据库工具可以连上吗

服务器是centos,没有按其他数据库工具,telnet能连通。其他服务器也可以连Mysql 就永洪不行。
作者: yhdata_yzm    时间: 2023-1-11 13:58
xxx404 发表于 2023-1-11 11:33
服务器是centos,没有按其他数据库工具,telnet能连通。其他服务器也可以连Mysql 就永洪不行。 ...

加端口telnet下,这个一般都是服务端的问题
作者: xxx404    时间: 2023-1-11 14:06
yhdata_yzm 发表于 2023-1-11 13:58
加端口telnet下,这个一般都是服务端的问题

就是加端口telnet的
作者: yhdata_yzm    时间: 2023-1-11 15:13
xxx404 发表于 2023-1-11 14:06
就是加端口telnet的

mysql那端有没有开防火墙
作者: yhdata_yzm    时间: 2023-1-11 15:15
mysql -h数据库主机 -u用户 -p密码 -P端口你按照这个命令直接在操作系统登录一下看看能登上去吗
作者: xxx404    时间: 2023-1-11 15:44
yhdata_yzm 发表于 2023-1-11 15:13
mysql那端有没有开防火墙

没有
作者: yhdata_yzm    时间: 2023-1-12 13:18
xxx404 发表于 2023-1-11 15:44
没有

看我上一条回复
作者: lanly    时间: 2023-7-18 15:02
万能得重启服务器




欢迎光临 永洪社区 (https://club.yonghongtech.com/) Powered by Discuz! X3.4