求助:ocp-server启动失败

故障现象:



[admin@rocky95 ~]$ obd cluster list
+--------------------------------------------------------------------+
|                            Cluster List                            |
+------------+-------------------------------------+-----------------+
| Name       | Configuration Path                  | Status (Cached) |
+------------+-------------------------------------+-----------------+
| obtest     | /home/admin/.obd/cluster/obtest     | configured      |
| standalone | /home/admin/.obd/cluster/standalone | destroyed       |
| ocpee      | /home/admin/.obd/cluster/ocpee      | stopped         |
+------------+-------------------------------------+-----------------+
Trace ID: 468a47b4-c215-11f0-8eeb-005056ab3021
If you want to view detailed obd logs, please run: obd display-trace 468a47b4-c215-11f0-8eeb-005056ab3021

[admin@rocky95 ~]$ obd cluster start ocpee
Get local repositories ok
Load cluster param plugin ok
Open ssh connection ok
[WARN] OBD-4521: The config observer_sys_password in obproxy did not take effect, please config it in oceanbase
Check before start ocp-server ok
cluster scenario: None
Start observer ok
observer program health check ok
Connect to observer 192.168.169.42:2881 ok
start obproxy ok
obproxy program health check ok
Connect to obproxy ok
Start ocp-server ok
[ERROR] failed to start 192.168.169.42 ocp-server
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 5c8b4c2a-c215-11f0-8823-005056ab3021
If you want to view detailed obd logs, please run: obd display-trace 5c8b4c2a-c215-11f0-8823-005056ab3021
[admin@rocky95 ~]$

ocp 启动重启前修改了如下参数:

ocp.analyze.ob.trace.enabled	
ocp.analyze.enabled  

查看日志

obd trace

[admin@rocky95 ~]$ obd display-trace 5c8b4c2a-c215-11f0-8823-005056ab3021
^^^^

