问题1:老师 OceanBase中我用OCP 接管集群的时候这个问题在哪里看日志呀,我的机器都是同一个地域同可用区,同安全组 网络是通的,集群是正常的 集群是正常的 问题2:直接连接可以,还是用别的测试方法 2023-05-19 10:55:58.745 ERROR 13 --- [obsdk-init-thread-12,70d469d391f04cb0,60358694c002] com.alibaba.druid.pool.DruidDataSource : init datasource error, url: jdbc:oceanbase://172.16.170.156:2883/oceanbase?useUnicode=true&characterEncoding=UTF8
java.sql.SQLTransientConnectionException: Could not connect to 172.16.170.156:2883 : (conn=13587) cluster not exist at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:128) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:235) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1644) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.internal.util.Utils.retrieveProxy(Utils.java:1427) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.OceanBaseConnection.newConnection(OceanBaseConnection.java:306) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.Driver.connect(Driver.java:89) ~[oceanbase-client-2.4.2.jar!/:na] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1657) ~[druid-1.2.8.jar!/:1.2.8] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1723) ~[druid-1.2.8.jar!/:1.2.8] at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:927) ~[druid-1.2.8.jar!/:1.2.8] at com.oceanbase.ocp.obsdk.connector.impl.AbstractConnector.init(AbstractConnector.java:95) [obsdk-4.0.3-20230301.jar!/:4.0.3-20230301] at com.oceanbase.ocp.obsdk.connector.impl.DefaultConnector.init(DefaultConnector.java:14) [obsdk-4.0.3-20230301.jar!/:4.0.3-20230301] at com.oceanbase.ocp.obsdk.connector.ObConnectors.lambda$newObConnector$1(ObConnectors.java:243) [obsdk-4.0.3-20230301.jar!/:4.0.3-20230301] at com.oceanbase.ocp.common.trace.TraceDecorator.lambda$decorate$1(TraceDecorator.java:41) ~[ocp-common-4.0.3-20230301.jar!/:4.0.3-20230301] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_312] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_312] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_312] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_312] Caused by: java.sql.SQLTransientConnectionException: (conn=13587) cluster not exist at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:128) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:230) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.internal.protocol.AbstractConnectProtocol.authenticationHandler(AbstractConnectProtocol.java:787) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:591) ~[oceanbase-client-2.4.2.jar!/:na] at com.oceanbase.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1639) ~[oceanbase-client-2.4.2.jar!/:na] ... 14 common frames omitted
2023-05-19 10:55:58.746 ERROR 13 --- [obsdk-init-thread-12,70d469d391f04cb0,60358694c002] com.alibaba.druid.pool.DruidDataSource : {dataSource-15} init error这是触发以后的 唯一个ER2023-05-19 10:55:58.748 ERROR 13 --- [obsdk-init-thread-12,70d469d391f04cb0,60358694c002] c.o.o.o.c.impl.AbstractConnector : [obsdk] init druid datasource failed. connectProperties=ConnectProperties(connectionMode=proxy, address=172.16.170.156, port=2883, obsAddrList=null, username=root, tenantName=sys, clusterName=ob-test, obClusterId=null, proxy=null, odpSocketConfig=null, vpcId=1, compatibilityMode=MYSQL, database=oceanbase), error message:Could not connect to 172.16.170.156:2883 : (conn=13587) cluster not exist 2023-05-19 10:55:58.748 ERROR 13 --- [http-nio-0.0.0.0-8080-exec-4,70d469d391f04cb0,9d129d8e57d9] c.o.ocp.obsdk.connector.ObConnectors : [obsdk] init ob connector failed, connectProperties=ConnectProperties(connectionMode=proxy, address=172.16.170.156, port=2883, obsAddrList=null, username=root, tenantName=sys, clusterName=ob-test, obClusterId=null, proxy=null, odpSocketConfig=null, vpcId=1, compatibilityMode=MYSQL, database=oceanbase), cause:java.sql.SQLTransientConnectionException: Could not connect to 172.16.170.156:2883 : (conn=13587) cluster not exist 2023-05-19 10:55:58.749 ERROR 13 --- [Druid-ConnectionPool-Create-218576965,,] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: jdbc:oceanbase://172.16.170.156:2883/oceanbase?useUnicode=true&characterEncoding=UTF8, errorCode 4669, state HY000
回答1:ocp节点按接管的配置 测试下连接集群。 回答2:1、可以发一下ocp.log日志看看。 2、在待接管的OB上测试一下ocp的参数(ocp.site.url): curl ${ocp.site.url} 回答2:发一下接管失败时候,ocp.log完整的日志,此回答整理自钉群“[社区]技术答疑群OceanBase”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。