首页 > 数据库 >【YashanDB知识库】ycm托管数据库时,数据库非OM安装无法托管

【YashanDB知识库】ycm托管数据库时,数据库非OM安装无法托管

时间:2024-07-31 11:54:00浏览次数:9  
标签:OM yashandb -- 数据库 托管 yashan 00 yasdb yasom

问题现象

ps -ef | grep yas 查看无yasom和yasagent进程,且在{数据库安装目录}/om/{数据库名称}的目录下没有conf、data、log等目录,确定数据库不是用yasboot安装,是用脚本安装的

问题的风险及影响

非yasboot安装,ycm无法完成托管,无法监控

问题影响的版本

不涉及ycm的版本问题

问题发生原因

数据库版本太旧或安装数据库的人没有按照规范使用yasboot安装

解决方法及规避方式

将数据库先托管到yasom中,再托管到ycm中

问题分析和处理过程

(1)生成配置文件
-- ip必须是本机ip,install-path不能和安装的数据库path重重复
./bin/yasboot package config gen --cluster yasdb -u yashan -p Cod-2024 --ip 192.168.39.70 --install-path /home/yashan/yashandb/yasdb_yasom -t se
  
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot package config gen --cluster yasdb -u yashan -p Cod-2024 --ip 192.168.39.70 --install-path /home/yashan/yashandb/yasdb_yasom -t se
192.168.39.70
  192.168.39.70:1688 is already used
 hostid   | group | node_type | node_name | listen_addr        | din_addr           | replication_addr   | data_path                                  
--------------------------------------------------------------------------------------------------------------------------------------------------------
 host0001 | dbg1  | db        | 1-1       | 192.168.39.70:1688 | 192.168.39.70:1689 | 192.168.39.70:1690 | /home/yashan/yashandb/yasdb_yasom/data/yasdb
----------+-------+-----------+-----------+--------------------+--------------------+--------------------+----------------------------------------------
  
Generate config success
  
  
(2)安装yasom和yasagent
./bin/yasboot package install -i yashandb-22.2.3.0-linux-aarch64.tar.gz -t hosts.toml
  
  
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot package install -i yashandb-22.2.3.0-linux-aarch64.tar.gz -t hosts.toml
checking install profile.toml...
install version: yashandb 22.2.3.0
update host to yasom...
[yashan@KylinV10 yasdb_yasom]$ ps -ef | grep yas
yashan   3945392       1  0 15:04 ?        00:00:25 yasdb open -D /home/yashan/yashandb/yasdb_data
root     3950422 3950243  0 15:37 pts/1    00:00:00 su - yashan
yashan   3950423 3950422  0 15:37 pts/1    00:00:00 -bash
root     3953443 3952376  0 15:49 pts/2    00:00:00 su - yashan
yashan   3953444 3953443  0 15:49 pts/2    00:00:00 -bash
yashan   3955488       1  0 16:05 ?        00:00:00 /home/yashan/yashandb/yasdb_yasom/bin/yasagent --init -c yasdb -l 192.168.39.70:1676 --host-id host0001 -k 564e9e581348c9ae -d
yashan   3955503       1  0 16:06 ?        00:00:00 /home/yashan/yashandb/yasdb_yasom/bin/yasom --init -c yasdb -l 192.168.39.70:1675 -k 564e9e581348c9ae -d
yashan   3955542 3950423  0 16:06 pts/1    00:00:00 ps -ef
yashan   3955543 3950423  0 16:06 pts/1    00:00:00 grep yas
  
