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

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

时间:2024-05-11 18:09:52浏览次数:18  
标签: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/18186972

相关文章

  • Kubernetes Dashboard部署安装recommended.yaml
    ```yml#Copyright2017TheKubernetesAuthors.##LicensedundertheApacheLicense,Version2.0(the"License");#youmaynotusethisfileexceptincompliancewiththeLicense.#YoumayobtainacopyoftheLicenseat##http://www.apache.......
  • 基于PG开发数据库中出现PSQLException: 错误,无法确定参数$1的数据类型
    问题描述在开发接口适配瀚高数据库时,出现此错误:同样的xml文件在达梦、金仓、Mysql中使用模糊查询时未发现错误;...likeconcat('%',#{name},'%')后经排查与数据库连接中:jdbc:highgo://.../test?stringtype=unspecified存在联系。加入``是为了避免ERROR:columnisofty......
  • (非原创)Stable Diffusion 提示词prompt tag语法总结
    基本认知提示词会相互污染,要尽可能地做减法。XL版本主推使用自然语言使用注释将修饰词汇限定给某个主体,避免提示词污染1girl(silverlonghair,purpleeyes),yellowsuit2people(1girlAND1boy)2characters(1girlAND1dog)权重调整旧语法:(){}加大权重,[]......
  • Agile PLM数据库表结构(Oracle)
    刚进公司,任务是接管PLM系统,但是还在给外包团队开发,没有代码。无妨先看业务和数据库,ok,业务看不懂,只能先看数据库,数据库没有数据字典,这个系统没有任何文档产出......练手时发现数据库类型是Oracle,面对百度不成问题,数据字典只能看前端然后去数据库里面一个个找着对应自己整理了,纯折磨......
  • How to Learn Item Representation for Cold-Start Multimedia Recommendation
    目录概符号说明MotivationMulti-TaskPairwiseRanking(MTPR)代码DuX.,WangX.,HeX.,LiZ.,TangJ.andChuaT.Howtolearnitemrepresentationforcold-startmultimediarecommendation?MM,2020.概作者以往的多媒体推荐对于colditems在训练阶段没有足够的......
  • 达梦数据库实现一条sql判断数据是否存在,如存在则修改,不存在,则新增
     #达梦数据库实现一条sql判断数据是否存在,如存在则修改,不存在,则新增MERGEINTO X.TABLE1T1 USING( SELECT 3asid,'名字'asCOLUMN_1,0asCOLUMN_2 FROM DUAL)T2ON(T1.id=T2.id) WHENMATCHEDTHENUPDATESETT1.COLUMN_1=T2.COLUMN_1,T1.COLUMN_2......
  • Java开发利器Commons Lang之元组Tuple
    标准Java库没有提供足够的方法来操作其核心类,ApacheCommonsLang提供了这些额外的方法。ApacheCommonsLang为java提供了大量的帮助工具。langAPI,特别是String操作方法、基本数值方法、对象反射、并发、创建和序列化以及System属性。此外,它还包含对java.util.Date的基本增......
  • SomeIP 协议格式解析
    一、SomeIP协议格式//SomeIP协议格式SomeIP{ushortsvcID;//ServiceID;标识出一个服务ushortmthdID;//MethodID;标识出一个方法uintlength;//Length(此字节之后的长度)ushortcliID;//ClientID;客户端ID,区分不同客户端ushortssID;......
  • Component Tester - 超迷你的元器件测试仪
    1、cJSON-一款基于C语言的轻量级JSON解析库JSON是一种轻量级的数据交换格式,可以把JSON的结构理解成无序的、可嵌套的key-value键值对集合,这些key-value键值对以结构体或数组的形式来组织的。cJSON是C语言写的一个JSON解析库。项目主页: https://github.com/DaveGamble/cJSON......
  • prometheus+grafana 监控mysql数据库
    一:安装插件1.1下载mysqld_exportermysqld_exporter是一个用于监控MySQL服务器的开源工具,它是由Prometheus社区维护的一个官方Exporter。该工具通过连接到MySQL服务器并执行各种查询来收集关于MySQL服务器性能和状态的指标,并将这些指标暴露给Prometheus监控系统。在ht......