[2025-11-15 19:22:30.737] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.738] [DEBUG] -- local execute: ls /proc/13679/
[2025-11-15 19:22:30.750] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.751] [DEBUG] -- local execute: bash -c 'cat /proc/net/{tcp*,udp*}' | awk -F' ' '{if($4=="0A") print $2,$4,$10}' | grep ':0B43' | awk -F' ' '{print $3}' | uniq
[2025-11-15 19:22:30.788] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.789] [DEBUG] -- local execute: ls -l /proc/13679/fd/ |grep -E 'socket:\[(56983)\]'
[2025-11-15 19:22:30.807] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.857] [DEBUG] - sub start ref count to 0
[2025-11-15 19:22:30.858] [DEBUG] - export start
[2025-11-15 19:22:30.858] [DEBUG] - plugin obproxy-py_script_start-3.2.1 result: True
[2025-11-15 19:22:30.858] [DEBUG] - Searching health_check plugin for components ...
[2025-11-15 19:22:30.859] [DEBUG] - Searching health_check plugin for obproxy-4.3.1.4-242025032019.el8-311f7a47d1b6144f7b7a65b9dc3856bb8e33b625
[2025-11-15 19:22:30.860] [DEBUG] - Found for obproxy-py_script_health_check-3.2.1 for obproxy-4.3.1.4
[2025-11-15 19:22:30.860] [DEBUG] - Call plugin obproxy-py_script_health_check-3.2.1 for obproxy-4.3.1.4-242025032019.el8-311f7a47d1b6144f7b7a65b9dc3856bb8e33b625
[2025-11-15 19:22:30.860] [DEBUG] - import health_check
[2025-11-15 19:22:30.864] [DEBUG] - add health_check ref count to 1
[2025-11-15 19:22:30.865] [INFO] obproxy program health check
[2025-11-15 19:22:30.867] [DEBUG] -- 192.168.169.42 program health check
[2025-11-15 19:22:30.868] [DEBUG] -- local execute: cat /home/admin/obproxy/run/obproxy-192.168.169.42-2883.pid
[2025-11-15 19:22:30.880] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.881] [DEBUG] -- local execute: bash -c 'cat /proc/net/{tcp*,udp*}' | awk -F' ' '{if($4=="0A") print $2,$4,$10}' | grep ':0B43' | awk -F' ' '{print $3}' | uniq
[2025-11-15 19:22:30.917] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.918] [DEBUG] -- local execute: ls -l /proc/13679/fd/ |grep -E 'socket:\[(56983)\]'
[2025-11-15 19:22:30.935] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.936] [DEBUG] -- local execute: pid=`cat /home/admin/obproxy/run/obproxyd-192.168.169.42-2883.pid` && ls /proc/$pid
[2025-11-15 19:22:30.952] [DEBUG] -- exited code 0
[2025-11-15 19:22:30.953] [DEBUG] -- 192.168.169.42 obproxy[pid: 13679] started
[2025-11-15 19:22:30.998] [DEBUG] - sub health_check ref count to 0
[2025-11-15 19:22:30.998] [DEBUG] - export health_check
[2025-11-15 19:22:30.999] [DEBUG] - plugin obproxy-py_script_health_check-3.2.1 result: True
[2025-11-15 19:22:30.999] [DEBUG] - Searching connect plugin for components ...
[2025-11-15 19:22:31.000] [DEBUG] - Searching connect plugin for obproxy-4.3.1.4-242025032019.el8-311f7a47d1b6144f7b7a65b9dc3856bb8e33b625
[2025-11-15 19:22:31.001] [DEBUG] - Found for obproxy-py_script_connect-3.2.1 for obproxy-4.3.1.4
[2025-11-15 19:22:31.001] [DEBUG] - Call plugin obproxy-py_script_connect-3.2.1 for obproxy-4.3.1.4-242025032019.el8-311f7a47d1b6144f7b7a65b9dc3856bb8e33b625
[2025-11-15 19:22:31.002] [DEBUG] - import connect
[2025-11-15 19:22:31.008] [DEBUG] - add connect ref count to 1
[2025-11-15 19:22:31.009] [INFO] Connect to obproxy
[2025-11-15 19:22:31.014] [DEBUG] -- connect 192.168.169.42 -P2883 -uroot@proxysys -p******
[2025-11-15 19:22:31.142] [DEBUG] - sub connect ref count to 0
[2025-11-15 19:22:31.142] [DEBUG] - export connect
[2025-11-15 19:22:31.142] [DEBUG] - plugin obproxy-py_script_connect-3.2.1 result: True
[2025-11-15 19:22:31.143] [DEBUG] - Searching bootstrap plugin for components ...
[2025-11-15 19:22:31.143] [DEBUG] - Searching bootstrap plugin for obproxy-4.3.1.4-242025032019.el8-311f7a47d1b6144f7b7a65b9dc3856bb8e33b625
[2025-11-15 19:22:31.144] [DEBUG] - Found for obproxy-py_script_bootstrap-3.2.1 for obproxy-4.3.1.4
[2025-11-15 19:22:31.144] [DEBUG] - Call plugin obproxy-py_script_bootstrap-3.2.1 for obproxy-4.3.1.4-242025032019.el8-311f7a47d1b6144f7b7a65b9dc3856bb8e33b625
[2025-11-15 19:22:31.144] [DEBUG] - import bootstrap
[2025-11-15 19:22:31.146] [DEBUG] - add bootstrap ref count to 1
[2025-11-15 19:22:31.147] [DEBUG] -- execute sql: alter proxyconfig set observer_sys_password = %s. args: ['******']
[2025-11-15 19:22:31.154] [DEBUG] - sub bootstrap ref count to 0
[2025-11-15 19:22:31.154] [DEBUG] - export bootstrap
[2025-11-15 19:22:31.154] [DEBUG] - plugin obproxy-py_script_bootstrap-3.2.1 result: True
[2025-11-15 19:22:31.154] [DEBUG] - Searching parameter_pre plugin for components ...
[2025-11-15 19:22:31.155] [DEBUG] - Searching parameter_pre plugin for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.155] [DEBUG] - Found for ocp-server-py_script_parameter_pre-4.2.1 for ocp-server-4.3.5
[2025-11-15 19:22:31.156] [DEBUG] - Call plugin ocp-server-py_script_parameter_pre-4.2.1 for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.162] [DEBUG] - plugin ocp-server-py_script_parameter_pre-4.2.1 result: True
[2025-11-15 19:22:31.163] [DEBUG] - Searching ocp_const plugin for components ...
[2025-11-15 19:22:31.163] [DEBUG] - Searching ocp_const plugin for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.164] [DEBUG] - Found for ocp-server-py_script_ocp_const-4.2.1 for ocp-server-4.3.5
[2025-11-15 19:22:31.165] [DEBUG] - Call plugin ocp-server-py_script_ocp_const-4.2.1 for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.165] [DEBUG] - import ocp_const
[2025-11-15 19:22:31.166] [DEBUG] - add ocp_const ref count to 1
[2025-11-15 19:22:31.167] [DEBUG] - sub ocp_const ref count to 0
[2025-11-15 19:22:31.167] [DEBUG] - export ocp_const
[2025-11-15 19:22:31.167] [DEBUG] - plugin ocp-server-py_script_ocp_const-4.2.1 result: True
[2025-11-15 19:22:31.167] [DEBUG] - Searching chown_dir plugin for components ...
[2025-11-15 19:22:31.168] [DEBUG] - Searching chown_dir plugin for general-0.1--None
[2025-11-15 19:22:31.168] [DEBUG] - Found for general-py_script_chown_dir-0.1 for general-0.1
[2025-11-15 19:22:31.169] [DEBUG] - Call plugin general-py_script_chown_dir-0.1 for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.169] [DEBUG] - import chown_dir
[2025-11-15 19:22:31.171] [DEBUG] - add chown_dir ref count to 1
[2025-11-15 19:22:31.171] [DEBUG] -- use new clients
[2025-11-15 19:22:31.171] [DEBUG] - local execute: [ -f /tmp/.sandbox.token ]
[2025-11-15 19:22:31.182] [DEBUG] - exited code 0
[2025-11-15 19:22:31.183] [DEBUG] -- chown cmd: sudo chown -R admin /tmp/.sandbox.token
[2025-11-15 19:22:31.183] [DEBUG] - local execute: sudo chown -R admin /tmp/.sandbox.token
[2025-11-15 19:22:31.220] [DEBUG] - exited code 0
[2025-11-15 19:22:31.221] [DEBUG] - local execute: cd /home/admin/ocp
[2025-11-15 19:22:31.229] [DEBUG] - exited code 0
[2025-11-15 19:22:31.230] [DEBUG] - sub chown_dir ref count to 0
[2025-11-15 19:22:31.231] [DEBUG] - export chown_dir
[2025-11-15 19:22:31.231] [DEBUG] - plugin general-py_script_chown_dir-0.1 result: True

