先吐槽下: CAT这么牛的产品,为什么本地编译运行这么难?,折腾了两天,使用最新的4RC版本,自己编译,下载3.1打包后的版本,怎么都无法成功,真的让人崩溃。 还请大佬能搞个可操作的windows环境开发测试的说明?
环境:win11, tomcat9, jdk8, mysql5.7.26
cat版本: 4.0.1 RC(本地编译), 3.1.0 (官方包)
本地配置目录: e:\data\appdatas\cat\ , \applogs\cat 已赋予了读写权限
数据库: cat(分别使用不同版本中的脚本文件初始化了)
配置:
client.xml
datasources.xml:
现象: 能正常登录, 但始终无法保存配置(路由配置、服务端配置),界面提示【操作失败】,
错误日志: 3.1: by zero 异常, 4.0RC: 总是提示在加载 datasources.xml
基本怀疑是连不上数据库,但到底该怎么改? 数据库的用户名密码确保是正确的, 驱动
com.mysql.cj.jdbc.Driver 和 com.mysql.jdbc.Driver 都换过, 还是不成功。
我知道或许是个小问题,但真的搜遍全网都没找到解决办法, 恳请能够得到回复和解决!! 感激不尽!
[12-24 13:45:19.998] [WARN] [DefaultClientConfigManager] error when connect cat server config url http://127.0.0.1:8080/cat/s/router?domain=cat&ip=192.168.0.105&op=json
[12-24 13:45:19.999] [INFO] [ChannelManager] start connect server/127.0.0.1:2280
[12-24 13:45:20.005] [INFO] [ChannelManager] Connected to CAT server at /127.0.0.1:2280
[12-24 13:45:20.444] [ERROR] [HttpServlet] Error occured when handling uri: /cat/s/router
java.lang.RuntimeException: Error occured during handling outbound action(router)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleException(DefaultRequestLifecycle.java:89)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleRequest(DefaultRequestLifecycle.java:190)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handle(DefaultRequestLifecycle.java:63)
at org.unidal.web.MVC.service(MVC.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:439)
at com.dianping.cat.servlet.CatFilter$CatHandler$3.handle(CatFilter.java:236)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter$CatHandler$4.handle(CatFilter.java:329)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter$CatHandler$2.handle(CatFilter.java:219)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter$CatHandler$1.handle(CatFilter.java:127)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter.doFilter(CatFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at com.dianping.cat.system.page.permission.PermissionFilter.doFilter(PermissionFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.unidal.web.mvc.ActionException: Error occured during handling outbound action(router)
at org.unidal.web.mvc.lifecycle.DefaultOutboundActionHandler.handle(DefaultOutboundActionHandler.java:36)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleOutboundAction(DefaultRequestLifecycle.java:111)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleRequest(DefaultRequestLifecycle.java:188)
... 40 more
Caused by: java.lang.RuntimeException: Error occured during invoking method: public void com.dianping.cat.system.page.router.Handler.handleOutbound(com.dianping.cat.system.page.router.Context) throws javax.servlet.ServletException,java.io.IOException with parameters([com.dianping.cat.system.page.router.Context@b4e4ac9])
at org.unidal.lookup.util.ReflectUtils.invokeMethod(ReflectUtils.java:51)
at org.unidal.web.mvc.lifecycle.DefaultOutboundActionHandler.handle(DefaultOutboundActionHandler.java:29)
... 42 more
Caused by: java.lang.ArithmeticException: / by zero
at com.dianping.cat.system.page.router.config.RouterConfigManager.queryServersByDomain(RouterConfigManager.java:286)
at com.dianping.cat.system.page.router.Handler.buildRouterInfo(Handler.java:88)
at com.dianping.cat.system.page.router.Handler.buildKvs(Handler.java:181)
at com.dianping.cat.system.page.router.Handler.handleOutbound(Handler.java:144)
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.unidal.lookup.util.ReflectUtils.invokeMethod(ReflectUtils.java:49)
... 43 more
[12-24 13:45:20.444] [ERROR] [HttpServlet] Error occured when handling uri: /cat/s/router
java.lang.RuntimeException: Error occured during handling outbound action(router)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleException(DefaultRequestLifecycle.java:89)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleRequest(DefaultRequestLifecycle.java:190)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handle(DefaultRequestLifecycle.java:63)
at org.unidal.web.MVC.service(MVC.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:439)
at com.dianping.cat.servlet.CatFilter$CatHandler$3.handle(CatFilter.java:236)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter$CatHandler$4.handle(CatFilter.java:329)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter$CatHandler$2.handle(CatFilter.java:219)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter$CatHandler$1.handle(CatFilter.java:127)
at com.dianping.cat.servlet.CatFilter$Context.handle(CatFilter.java:437)
at com.dianping.cat.servlet.CatFilter.doFilter(CatFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at com.dianping.cat.system.page.permission.PermissionFilter.doFilter(PermissionFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.unidal.web.mvc.ActionException: Error occured during handling outbound action(router)
at org.unidal.web.mvc.lifecycle.DefaultOutboundActionHandler.handle(DefaultOutboundActionHandler.java:36)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleOutboundAction(DefaultRequestLifecycle.java:111)
at org.unidal.web.mvc.lifecycle.DefaultRequestLifecycle.handleRequest(DefaultRequestLifecycle.java:188)
... 40 more
Caused by: java.lang.RuntimeException: Error occured during invoking method: public void com.dianping.cat.system.page.router.Handler.handleOutbound(com.dianping.cat.system.page.router.Context) throws javax.servlet.ServletException,java.io.IOException with parameters([com.dianping.cat.system.page.router.Context@a0ef68b])
at org.unidal.lookup.util.ReflectUtils.invokeMethod(ReflectUtils.java:51)
at org.unidal.web.mvc.lifecycle.DefaultOutboundActionHandler.handle(DefaultOutboundActionHandler.java:29)
... 42 more
Caused by: java.lang.ArithmeticException: / by zero
at com.dianping.cat.system.page.router.config.RouterConfigManager.queryServersByDomain(RouterConfigManager.java:286)
at com.dianping.cat.system.page.router.Handler.buildRouterInfo(Handler.java:88)
at com.dianping.cat.system.page.router.Handler.buildKvs(Handler.java:181)
at com.dianping.cat.system.page.router.Handler.handleOutbound(Handler.java:144)
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.unidal.lookup.util.ReflectUtils.invokeMethod(ReflectUtils.java:49)
... 43 more
1条答案
按热度按时间ufj5ltwl1#
使用mysql 5.8,本地安装目录默认是~/.cat…
On Dec 24, 2022, at 13:38, zhyfreefly ***@***.***> wrote: 先吐槽下: CAT这么牛的产品,为什么本地编译运行这么难?,折腾了两天,使用最新的4RC版本,自己编译,下载3.1打包后的版本,怎么都无法成功,真的让人崩溃。 还请大佬能搞个可操作的windows环境开发测试的说明? 环境:win11, tomcat9, jdk8, mysql5.7.26 cat版本: 4.0.1 RC(本地编译), 3.1.0 (官方包) 本地配置目录: e:\data\appdatas\cat\ , \applogs\cat 已赋予了读写权限 数据库: cat(分别使用不同版本中的脚本文件初始化了) 配置: client.xml datasources.xml: 3 1s 10m 1000 com.mysql.cj.jdbc.Driver root ***@***.***#abc 现象: 能正常登录, 但始终无法保存配置(路由配置、服务端配置),界面提示【操作失败】, 错误日志: 3.1: by zero 异常, 4.0RC: 无异常 — Reply to this email directly, view it on GitHub <#2262>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AASQE74QWDQBQ5O7DN7XEX3WO2D7DANCNFSM6AAAAAATIIZ32Q >. You are receiving this because you are subscribed to this thread.