【 使用环境 】生产环境
【 OB or 其他组件 】ocp-express
【 使用版本 】4.2.1
【问题描述】清晰明确描述问题
–安装组件的版本信息
obd mirror list local
[admin@bj-qingyun-serve09-dev ~]$ obd mirror list local
±---------------------------------------------------------------------------------------------------------+
| local Package List |
±------------------±--------±-----------------------±-------±-----------------------------------------+
| name | version | release | arch | md5 |
±------------------±--------±-----------------------±-------±-----------------------------------------+
| grafana | 7.5.17 | 1 | x86_64 | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| obagent | 4.2.1 | 100000122023103020.el8 | x86_64 | 668081831d6371e63e3950dd978f5c613741d063 |
| ob-deploy | 2.4.1 | 2.el8 | x86_64 | 565349f6907283647248c1c56dc8cf9cdad7c918 |
| obproxy-ce | 4.2.1.0 | 11.el8 | x86_64 | 6b1c8edcc1606189c94090acd2131e73899d1a61 |
| oceanbase-ce | 4.2.1.2 | 102010022023121415.el8 | x86_64 | 69fa9b6f0edc6809ac17ee383222dae3e46a6898 |
| oceanbase-ce-libs | 4.2.1.2 | 102010022023121415.el8 | x86_64 | 8b62b336094818e116b4273484269c0e72ac4f6c |
| ocp-express | 4.2.1 | 100000222023111619.el8 | x86_64 | 60fe0791fa13f437b26a23e3c5fc960d0fafbc7c |
| prometheus | 2.37.1 | 10000102022110211.el8 | x86_64 | e4f8a3e784512fca75bf1b3464247d1f31542cb9 |
±------------------±--------±-----------------------±-------±-----------------------------------------+
Trace ID: cb18c19e-bf43-11ee-a581-f4ee0852f633
If you want to view detailed obd logs, please run: obd display-trace cb18c19e-bf43-11ee-a581-f4ee0852f633
======================================================================
1.以下 oceanbase-ce yaml 配置文件部署 ocp-express 报错,
oceanbase-ce:
servers:
- name: obce01
ip: 192.168.150.34
- name: obce02
ip: 192.168.110.66
- name: obce03
ip: 192.168.110.67
192.168.150.34:
zone: zone1
192.168.110.66:
zone: zone2
192.168.110.67:
zone: zone3
2.ocp-express 报错日志
2024-01-30 15:27:50.369 INFO 44457 — [main,] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2024-01-30 15:27:50.391 INFO 44457 — [main,] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2024-01-30 15:27:50.393 INFO 44457 — [main,] c.o.o.b.spring.BootstrapRunListener : BootstrapRunListener failed
2024-01-30 15:27:50.452 ERROR 44457 — [main,] c.o.ocp.analyzer.OcpFailureAnalyzer : OCP startup check failed with cause:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ocpExpressInitializer’: Invocation of init method failed; nested exception is java.lang.RuntimeException: Init by spring config files failed, please check config file format
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920) ~[spring-context-5.3.27.jar!/:5.3.27]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.27.jar!/:5.3.27]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) [spring-boot-2.7.12.jar!/:2.7.12]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) [spring-boot-2.7.12.jar!/:2.7.12]
at com.oceanbase.ocp.OcpExpressApplication.main(OcpExpressApplication.java:21) [classes!/:4.2.1-20231116]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [ocp-express-server.jar:4.2.1-20231116]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) [ocp-express-server.jar:4.2.1-20231116]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [ocp-express-server.jar:4.2.1-20231116]
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467) [ocp-express-server.jar:4.2.1-20231116]
Caused by: java.lang.RuntimeException: Init by spring config files failed, please check config file format
at com.oceanbase.ocp.config.OcpExpressInitializer.initFromEnvOrProperties(OcpExpressInitializer.java:103) ~[classes!/:4.2.1-20231116]
at com.oceanbase.ocp.config.OcpExpressInitializer.init(OcpExpressInitializer.java:72) ~[classes!/:4.2.1-20231116]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.3.27.jar!/:5.3.27]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.3.27.jar!/:5.3.27]
… 26 common frames omitted
2024-01-30 15:27:50.455 ERROR 44457 — [main,] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
OCP application startup check failed.
Action:
Please check the stack trace above for the root cause.
======================================================================
3.以下 oceanbase-ce yaml 配置文件部署 ocp-express 部署成功
oceanbase-ce:
servers:
- 192.168.150.34
- 192.168.110.66
- 192.168.110.67
192.168.150.34:
zone: zone1
192.168.110.66:
zone: zone2
192.168.110.67:
zone: zone3
±------------------------------------------------------------------+
| ocp-express |
±---------------------------±---------±-----------------±-------+
| url | username | initial password | status |
±---------------------------±---------±-----------------±-------+
| http://192.168.150.34:7180 | admin | xxxxxx | active |
±---------------------------±---------±-----------------±-------+
4.测试总结
–ocp 可以部署成功
oceanbase-ce:
servers:
- name: obce01
ip: 192.168.150.34
- name: obce02
ip: 192.168.110.66
- name: obce03
ip: 192.168.110.67
192.168.150.34:
zone: zone1
192.168.110.66:
zone: zone2
192.168.110.67:
zone: zone3
–ocp 部署失败
oceanbase-ce:
servers:
- name: obce01
ip: 192.168.150.34
- name: obce02
ip: 192.168.110.66
- name: obce03
ip: 192.168.110.67
192.168.150.34:
zone: zone1
192.168.110.66:
zone: zone2
192.168.110.67:
zone: zone3