[2025-11-15 19:22:31.231] [DEBUG] - Searching start plugin for components ...
[2025-11-15 19:22:31.232] [DEBUG] - Searching start plugin for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.233] [DEBUG] - Found for ocp-server-py_script_start-4.2.1 for ocp-server-4.3.5
[2025-11-15 19:22:31.233] [DEBUG] - Call plugin ocp-server-py_script_start-4.2.1 for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.234] [DEBUG] - import start
[2025-11-15 19:22:31.238] [DEBUG] - add start ref count to 1
[2025-11-15 19:22:31.239] [DEBUG] -- metadb connect check
[2025-11-15 19:22:31.241] [INFO] Start ocp-server
[2025-11-15 19:22:31.242] [DEBUG] -- local execute: cat /home/admin/ocp/run/ocp-server.pid
[2025-11-15 19:22:31.256] [DEBUG] -- exited code 0
[2025-11-15 19:22:31.256] [DEBUG] -- local execute: ls /proc/14001
[2025-11-15 19:22:31.270] [DEBUG] -- exited code 2, error output:
[2025-11-15 19:22:31.271] [DEBUG] ls: cannot access '/proc/14001': No such file or directory
[2025-11-15 19:22:31.271] [DEBUG]
[2025-11-15 19:22:31.272] [DEBUG] -- admin@192.168.169.42 append '/home/admin/ocp/jre/bin:' to PATH
[2025-11-15 19:22:31.273] [DEBUG] -- local execute: cd /home/admin/ocp; export JDBC_URL=jdbc:oceanbase://192.168.169.42:2883/meta_database; export JDBC_USERNAME=root@ocp_meta;export JDBC_PASSWORD=****** export JDBC_PUBLIC_KEY=;export OCP_INITIAL_ADMIN_PASSWORD=******
[2025-11-15 19:22:31.273] [DEBUG] java -Dfile.encoding=UTF-8 -jar -Xms8g -Xmx8g -Docp.iam.encrypted-system-password=****** /home/admin/ocp/lib/ocp-server.jar --bootstrap --with-property=server.port:8080 --with-property=logging.file.max-size:100MB --with-property=ocp.logging.file.total.size.cap:1GB --with-property=ocp.monitordb.host:192.168.169.42 --with-property=ocp.monitordb.username:root@ocp_monitor --with-property=ocp.monitordb.port:2883 --with-property=ocp.monitordb.password:****** --with-property=ocp.monitordb.database:monitor_database --with-property=logging.file.name:/home/admin/logs/ocp-server.log --with-property=ocp.site.url:http://192.168.169.42:8080 --progress-log=/home/admin/logs/bootstrap.log --with-property=obsdk.ob.connection.mode:direct --with-property=ocp.iam.login.client.max-attempts:60 --with-property=ocp.iam.login.client.lockout-minutes:1 --with-property=ocp.file.local.built-in.dir:/home/admin/ocp/ocp-server/lib --with-property=ocp.log.download.tmp.dir:/home/admin/ocp/logs/ocp --with-property=ocp.file.local.dir:/home/admin/software > /dev/null 2>&1 &
[2025-11-15 19:22:31.284] [DEBUG] -- exited code 0
[2025-11-15 19:22:31.285] [DEBUG] -- local execute: ps -aux | grep -F 'java -Dfile.encoding=UTF-8 -jar -Xms8g -Xmx8g -Docp.iam.encrypted-system-password=****** /home/admin/ocp/lib/ocp-server.jar --bootstrap' | grep -v grep | awk '{print $2}'
[2025-11-15 19:22:31.334] [DEBUG] -- exited code 0
[2025-11-15 19:22:31.335] [DEBUG] -- write 230353 to /home/admin/ocp/run/ocp-server.pid
[2025-11-15 19:22:31.336] [DEBUG] -- open /home/admin/ocp/run/ocp-server.pid for w
[2025-11-15 19:22:31.374] [DEBUG] - sub start ref count to 0
[2025-11-15 19:22:31.375] [DEBUG] - export start
[2025-11-15 19:22:31.375] [DEBUG] - plugin ocp-server-py_script_start-4.2.1 result: True
[2025-11-15 19:22:31.376] [DEBUG] - Searching health_check plugin for components ...
[2025-11-15 19:22:31.376] [DEBUG] - Searching health_check plugin for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.377] [DEBUG] - Found for ocp-server-py_script_health_check-4.2.1 for ocp-server-4.3.5
[2025-11-15 19:22:31.377] [DEBUG] - Call plugin ocp-server-py_script_health_check-4.2.1 for ocp-server-4.3.5-20250326153512.el7-22ebee552455f0b087df7b9a2fab9617f68248f0
[2025-11-15 19:22:31.378] [DEBUG] - import health_check
[2025-11-15 19:22:31.381] [DEBUG] - add health_check ref count to 1
[2025-11-15 19:22:31.382] [INFO] ocp-server program health check
[2025-11-15 19:22:31.384] [DEBUG] -- 192.168.169.42 program health check
[2025-11-15 19:22:31.384] [DEBUG] -- local execute: ls /proc/230353
[2025-11-15 19:22:31.400] [DEBUG] -- exited code 0
[2025-11-15 19:22:31.401] [DEBUG] -- local execute: bash -c 'cat /proc/net/{tcp*,udp*}' | awk -F' ' '{print $2,$10}' | grep '00000000:1F90' | awk -F' ' '{print $2}' | uniq