(3)生成托管配置模版
./bin/yasboot package config join-demo -t SE
  
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot package config join-demo -t SE
[yashan@KylinV10 yasdb_yasom]$ ll
总用量 221716
drwxrwxr-x 6 yashan yashan        70  5月  4  2023 admin
drwxrwxr-x 3 yashan yashan       220  5月  4  2023 bin
drwxrwxr-x 2 yashan yashan        30  4月 17 16:05 client
drwxrwxr-x 3 yashan yashan       126  4月 17 16:06 conf
-rw-rw-r-- 1 yashan yashan     10974  5月  4  2023 gitmoduleversion.dat
-rw------- 1 yashan yashan       386  4月 17 16:05 hosts.toml
drwxrwxr-x 2 yashan yashan        65  5月  4  2023 include
drwxrwxr-x 3 yashan yashan        17  5月  4  2023 java
-rw-r--r-- 1 yashan yashan       527  4月 17 16:15 join_demo.toml
drwxr-xr-x 2 yashan yashan      4096  5月  4  2023 lib
drwxrwxr-x 2 yashan yashan         6  4月 17 16:06 log
drwxrwxr-x 3 yashan yashan        38  4月 17 15:50 om
drwxrwxr-x 2 yashan yashan       115  5月  4  2023 scripts
-rw------- 1 yashan yashan       549  4月 17 16:05 yasdb.toml
drwxrwxr-x 3 yashan yashan        22  4月 17 15:48 yashandb
-rw-r--r-- 1 yashan yashan 227004643  4月 17 15:46 yashandb-22.2.3.0-linux-aarch64.tar.gz
  
(4)修改托管配置模版
[yashan@KylinV10 yasdb_yasom]$ cat join_demo.toml
cluster = "tt"
sys_password = "yasdb_123"
yas_type = "SE"
  
[primary_config]
  manage_ip = "127.0.0.1"
  yasdb_home = "/opt/yasom/yashandb/tt"
  node_path = "/opt/yasom/yashandb/data/tt/db-1-1"
  node_id = "1-1:1"
  
[[standby_config]]
  manage_ip = "127.0.0.1"
  yasdb_home = "/opt/yasom/yashandb/tt"
  node_path = "/opt/yasom/yashandb/data/tt/db-1-2"
  node_id = "1-2:1"
  
[[standby_config]]
  manage_ip = "127.0.0.1"
  yasdb_home = "/opt/yasom/yashandb/tt"
  node_path = "/opt/yasom/yashandb/data/tt/db-1-3"
  node_id = "1-3:1"
  
修改后:
  
[yashan@KylinV10 yasdb_yasom]$ cat join_demo.toml
cluster = "yasdb"
sys_password = "yasdb_123"
yas_type = "SE"
  
[primary_config]
  manage_ip = "192.168.39.70"
  yasdb_home = "/home/yashan/yashandb/yasdb_home"
  node_path = "/home/yashan/yashandb/yasdb_data"
  node_id = "1-1:1"
  
  
(5)执行托管
./bin/yasboot cluster join -t SE --config join_demo.toml
  
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot cluster join -t SE --config join_demo.toml
the cluster status is as follow:
|key         |value
|------------+------
|clusterName |yasdb
|version     |22.2.3.0
  
the cluster status is as follow:
 hostid   | node_type | nodeid | pid     | instance_status | database_status | database_role | listen_address | data_path                      
-------------------------------------------------------------------------------------------------------------------------------------------------
 host0001 | db        | 1-1:1  | 3945392 | open            | normal          | primary       | 0.0.0.0:1688   | /home/yashan/yashandb/yasdb_data
----------+-----------+--------+---------+-----------------+-----------------+---------------+----------------+----------------------------------
Check success
Are you sure you to add yasdb yasdb to yasom[yes/no]: yes
 type | uuid             | name             | hostid | index | status  | return_code | progress | cost
-------------------------------------------------------------------------------------------------------
 task | eb0ecf155a0db5e6 | JoinYasdbCluster | -      | yasdb | SUCCESS | 0           | 100      | -  
------+------------------+------------------+--------+-------+---------+-------------+----------+------
task completed, status: SUCCESS
  
(6)查看状态
yashan@KylinV10 ~]$ yasboot cluster status -c yasdb -d
 hostid   | node_type | nodeid | pid     | instance_status | database_status | database_role | listen_address | data_path                             
--------------------------------------------------------------------------------------------------------------------------------------------------------
 host0001 | db        | 1-1:1  | 3945392 | open            | normal          | primary       | 0.0.0.0:1688   | /home/yashan/yashandb/data/yasdb/db-1-1
----------+-----------+--------+---------+-----------------+-----------------+---------------+----------------+-----------------------------------------

托管至yasom完成后,再按照流程托管至ycm即可

经验总结

