问题现象

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即可

经验总结

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

【YashanDB知识库】ycm托管数据库时,数据库非OM安装无法托管的更多相关文章

  1. 创建oracle数据库时,出现ORA-00922: 选项缺失或无效

    sdd53HOME 新建oracle数据库时遇到ORA-00922: 选项缺失或无效的问题,如图: 原因:一般是语句的语法有问题.比如命名不对,关键字写错等等.对于非标准的命名,一般采用双引号来创建. ...

  2. 数据库聚焦与非聚焦索引 事务处理 redis innodb引擎(九)

    1 数据库事务处理 一个数据库事务通常包含对数据库进行读或写的一个操作序列 . 当一个事务被提交给了DBMS(数据库管理系统),则DBMS需要确保该事务中的所有操作都成功完成且其结果被永久保存在数据库 ...

  3. 使用图形界面管理工具Navicat for MySQL连接Mysql数据库时提示错误:Can't connect to MySQL server (10060)

    版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢. https://blog.csdn.net/testcs_dn/article/details/ ...

  4. 如何选择RDBMS关系型数据库和Nosql非关系型数据库?

    RDBMS关系型数据库和Nosql非关系型数据库区别: 一.RDBMS是关系型数据库模式: 1.二维模式,由行列组成. 2.非常强调事务原子性,例如用户提出一个请求,DB完整的去执行,如果报错就全部回 ...

  5. 创建Odoo8数据库时的“new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)“问题

    Odoo8创建数据库时,显示如下错误信息: DataError: new encoding (UTF8) is incompatible with the encoding of the templa ...

  6. sqlserver2008附加数据库时提示“无法为该请求检索数据。 (Microsoft.SqlServer.Management.Sdk.Sfc)”

    解决方案: 右击SQL Server Management Studio以管理员身份运行,选择与脱机数据库时相同的登陆方式(win还是sa),进入后再附加就是ok了.

  7. 关于iBatis.NET连接各数据库时提示没找到数据库驱动的依赖文件

    iBatis.net在连接oracle数据库时使用的是:oracleClient1.0 这个是系统自带的驱动,配置上即可,使用的连接配置为: <database> <provider ...

  8. Sqlserver2005附加数据库时出错提示操作系统错误5(拒绝访问)错误5120的解决办法

    Sqlserver2005附加数据库时出错提示操作系统错误5(拒绝访问)错误5120的解决办法 最近几天从网上找了几个asp.net的登录案例想要研究研究代码,结果在用 Sql Server2005附 ...

  9. PowerDesigner生成Oracle数据库时,表名会带引号问题

    使用PowerDesigner生成数据库建表SQL脚本时,尤其是Oracle数据库时,表名一般会带引号.其实加引号是PL/SQL的规范,数据库会严格按照""中的名称建表,如果没有& ...

  10. SQL Server附加数据库时失败,提示:“未重新生成日志,因为有不止一个日志文件”

    这个只能是试一下的方法,但不一定能成功,可以尝试如下几个方法: 1.登录远程桌面,然后以.登录SQL Server,并以Windows身份登录,然后再附加数据库时把日志文件删除. 2.试下这个脚本: ...

随机推荐

  1. ubuntu16.04个性化配置

    前言 记录一下个人配置,方便后续参考 正文 配置用户sudo免密权限 只建议在个人测试环境这么配置,否则最好root还是需要用密码确认一下 sudo su echo "你的用户名 ALL=( ...

  2. Java常见问题-汇总

    一.面试到底在问些什么东西? 首先你要知道,面试官的提问和你简历上写的内容是紧密联系的,所以你简历上写的技能一定要会. 一般面试包括下面几方面知识类型: Java基础.多线程.IO与NIO.虚拟机.设 ...

  3. 微软账号密码修改后提示密码错误的解决方法(远程桌面&smb共享访问等)

    众所周知,自从微软将Microsoft账户与Windows账号强制绑定后,使用起来便一直有诸多困难,在Microsoft Support和搜索引擎长期搜索解决方案未果,今天偶然在一个佬的博客翻到了这个 ...

  4. 如何去除字符串中的 "\n" ?80% 的同学错了!

    大家好,我是鱼皮,今天分享一个小知识. 我最近负责的工作是设计一个 SQL 解析引擎.简单来说,就是将一个 SQL 表达式字符串,解析为一颗对象树,从而执行查询等一系列操作. 在最开始,我就遇到了一个 ...

  5. 字符—字符与整数的关系&&常用的库函数_C

    // Code file created by C Code Develop #include "ccd.h" #include "stdio.h" #incl ...

  6. mysql面试汇总

    最近一直在关注mysql方面的面试题目,并且从最近的面试情况来看,mysql在java后端的面试中,肯定是必问的题目,所以这里有必要对这块的内容进行总结,大家可以根据下面的导图进行重点复习, 引擎 1 ...

  7. PixiJS源码分析系列:第四章 响应 Pointer 交互事件(上篇)

    响应 Pointer 交互事件(上篇) 上一章我们分析了 sprite 在 canvasRenderer 上的渲染,那么接下来得看看交互上最重要的事件系统了 最简单的 demo 还是用一个最简单的 d ...

  8. 【Java,IDEA】创建自己的代码模版快速生成

    写原生JavaWeb发现一个问题就是声明方法的时候没有字符关联提示, 只能一个保留字,一个保留字这样单个的敲出来方法,写多了就会发现特别费劲 当遇上一个字特别多且经常需要声明的方法可以使用IDEA的生 ...

  9. 世界机器人大会 —— 人形机器人(humanoid)、双足机器人、四足机器人 —— 我国最大的机器人展览会

    相关资料: https://www.bilibili.com/video/BV1iG411g7B4/ https://www.youtube.com/watch?v=8cJV08MTwA0 官网主页: ...

  10. python版本的两款NVIDIA显卡管理查询工具

    本文所述如题; 给出两个python版本的NVIDIA显卡管理查询工具 1.  py3nvml github下载地址: https://github.com/fbcotter/py3nvml Requ ...