………………………………
[2025-11-15 19:25:17.239] [DEBUG] -- exited code 0
[2025-11-15 19:25:17.240] [DEBUG] -- failed to start 192.168.169.42 ocp-server, remaining retries: 108
[2025-11-15 19:25:32.255] [DEBUG] -- 192.168.169.42 program health check
[2025-11-15 19:25:32.255] [DEBUG] -- local execute: ls /proc/230353
[2025-11-15 19:25:32.271] [DEBUG] -- exited code 2, error output:
[2025-11-15 19:25:32.272] [DEBUG] ls: cannot access '/proc/230353': No such file or directory
[2025-11-15 19:25:32.272] [DEBUG]
[2025-11-15 19:25:32.346] [ERROR] [ERROR] failed to start 192.168.169.42 ocp-server
[2025-11-15 19:25:32.347] [DEBUG] - sub health_check ref count to 0
[2025-11-15 19:25:32.347] [DEBUG] - export health_check
[2025-11-15 19:25:32.347] [DEBUG] - plugin ocp-server-py_script_health_check-4.2.1 result: False
[2025-11-15 19:25:32.358] [DEBUG] - share lock /home/admin/.obd/lock/mirror_and_repo release, count 5
[2025-11-15 19:25:32.358] [DEBUG] - share lock /home/admin/.obd/lock/mirror_and_repo release, count 4
[2025-11-15 19:25:32.359] [DEBUG] - share lock /home/admin/.obd/lock/mirror_and_repo release, count 3
[2025-11-15 19:25:32.359] [DEBUG] - share lock /home/admin/.obd/lock/mirror_and_repo release, count 2
[2025-11-15 19:25:32.359] [DEBUG] - share lock /home/admin/.obd/lock/mirror_and_repo release, count 1
[2025-11-15 19:25:32.359] [DEBUG] - share lock /home/admin/.obd/lock/mirror_and_repo release, count 0
[2025-11-15 19:25:32.359] [DEBUG] - unlock /home/admin/.obd/lock/mirror_and_repo
[2025-11-15 19:25:32.359] [DEBUG] - exclusive lock /home/admin/.obd/lock/deploy_ocpee release, count 0
[2025-11-15 19:25:32.360] [DEBUG] - unlock /home/admin/.obd/lock/deploy_ocpee
[2025-11-15 19:25:32.360] [DEBUG] - share lock /home/admin/.obd/lock/global release, count 0
[2025-11-15 19:25:32.360] [DEBUG] - unlock /home/admin/.obd/lock/global
[2025-11-15 19:25:32.361] [INFO] See https://www.oceanbase.com/product/ob-deployer/error-codes .
[2025-11-15 19:25:32.361] [INFO] Trace ID: 5c8b4c2a-c215-11f0-8823-005056ab3021
[2025-11-15 19:25:32.361] [INFO] If you want to view detailed obd logs, please run: obd display-trace 5c8b4c2a-c215-11f0-8823-005056ab3021