安装数据库要按照规范安装,非规范安装会导致一系列问题

标签:OM,yashandb,--,数据库,托管,yashan,00,yasdb,yasom
From: https://www.cnblogs.com/YashanDB/p/18334306

相关文章

  • 我用Awesome-Graphs看论文:解读Naiad
    Naiad论文:《Naiad:ATimelyDataflowSystem》前面通过文章《论文图谱当如是:Awesome-Graphs用200篇图系统论文打个样》向大家介绍了论文图谱项目Awesome-Graphs,并分享了Google的Pregel、OSDI'12的PowerGraph、SOSP'13的X-Stream。这次向大家分享Microsoft发表在SOSP'13的另一......
  • TapData 信创数据源 | 国产信创数据库 TiDB 数据迁移指南,加速国产化进程,推进自主创新
    随着国家对自主可控的日益重视,目前在各个行业和区域中面临越来越多的国产化,采用有自主知识产权的国产数据库正在成为主流。长期以来,作为拥有纯国产自研背景的TapData,自是非常重视对于更多国产信创数据库的数据连接器支持,旗下产品已陆续与阿里云、华为云、麒麟软件、优炫数据库、A......
  • SOMEIPSRV_RPC_11: 字段的设定器和有效载荷
    测试目的:验证字段的setter方法是否按照规范要求,通过请求/响应调用实现,其中请求消息的负载包含期望的字段值,响应消息的负载包含已设置到字段的值。描述本测试用例旨在验证DUT(DeviceUnderTest,被测试设备)在接收到字段setter方法的请求时,是否能够正确地在响应消息中返回设......
  • .NET 开源快捷的数据库文档查询和生成工具
    前言在实际项目开发中,需求变更和项目迭代是常态。要求我们能够迅速响应,对数据库结构进行相应的调整,如添加新表、更新现有表结构或增加字段等。为了确保团队成员之间的信息同步,实时更新和维护数据库文档变得至关重要。这不仅提升了数据库的可读性,也极大提高了开发效率和团队协作......
  • discuz数据库配置文件是哪个?怎样修改数据库配置信息?
    网站系统需要修改的位置有两处Discuz和UC-center①路径:/wwwroot/config/config_global.php这个根据你网站安装的路径而定。打开config_global.php文件修改:$_config['db']['1']['dbpw']='原来密码';原来密码修改为新的数据库密码。②路径:/wwwroot/uc_ser......
  • 神经网络之卷积篇:详解计算机视觉(Computer vision)
    详解计算机视觉计算机视觉是一个飞速发展的一个领域,这多亏了深度学习。深度学习与计算机视觉可以帮助汽车,查明周围的行人和汽车,并帮助汽车避开它们。还使得人脸识别技术变得更加效率和精准,即将能够体验到或早已体验过仅仅通过刷脸就能解锁手机或者门锁。当解锁了手机,猜手机上一定......
  • 视频监控国标GB28181平台EasyGBS如何更换默认的SQLite数据库?
    视频流媒体安防监控国标GB28181平台EasyGBS视频能力丰富,部署灵活,既能作为业务平台使用,也能作为安防监控视频能力层被业务管理平台调用。国标GB28181视频EasyGBS平台可提供流媒体接入、处理、转发等服务,支持内网、公网的安防视频监控设备通过国标GB/T28181协议进行视频监控直播......
  • Python - Composition
     classEngine:def__init__(self,power):self.power=powerdefstart(self):self.draw_current()self.spin()self.ignite()defdraw_current(self):print('Drawingcurrent')defspin(sel......
  • 适用于 JDK 1.8 的 Spring Boot 的 maven 的 pom.xml 模板
    适用于JDK1.8的SpringBoot的maven的pom.xml模板 <?xmlversion="1.0"encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:sche......
  • 接私活神器:免费云数据库+免费开源模板!!!
    在当今快节奏的数字时代,独立开发者接私活已经成为一种常见的职业选择。作为一名独立开发者,如何高效地完成项目,快速交付高质量的应用,是一个重要的挑战。今天,我要向大家推荐一款接私活的超级神器——MemFireCloud。这款工具不仅提供免费云数据库,还附带大量开源模板,让你的开发......