gha_ctl UNINSTALL [-f] [-c cluster] -l dcslist
具体操作命令为:
[gbase@localhost deploy]$ /home/gbase/deploy/bin/gha_ctl uninstall -f -l http://192.168.142.211:2379,http://192.168.142.212:2379,http://192.168.142.213:2379
返回操作成功信息:
{
"ret":0,
"msg":"Success"
}
此时查询数据库集群状态:
[gbase@localhost deploy]$ /home/gbase/deploy/bin/gha_ctl monitor all -l http://192.168.142.211:2379,http://192.168.142.212:2379,http://192.168.142.213:2379
返回没有集群信息:
{
"cluster":"gbase8c",
"gtm":[],
"coordinator":[],
"datanode":{},
"dcs":{
"cluster_state":"healthy",
"members":[
{
"url":"http://192.168.142.213:2379",
"id":"62f9a805ba818264",
"name":"node_2",
"state":"healthy",
"isLeader":true
},
{
"url":"http://192.168.142.211:2379",
"id":"8ea592db62fb7d92",
"name":"node_0",
"state":"healthy",
"isLeader":false
},
{
"url":"http://192.168.142.212:2379",
"id":"fbc0fc018ba512fa",
"name":"node_1",
"state":"healthy",
"isLeader":false
}
]
}
}
操作成功。
最后删除DCS工具,语法:
gha_ctl DESTROY dcs -l dcslist
具体操作命令为:
[gbase@localhost deploy]$ /home/gbase/deploy/bin/gha_ctl destroy dcs -l http://192.168.142.211:2379,http://192.168.142.212:2379,http://192.168.142.213:2379
返回操作成功信息:
{
"ret":0,
"msg":"Success"
}
数据库集群删除完成。
数据库登录语法:
gsql -p port -h host
以gbase用户登录node3节点的CN3为例,具体操作命令为:
[gbase@localhost ~]$ gsql -p 5432 -h 192.168.142.211
正确返回信息:
gsql (GBase8c 5.2.0.0B17, based on PG 10.6 (GBase8cV5_S2.0.0B17))
Type "help" for help.
gbase=#
随后可以自由使用GBase 8c数据库。
常见错误码返回信息及描述:
Value | Msg | 说明 |
0 | Success | 成功 |
80000101 | Invalid argument:%s | 参数无效 |
80000102 | Unsupport operation:%s | 命令不支持 |
80000103 | Argument count error | 参数个数错误 |
80000104 | Dcs list invalid | 无效的Dcs list |
80000105 | Ip address invalid:%s | 无效的ip |
80000106 | Port number invalid:%s | 无效的端口号 |
80000107 | Resource:%s already in use | 资源被占用 |
80000108 | Directory:%s already exist | 目录已存在 |
80000109 | Directory:%s not exist | 目录不存在 |
80000110 | Directory:%s empty | 目录为空 |
80000111 | Directory:%s not empty | 目录不为空 |
80000112 | Directory name:%s too long | 目录名字太长 |
80000113 | No such component:%s | 组件不存在(start/stop某个组件) |
80000201 | Run cmd failed:%s | 执行命令失败(ssh到远端执行命令) |
80000202 | No route to host:%s | 网络不通 |
80000203 | Not prepare package info or version mismatch | 未prepare就进行deploy或者升级/回滚时版本不匹配 |
80000204 | Package:%s not exist | deploy时安装包不存在 |
80000205 | Host:%s not deployed | 未deploy就进行add |
80000206 | Soft link error | 无效的软连接(布署时检查软连接) |
80000207 | Start component:%s failed | 启动组件失败 |
80000208 | Url requests failed:%s | http post/get等命令失败 |
80000301 | Transport endpoint unreach | 连接dcs失败 |
80000302 | Acquire lock timeout | 获取dcs锁超时 |
80000303 | Write data to dcs failed | 写入dcs失败 |
80000304 | Read data from dcs failed | 读取dcs失败 |
80000305 | Host ips belong to different cluster | 创建dcs集群时,输入的ip属于不同的集群 |
80000306 | Dcs cluster not healthy | Dcs集群不健康 |
80000401 | Switchover failed:%s | Swtichover失败 |
80000402 | Host:%s not in cluster | 升级时,传的ip不在集群中 |
80000403 | Slave datanode replication state not streaming | Stop all的时候内部判断用,平台不用关注 |
80000501 | Component:%s not running | 组件未运行 |
80000502 | Cluster:%s is busy | 当前集群正在扩容中 |
80000503 | Base backup failed | Backup失败 |
80000601 | Sql connect to: %s failed | 连接数据库失败 |
80000602 | Sql cmd:%s execute failed | 执行sql命令失败 |
80000603 | Sql cmd result error | sql返回结果不符合预期 |
80000604 | Connection:%s state error | Sql连接状态错误 |