ocp-server .log


[root@rocky95 logs]# tail -n 100 /home/admin/logs/ocp-server.log
2025-11-15 19:25:19.970  INFO 230353 --- [main,,] c.o.o.b.spring.BootstrapRunListener      : failed
2025-11-15 19:25:20.120  WARN 230353 --- [main,,] c.o.o.s.c.analyzer.OcpFailureAnalyzer    : OCP startup check failed with cause:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'analyzeController': Unsatisfied dependency expressed through method 'setLogQuerier' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logQuerier' defined in class path resource [com/oceanbase/ocp/analyze/configuration/AnalyzeConfiguration.class]: Unsatisfied dependency expressed through method 'logQuerier' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restHighLevelClient' defined in class path resource [com/oceanbase/ocp/analyze/configuration/AnalyzeConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.opensearch.client.RestHighLevelClient]: Factory method 'restHighLevelClient' threw exception; nested exception is java.lang.IllegalArgumentException: hosts must not be null nor empty
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:824)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:777)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:408)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:929)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
        at com.oceanbase.ocp.OcpServerApplication.main(OcpServerApplication.java:21)
        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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logQuerier' defined in class path resource [com/oceanbase/ocp/analyze/configuration/AnalyzeConfiguration.class]: Unsatisfied dependency expressed through method 'logQuerier' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restHighLevelClient' defined in class path resource [com/oceanbase/ocp/analyze/configuration/AnalyzeConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.opensearch.client.RestHighLevelClient]: Factory method 'restHighLevelClient' threw exception; nested exception is java.lang.IllegalArgumentException: hosts must not be null nor empty
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:801)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:536)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:816)
        ... 28 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restHighLevelClient' defined in class path resource [com/oceanbase/ocp/analyze/configuration/AnalyzeConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.opensearch.client.RestHighLevelClient]: Factory method 'restHighLevelClient' threw exception; nested exception is java.lang.IllegalArgumentException: hosts must not be null nor empty
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:481)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
        ... 41 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.opensearch.client.RestHighLevelClient]: Factory method 'restHighLevelClient' threw exception; nested exception is java.lang.IllegalArgumentException: hosts must not be null nor empty
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648)
        ... 55 common frames omitted
