【 使用环境 】生产环境
【 OMS 】
【 使用版本 】 4.2.2_CE
【问题描述】
oms迁移的时候,表对象为什么不显示了?之前是可以的。查看之前迁移成功的库,也不能显示表清单了。
10.65.12.11\12
【复现路径】问题出现前后相关操作
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
【 使用环境 】生产环境
【 OMS 】
【 使用版本 】 4.2.2_CE
【问题描述】
oms迁移的时候,表对象为什么不显示了?之前是可以的。查看之前迁移成功的库,也不能显示表清单了。
10.65.12.11\12
【复现路径】问题出现前后相关操作
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
请稍等这边先与相关产品同学确认下
你好,oms数据库安装在哪里了,是否重装过呢。怀疑数据被清理了
text.log (12.7 KB)
text (1).log (380.4 KB)
text (2).log (374.3 KB)
text (3).log (22.8 KB)
我任意选择一个任务的日志吧。
迁移项目中使用的源端数据库的库表还在吗?
在的
出现类似日志
[2024-07-02 14:49:18.523][ERROR][main][RocksDBStorageLevel:107][][] Failed to open RocksDB with option: RocksDBOption(columnFamily=overview-index, dataPath=./data/overview/index, maxOpenFileCount=5000, maxLogFileCount=5, ttl=120, level0FileNumCompactionTrigger=1000, maxTableFileSize=1073741824),
org.rocksdb.RocksDBException: While lock file: ./data/overview/index/LOCK: Resource temporarily unavailable
at org.rocksdb.TtlDB.openCF(Native Method)
at org.rocksdb.TtlDB.open(TtlDB.java:132)
at com.oceanbase.oms.supervisor.storage.rocksdb.RocksDBStorage.open(RocksDBStorage.java:100)
at com.oceanbase.oms.supervisor.scavenge.parser.collector.FullMonitorInfoCollector.<init>(FullMonitorInfoCollector.java:75)
at com.oceanbase.oms.supervisor.scavenge.parser.collector.FullMonitorInfoCollector.<init>(FullMonitorInfoCollector.java:31)
at com.oceanbase.oms.supervisor.scavenge.parser.collector.FullMonitorInfoCollector$Singleton.<clinit>(FullMonitorInfoCollector.java:33)
at com.oceanbase.oms.supervisor.scavenge.parser.collector.FullMonitorInfoCollector.instance(FullMonitorInfoCollector.java:37)
at com.oceanbase.oms.supervisor.background.FullTablesMonitorInfoScanRoutine.<init>(FullTablesMonitorInfoScanRoutine.java:37)
at com.oceanbase.oms.supervisor.background.FullTablesMonitorInfoScanRoutine$Singleton.<clinit>(FullTablesMonitorInfoScanRoutine.java:27)
at com.oceanbase.oms.supervisor.background.FullTablesMonitorInfoScanRoutine.instance(FullTablesMonitorInfoScanRoutine.java:31)
at com.oceanbase.oms.supervisor.scavenge.LegacyBootstrap.init(LegacyBootstrap.java:38)
at com.oceanbase.oms.supervisor.Supervisor.init(Supervisor.java:84)
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.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
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:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)
at com.oceanbase.oms.supervisor.Supervisor.main(Supervisor.java:130)
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.JarLauncher.main(JarLauncher.java:65)
[root@RS-OBOMS-P1 oms]# docker exec -it 1d241a174782 bash
[root@RS-OBOMS-P1 ~]# supervisorctl status
nginx RUNNING pid 40, uptime 0:04:49
oms_console RUNNING pid 42, uptime 0:04:49
oms_drc_cm RUNNING pid 41, uptime 0:04:49
oms_drc_supervisor RUNNING pid 892, uptime 0:04:05
sshd RUNNING pid 39, uptime 0:04:49
supervisor 的报错里 rocksDB 获取不到锁,可能是出现了重复进程,试试把 oms-supervisor 所有的进程杀掉之后重新拉起一个 supervisor。
检查所有supervisor
[root@RS-OBOMS-P1 ~]# ps -ef | grep supervisor
root 36 1 0 14:46 pts/0 00:00:21 /usr/bin/python2 /usr/bin/supervisord -c /etc/supervisor/supervisord.conf --nodaemon
ds 88 1 10 14:46 pts/0 00:13:34 java -server -Xms2g -Xmx2g -Xmn1g -Xss1024k -verbose:gc -Xloggc:./log/gc.log -XX:+PrintGC -XX:+PrintGCDetails -XX:MetaspaceSize=256m -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:HeapDumpPath=/home/ds/supervisor -XX:+HeapDumpOnOutOfMemoryError -Dsun.reflect.inflationThreshold=0 -Dserver.port=9000 -DconfigDir=/u01/ds/supervisor/config/ -Dspring.main.allow-circular-references=true -Ddb2.jcc.charsetDecoderEncoder=3 -Doracle.jdbc.javaNetNio=false -jar ./bin/oms-supervisor.jar
ds 773 1 95 14:46 pts/0 02:02:35 java -server -Xms2g -Xmx2g -Xmn1g -Xss1024k -verbose:gc -Xloggc:./log/gc.log -XX:+PrintGC -XX:+PrintGCDetails -XX:MetaspaceSize=256m -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:HeapDumpPath=/home/ds/supervisor -XX:+HeapDumpOnOutOfMemoryError -Dsun.reflect.inflationThreshold=0 -Dserver.port=9000 -DconfigDir=/u01/ds/supervisor/config/ -Dspring.main.allow-circular-references=true -Ddb2.jcc.charsetDecoderEncoder=3 -Doracle.jdbc.javaNetNio=false -jar ./bin/oms-supervisor.jar
ds 892 36 0 14:46 pts/0 00:00:11 bash /home/ds/supervisor/service.sh start foreground
杀死所有supervisor
,容器挂了
[root@RS-OBOMS-P1 ~]# /home/ds/supervisor/service.sh stop
[2024-07-02.16:57:45] Begin stop... Stopping OMS Supervisor... SUCCESS!
[root@RS-OBOMS-P1 ~]# /home/ds/supervisor/service.sh status
Checking OMS Supervisor... ERROR!
[root@RS-OBOMS-P1 ~]# /home/ds/supervisor/service.sh list-config
BIN_NAME=oms-supervisor.jar
DEBUG_PORT=9001
DEPLOY_PATH=/u01/ds/supervisor
JAVA=java
LOG_PATH=/u01/ds/supervisor/log
PORT=9000
PROCESS_NAME=oms-supervisor
SIGAR_LIB=./sigar
START_RETRY_COUNT=20
JVM_OPTIONS="${JVM_OPTIONS} ${SPACEV_JAVA_AGENT}";
[root@RS-OBOMS-P1 ~]# ps -ef | grep supervisor
root 36 1 0 14:46 pts/0 00:00:21 /usr/bin/python2 /usr/bin/supervisord -c /etc/supervisor/supervisord.conf --nodaemon
ds 88 1 10 14:46 pts/0 00:13:59 java -server -Xms2g -Xmx2g -Xmn1g -Xss1024k -verbose:gc -Xloggc:./log/gc.log -XX:+PrintGC -XX:+PrintGCDetails -XX:MetaspaceSize=256m -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:HeapDumpPath=/home/ds/supervisor -XX:+HeapDumpOnOutOfMemoryError -Dsun.reflect.inflationThreshold=0 -Dserver.port=9000 -DconfigDir=/u01/ds/supervisor/config/ -Dspring.main.allow-circular-references=true -Ddb2.jcc.charsetDecoderEncoder=3 -Doracle.jdbc.javaNetNio=false -jar ./bin/oms-supervisor.jar
ds 773 1 95 14:46 pts/0 02:06:18 java -server -Xms2g -Xmx2g -Xmn1g -Xss1024k -verbose:gc -Xloggc:./log/gc.log -XX:+PrintGC -XX:+PrintGCDetails -XX:MetaspaceSize=256m -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:HeapDumpPath=/home/ds/supervisor -XX:+HeapDumpOnOutOfMemoryError -Dsun.reflect.inflationThreshold=0 -Dserver.port=9000 -DconfigDir=/u01/ds/supervisor/config/ -Dspring.main.allow-circular-references=true -Ddb2.jcc.charsetDecoderEncoder=3 -Doracle.jdbc.javaNetNio=false -jar ./bin/oms-supervisor.jar
ds 892 36 0 14:46 pts/0 00:00:12 bash /home/ds/supervisor/service.sh start foreground
root 15924 27558 0 16:58 pts/1 00:00:00 grep --color=auto supervisor
[root@RS-OBOMS-P1 ~]# kill -9 773
[root@RS-OBOMS-P1 ~]# kill -9 88
[root@RS-OBOMS-P1 ~]# ps -ef | grep supervisor
root 36 1 0 14:46 pts/0 00:00:21 /usr/bin/python2 /usr/bin/supervisord -c /etc/supervisor/supervisord.conf --nodaemon
ds 892 36 0 14:46 pts/0 00:00:12 bash /home/ds/supervisor/service.sh start foreground
root 18665 27558 0 16:58 pts/1 00:00:00 grep --color=auto supervisor
[root@RS-OBOMS-P1 ~]# kill -9 36
[root@RS-OBOMS-P1 ~]# [root@RS-OBOMS-P1 oms]#
重启容器,并检查
$ docker exec -it 1d241a174782 bash
Error response from daemon: Container 1d241a174782451443e14c8e99939e65d282af01b01a4b67845d3cce580ef6e9 is not running
$ docker restart 1d241a174782
1d241a174782
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1d241a174782 reg.docker.alibaba-inc.com/oceanbase/oms:feature_4.2.2_ce "/bin/sh -c '/usr/bi…" 3 months ago Up 11 seconds OMS_20240327_130336
9d9518d74a65 influxdb:1.8 "/entrypoint.sh infl…" 3 months ago Up 3 months 0.0.0.0:8083->8083/tcp, 0.0.0.0:8086->8086/tcp, 0.0.0.0:14444->14444/tcp oms-influxdb
问题还复现吗?
目前仍然是不正常的。
supervisor 日志有什么显示吗?表对象这些信息是 supervisor 从项目生成的本地文件里读取到的,如果文件被清理掉了,也可能会导致看不到表对象。
另外您的环境里是不是只有历史项目有这个问题,新建的迁移项目表对象这些信息可以显示吗?
历史表—>看不到
新建的任务---->也看不到
目前我都打算重新部署一下,不知道是什么操作步骤?
具体操作是什么?怎么安全操作么?
具体操作如下:
打开oms平台,点击【数据迁移】,选择一条正在运行或者已经完成迁移的任务(不管这个任务是否正常结束),查看【迁移详情】中的【全量迁移】,选择【表对象】,没有数据。
我是否可以重新部署oms服务?或者升级到最新版本。
有没有具体一些的步骤。