Caused by: java.lang.IllegalArgumentException: hosts must not be null nor empty
        at org.opensearch.client.RestClient.builder(RestClient.java:220)
        at com.oceanbase.ocp.analyze.internal.basic.es.ClientBuilder.buildRestHighLevelClient(ClientBuilder.java:47)
        at com.oceanbase.ocp.analyze.configuration.AnalyzeConfiguration.restHighLevelClient(AnalyzeConfiguration.java:75)
        at com.oceanbase.ocp.analyze.configuration.AnalyzeConfiguration$$EnhancerBySpringCGLIB$$da58a5a9.CGLIB$restHighLevelClient$1(<generated>)
        at com.oceanbase.ocp.analyze.configuration.AnalyzeConfiguration$$EnhancerBySpringCGLIB$$da58a5a9$$FastClassBySpringCGLIB$$156e9763.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
        at com.oceanbase.ocp.analyze.configuration.AnalyzeConfiguration$$EnhancerBySpringCGLIB$$da58a5a9.restHighLevelClient(<generated>)
        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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
        ... 56 common frames omitted

2025-11-15 19:25:20.125 ERROR 230353 --- [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.

[root@rocky95 logs]#

1 个赞

上传相干日志:
ocp-server.log (131.1 KB)

ocp-server.log

正在上传:bootstrap.log…

ocp.analyze.ob.trace.enabled
ocp.analyze.enabled
修改这俩参数后,hosts文件改了么 需要配置ip地址

没有修改hosts文件;

为什么要修改这两参数

ocp.analyze.ob.trace.enabled
ocp.analyze.enabled

因为参考实验手册,在OCP中查不到相关记录;提示这两参数要启用;

image

1、OCP 查询全链路是否需要启用这两参数,不启用能否查询全链路?
2.、OCP 中启用这两参数,还需要额外部署ES 和 opensearch ?部署ES 和opensearch 是否属于OBCP考核内容,有无文档介绍?

回到正题,改了两参数obcp-server启动不来,咋修复呢?

登陆ocp_meta租户的meta_database数据库修改表config_properties的相应数据,sql如下

update config_properties set value = false where `key`='ocp.analyze.enabled';
update config_properties set value = false where `key`='ocp.analyze.ob.trace.enabled';

修改后 OCP-SERVER 成功启动

大佬,有空帮看看这两问题啊

应该是用不了,就是需要ES配置全链路

如果需要ES,那实验手册没说全啊

哪个手册,麻烦发一下

OBCP_V4_DBA2_OceanBase 数据库运维与监控实验指导手册_20241107.pdf (10.2 MB)